
얼마 전에 저는 Linux 시스템에 최대 절전 모드를 설정했습니다. 장치 노드 이름을 뒤섞은 또 다른 하드 디스크를 설치한 오늘 밤까지는 정말 잘 작동했습니다. 이제 부팅 시 (정확한 문구를 기록하지 않았습니다) 효과를 나타내는 메시지가 표시되고 couldn't stat /dev/sda3
최대 절전 모드에서 다시 시작하지 않고 계속하려면 최대 절전 모드 장치 노드 이름을 입력하거나 Enter 키를 누르라는 메시지가 표시됩니다. 이는 최대 절전 모드에서 다시 시작하지 않고 일반 부팅에서 발생합니다(최대 절전 모드에서 다시 시작을 시도하지 않았으며 시스템이 최대 절전 모드에서 다시 시작할 장치를 제대로 식별할 수 없으면 전혀 제대로 작동하지 않을 것 같습니다). 최대 절전 모드를 사용할 때는 패키지( 설치된 hibernate
버전 ) 에서 제공하는 /usr/sbin/hibernate 스크립트를 사용합니다 . 2.0+15+g88d54a8-1
특별한 방식으로 설정한 기억은 없습니다.
이는 새 하드 디스크를 설치했을 때 루트 파일 시스템과 스왑 공간이 있는 SSD보다 검색 순서가 더 일찍 나타났기 때문에 시작되었습니다. 특히 내가 안정적인 /dev/disk/by-*/ 이름을 사용하고 있기 때문에 문제가 되지는 않을 것입니다.
/boot 및 /etc를 살펴봤지만 일치하는 항목이 전혀 없습니다.
/proc/swaps는 현재 알려진 파티션 이름인 /dev/sdb3을 표시합니다. /etc/fstab은 /dev/disk/by-id/ata-*-part3 이름을 사용하여 이름을 지정합니다.
저는 상당히 최신의 Debian Wheezy를 사용하고 있습니다. 내 /etc/default/grub은 다음과 같습니다.
# 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=300
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet pci=nomsi"
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"
GRUB_PRELOAD_MODULES="uhci usb_keyboard"
여기 /boot/grub/grub.cfg가 있습니다:
#
# 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 ###
insmod uhci
insmod usb_keyboard
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
}
terminal_input console
terminal_output console
if [ "${recordfail}" = 1 ] ; then
set timeout=-1
else
set timeout=300
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### 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-c050d662-f94a-447a-9342-0fc69f65a513' {
load_video
insmod gzio
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/0a1be8bb7679264ae488bd5c6f66e022'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/0a1be8bb7679264ae488bd5c6f66e022' c050d662-f94a-447a-9342-0fc69f65a513
else
search --no-floppy --fs-uuid --set=root c050d662-f94a-447a-9342-0fc69f65a513
fi
linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro quiet pci=nomsi
initrd /boot/initrd.img-3.2.0-4-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-c050d662-f94a-447a-9342-0fc69f65a513' {
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-amd64-advanced-c050d662-f94a-447a-9342-0fc69f65a513' {
load_video
insmod gzio
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/0a1be8bb7679264ae488bd5c6f66e022'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/0a1be8bb7679264ae488bd5c6f66e022' c050d662-f94a-447a-9342-0fc69f65a513
else
search --no-floppy --fs-uuid --set=root c050d662-f94a-447a-9342-0fc69f65a513
fi
echo 'Loading Linux 3.2.0-4-amd64 ...'
linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro quiet pci=nomsi
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-amd64-recovery-c050d662-f94a-447a-9342-0fc69f65a513' {
load_video
insmod gzio
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/0a1be8bb7679264ae488bd5c6f66e022'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/0a1be8bb7679264ae488bd5c6f66e022' c050d662-f94a-447a-9342-0fc69f65a513
else
search --no-floppy --fs-uuid --set=root c050d662-f94a-447a-9342-0fc69f65a513
fi
echo 'Loading Linux 3.2.0-4-amd64 ...'
linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-4-amd64
}
}
### 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_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 ###
여기 /etc/uswsusp.conf가 있습니다:
# /etc/uswsusp.conf(5) -- Configuration file for s2disk/s2both
resume device = /dev/sda3
splash = y
compress = y
early writeout = y
image size = 15529056419
RSA key file = /etc/uswsusp.key
shutdown method = platform
변경할 적절한 장소를 찾을 수만 있다면 쉽게 변경할 수 있을 것입니다. 따라서,해당 장치 이름을 가져오는 이력서 코드는 어디에 있습니까?그리고새로운 현실을 반영하도록 어떻게 바꾸나요?
(검색 순서에서 SSD가 먼저 나오도록 관련 장치를 교체하여 문제를 해결했지만 여전히 이 질문에 대한 답변에 관심이 있습니다.)
답변1
기본적으로 원본은 를 설치하는 동안 /etc/uswsusp.conf
에서 호출된 스크립트에 의해 작성되었습니다 . 스크립트를 보려면 를 확인하세요 .dpkg
uswsusp
/var/lib/dpkg/info/uswsusp.config
반자동으로 업데이트하려면 다음을 사용하세요.
dpkg-reconfigure uswsusp
또는 직접 편집한 후 다음을 사용하세요.
update-initramfs -u
여러분 /usr/share/doc/uswsusp/README.Debian
도 꼭 읽어보시길 진심으로 권해 드립니다.