休止状態回復はどこでデバイスノードを取得しますか?

休止状態回復はどこでデバイスノードを取得しますか?

しばらく前に、Linuxシステムで休止状態を設定しました。別のハードドライブをインストールし、デバイスノードの名前を変更した今夜まではうまくいきました。起動時に(正確なフレーズを作成していません)というメッセージが表示され、休止状態から再開couldn't stat /dev/sda3せずに続行するには、休止状態のデバイスノード名を入力するか、Enterキーを押すように求められます。これは休止状態から再起動せず、通常のブートで発生します(休止状態から再起動しようとせず、システムが休止状態で再起動するデバイスを正しく認識しない場合はまったく機能しません)。私は休止状態を使用するときにパッケージhibernate(インストールされたバージョン2.0+15+g88d54a8-1)によって提供される/usr/sbin/hibernateスクリプトを使用します。実際に特定の方法で設定した記憶はありません。

これは、新しいハードドライブをインストールしたときに、ルートファイルシステムとスワップスペースがあるSSDよりも検出順序で早く現れたためです。特に私はどこでも安定した/dev/disk/by-*/名前を使用しているので、これは問題ではありません。少なくとも私の考えではそうです。

私はgrep'd /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インストール中に呼び出されるスクリプトによって作成されます。スクリプトを表示するには確認してください。dpkguswsusp/var/lib/dpkg/info/uswsusp.config

半自動で更新するには、以下を使用してください。

dpkg-reconfigure uswsusp

または手動で編集し、次を使用します。

update-initramfs -u

/usr/share/doc/uswsusp/README.Debian皆さんもぜひ読んでみてください。心からお勧めします。

おすすめ記事