Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2014-02-04 19:32:24

  TDK8GB - Użytkownik

TDK8GB
Użytkownik
Zarejestrowany: 2013-11-21

Problem ze swap'em

Witam!
Utworzyłem swap w pliku. Skasowałem partycje która pozostała so swap'ie. Wszystko działa tylko przy uruchomieniu systemu pisze: Activating swap failed. Czy da się to naprawić? Korzystam z Debiana Jessie.

Offline

 

#2  2014-02-04 19:37:55

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: Problem ze swap'em

fstab?

Offline

 

#3  2014-02-04 19:39:34

  TDK8GB - Użytkownik

TDK8GB
Użytkownik
Zarejestrowany: 2013-11-21

Re: Problem ze swap'em

Kod:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=59d751bc-4c09-4f26-9be9-1b67dfe2d3af /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda3 during installation
#UUID=de35a5f0-0bf0-4da4-af79-b86e86f7c4eb none            swap    sw              0       0
#/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/var/ram.swap none swap sw 0 0

Offline

 

#4  2014-02-04 20:05:37

  marcin'82 - Użytkownik

marcin'82
Użytkownik
Skąd: Sosnowiec
Zarejestrowany: 2011-10-02

Re: Problem ze swap'em

Wpis ma wyglądać tak - część po określeniu pliku:

Kod:

/var/ram.swap none swap defaults 0 0

Po edycji /etc/fstab [i]wbij z konsoli*[/i]:

Kod:

swapon /var/ram.swap

Sprawdź poprawność działania:

Kod:

swapon -s

----
[url=http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/]Przykład z sieci.[/url]





* Cytat z tej, o której nie mówimy

Ostatnio edytowany przez marcin'82 (2014-02-04 20:08:14)


marcin'82

Offline

 

#5  2014-02-04 20:56:50

  TDK8GB - Użytkownik

TDK8GB
Użytkownik
Zarejestrowany: 2013-11-21

Re: Problem ze swap'em

A czemu tam w tym wpisie ma być słowo defaults?
Na stronie http://devinf.pl/?p=601 pisze ,że powinno być sw.

Offline

 

#6  2014-02-04 21:14:33

  marcin'82 - Użytkownik

marcin'82
Użytkownik
Skąd: Sosnowiec
Zarejestrowany: 2011-10-02

Re: Problem ze swap'em

No to zostaw 'sw'. Mam tak jak podałem i działa bez przeszkód.

Najpierw podaj co dokładnie wypluje:

Kod:

swapon /var/ram.swap

Kod:

swapon -s

Prewencyjnie - podaj co masz w Grubie:

Kod:

cat /boot/grub/grub.cfg

Kod:

cat /etc/default/grub

Wykonaj potem:

Kod:

update-grub

Kod:

update-initramfs -u

Zrestartuj komputer i zobacz czy błąd nadal występuje.

Ostatnio edytowany przez marcin'82 (2014-02-04 21:14:53)


marcin'82

Offline

 

#7  2014-02-04 21:18:02

  TDK8GB - Użytkownik

TDK8GB
Użytkownik
Zarejestrowany: 2013-11-21

Re: Problem ze swap'em

Kod:

swapon: /var/ram.swap: swapon failed: Device or resource busy

Kod:

Filename                Type        Size    Used    Priority
/var/ram.swap                           file        4198396    692    -1

Kod:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  59d751bc-4c09-4f26-9be9-1b67dfe2d3af
else
  search --no-floppy --fs-uuid --set=root 59d751bc-4c09-4f26-9be9-1b67dfe2d3af
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  59d751bc-4c09-4f26-9be9-1b67dfe2d3af
else
  search --no-floppy --fs-uuid --set=root 59d751bc-4c09-4f26-9be9-1b67dfe2d3af
fi
insmod png
if background_image /usr/share/images/desktop-base/joy-grub.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-59d751bc-4c09-4f26-9be9-1b67dfe2d3af' {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  59d751bc-4c09-4f26-9be9-1b67dfe2d3af
    else
      search --no-floppy --fs-uuid --set=root 59d751bc-4c09-4f26-9be9-1b67dfe2d3af
    fi
    echo    'Loading Linux 3.12-1-686-pae ...'
    linux    /boot/vmlinuz-3.12-1-686-pae root=UUID=59d751bc-4c09-4f26-9be9-1b67dfe2d3af ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.12-1-686-pae
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-59d751bc-4c09-4f26-9be9-1b67dfe2d3af' {
    menuentry 'Debian GNU/Linux, with Linux 3.12-1-686-pae' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12-1-686-pae-advanced-59d751bc-4c09-4f26-9be9-1b67dfe2d3af' {
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  59d751bc-4c09-4f26-9be9-1b67dfe2d3af
        else
          search --no-floppy --fs-uuid --set=root 59d751bc-4c09-4f26-9be9-1b67dfe2d3af
        fi
        echo    'Loading Linux 3.12-1-686-pae ...'
        linux    /boot/vmlinuz-3.12-1-686-pae root=UUID=59d751bc-4c09-4f26-9be9-1b67dfe2d3af ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd.img-3.12-1-686-pae
    }
    menuentry 'Debian GNU/Linux, with Linux 3.12-1-686-pae (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12-1-686-pae-recovery-59d751bc-4c09-4f26-9be9-1b67dfe2d3af' {
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  59d751bc-4c09-4f26-9be9-1b67dfe2d3af
        else
          search --no-floppy --fs-uuid --set=root 59d751bc-4c09-4f26-9be9-1b67dfe2d3af
        fi
        echo    'Loading Linux 3.12-1-686-pae ...'
        linux    /boot/vmlinuz-3.12-1-686-pae root=UUID=59d751bc-4c09-4f26-9be9-1b67dfe2d3af ro single 
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd.img-3.12-1-686-pae
    }
    menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-686-pae' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-686-pae-advanced-59d751bc-4c09-4f26-9be9-1b67dfe2d3af' {
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  59d751bc-4c09-4f26-9be9-1b67dfe2d3af
        else
          search --no-floppy --fs-uuid --set=root 59d751bc-4c09-4f26-9be9-1b67dfe2d3af
        fi
        echo    'Loading Linux 3.2.0-4-686-pae ...'
        linux    /boot/vmlinuz-3.2.0-4-686-pae root=UUID=59d751bc-4c09-4f26-9be9-1b67dfe2d3af ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd.img-3.2.0-4-686-pae
    }
    menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-686-pae (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-686-pae-recovery-59d751bc-4c09-4f26-9be9-1b67dfe2d3af' {
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  59d751bc-4c09-4f26-9be9-1b67dfe2d3af
        else
          search --no-floppy --fs-uuid --set=root 59d751bc-4c09-4f26-9be9-1b67dfe2d3af
        fi
        echo    'Loading Linux 3.2.0-4-686-pae ...'
        linux    /boot/vmlinuz-3.2.0-4-686-pae root=UUID=59d751bc-4c09-4f26-9be9-1b67dfe2d3af ro single 
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd.img-3.2.0-4-686-pae
    }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Kod:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Offline

 

#8  2014-02-04 21:20:18

  marcin'82 - Użytkownik

marcin'82
Użytkownik
Skąd: Sosnowiec
Zarejestrowany: 2011-10-02

Re: Problem ze swap'em

[quote="konsola jak dupa czarna"]Filename                Type        Size    Used    Priority
/var/ram.swap                           file        4198396    692    -1[/quote]
No to plik jest aktywny, a przestrzeń wymiany używana. [i]Trudne sprawy ... [/i] :D

Ostatnio edytowany przez marcin'82 (2014-02-04 21:27:20)


marcin'82

Offline

 

#9  2014-02-04 21:22:52

  TDK8GB - Użytkownik

TDK8GB
Użytkownik
Zarejestrowany: 2013-11-21

Re: Problem ze swap'em

Wszystko już działa. ;)

Offline

 

#10  2014-02-04 21:26:00

  marcin'82 - Użytkownik

marcin'82
Użytkownik
Skąd: Sosnowiec
Zarejestrowany: 2011-10-02

Re: Problem ze swap'em

Obstawiam, że to pomogło (w Grubie nie ma wpisu 'resume=' itd.):

Kod:

update-initramfs

marcin'82

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Nas ludzie lubią po prostu, a nie klikając w przyciski ;-)

[ Generated in 0.008 seconds, 9 queries executed ]

Informacje debugowania

Time (s) Query
0.00010 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00093 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.117.107.78' WHERE u.id=1
0.00082 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.117.107.78', 1732578440)
0.00041 SELECT * FROM punbb_online WHERE logged<1732578140
0.00062 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=25152 AND t.moved_to IS NULL
0.00007 SELECT search_for, replace_with FROM punbb_censoring
0.00194 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=25152 ORDER BY p.id LIMIT 0,25
0.00070 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=25152
Total query time: 0.00563 s