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!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.


Użytkownik



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





Szczawiożerca






fstab?
Offline


Użytkownik



# /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


Użytkownik



Wpis ma wyglądać tak - część po określeniu pliku:
/var/ram.swap none swap defaults 0 0
Po edycji /etc/fstab wbij z konsoli*:
swapon /var/ram.swap
Sprawdź poprawność działania:
swapon -s
----
Przykład z sieci.
* Cytat z tej, o której nie mówimy
Ostatnio edytowany przez marcin'82 (2014-02-04 20:08:14)
Offline


Użytkownik



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


Użytkownik



No to zostaw 'sw'. Mam tak jak podałem i działa bez przeszkód.
Najpierw podaj co dokładnie wypluje:
swapon /var/ram.swap
swapon -s
Prewencyjnie - podaj co masz w Grubie:
cat /boot/grub/grub.cfg
cat /etc/default/grub
Wykonaj potem:
update-grub
update-initramfs -u
Zrestartuj komputer i zobacz czy błąd nadal występuje.
Ostatnio edytowany przez marcin'82 (2014-02-04 21:14:53)
Offline


Użytkownik



swapon: /var/ram.swap: swapon failed: Device or resource busy
Filename Type Size Used Priority /var/ram.swap file 4198396 692 -1
#
# 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 #### 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


Użytkownik



konsola jak dupa czarna napisał(-a):
Filename Type Size Used Priority
/var/ram.swap file 4198396 692 -1
No to plik jest aktywny, a przestrzeń wymiany używana. Trudne sprawy ... :D
Ostatnio edytowany przez marcin'82 (2014-02-04 21:27:20)
Offline


Użytkownik



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