PAGE TOP

Linux起動時にBIG FAT WARNING!!

メモ


某社のPCにVineLinuxをインストールして再起動したところ、
BIG FAT WARNING!! Failed to translate “/dev/sde3” into a device id.というメッセージが..
 
どうやらCDからのブート時とデイスクからのブート時にscsiデバイスの認識順序が異なるみたい。
結果的にswap領域がみつからないということで上記のようなワーニングがでたようだ。
 
最終的にはswap領域を所定の位置に設定しなおして無事インストール完了..にみえるが、デバイスの認識順序が他に与える影響がどこかに潜んでいるかも..
 

事象

  • インストール完了後の再起動時に「BIG FAT WARNING!! Failed to translate “/dev/sde3” into a device id.」と表示される。
    (dmesgにも記録されている)
BIG FAT WARNING!! Failed to translate "/dev/sde3" into a device id.

If you want to use the current suspend image, reboot and try
again with the same kernel that you suspended from. If you want
to forget that image, continue and the image will be erased.
Press SPACE to reboot or C to continue booting with this kernel

Default action if you don't select one in 25 seconds is: continue booting.
Suspend2 2.2.5: Missing or invalid storage location (resume2= parameter).
 Please correct and rerun lilo (or equivalent) before suspending.
kjournald starting.  Commit interval 5 seconds

/dev/sde3に関してはdmesg中に次の内容が記録されていた。

Kernel command line: ro root=LABEL=/ resume2=swap:/dev/sde3 vga=0x314
Suspend2 2.2.5: Missing or invalid storage location (resume2= parameter).
Please correct and rerun lilo (or equivalent) before suspending.

原因

/etc/grub.conf(/etc/grub.confは/boot/grub/grub.confへのリンク)を調べるとその内容は以下のようになっており、swapには/dev/sde3が指定されていた。

# menu.lst generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sde2
# initrd /initrd-version.img
#boot=/dev/sde
default=0
timeout=5title Vine Linux (Current kernel)
root (hd0,0)
kernel /vmlinuz ro root=LABEL=/ resume2=swap:/dev/sde3 vga=0x314
initrd /initrd.imgtitle Vine Linux (Previous kernel)
root (hd0,0)
kernel /vmlinuz.old ro root=LABEL=/ resume2=swap:/dev/sde3 vga=0x314
initrd /initrd.old.img

/etc/fstabを調べるとその内容は以下のようになっており、swapにはsde3というラベルがつけられていた。

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-sde3 swap swap defaults 0 0

dmesgで調べても/dev/sde3は存在していない。
 
fdiskで/dev/sdaの領域テーブルを参照すると次のようになっており、/と同一のデバイスにswap領域(swapのIdは82)は作成されていた。

デバイス Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 796 6289447+ 83 Linux
/dev/sda3 797 1050 2040255 82 Linux swap / Solaris
/dev/sda4 1051 38913 304134547+ 83 Linux

Vine Linuxのインストール時点の自動パーティション設定で「このインストールに使用するドライブの選択」のときSATAドライブをsdeと認識していたがそのままインストールを継続したためと思われる。
インストール完了後のSATAの認識では/のデバイスはsdaとなり不整合が発生したようだ。
 
また、インストール時に自動パーティション設定ではなくDisk Druidを使用してもsdeとして認識されているため同様の事象となると思われる。
 

対処

インストール時点でsdaと認識させる有効な方法がないものと思われることから、インストール完了後にgrub.confを修正することで対処する。

  • 現在のswapの状態を確認
    Vine Linuxにはswapinfoコマンドがないため、次のコマンドで代替して確認する。
    (現時点ではswapがない状態。)[root@example root]# top
    top – 14:33:29 up 7 min, 1 user, load average: 0.15, 0.65, 0.43
    Tasks: 80 total, 2 running, 78 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
    Mem: 2065580k total, 155604k used, 1909976k free, 8204k buffers
    Swap: 0k total, 0k used, 0k free, 52116k cached
    (Swapが0kとなっている)
     
    [root@example root]# cat /proc/swaps
    [root@example root]#
    (何も表示されない)
  • swapの設定と確認[root@example root]# mkswap -L SWAP-sda3 /dev/sda3 ←/dev/sda3をswap領域としてフォーマット(通常のインストールと同様にラベルをつける。)
    Setting up swapspace version 1, size = 2089213 kB
    LABEL=SWAP-sda3, UUID=d81dc64e-361b-4f49-822a-f9efecd03e88
    [root@example root]# swapon -L SWAP-sda3 ←スワップを有効化[root@example root]# top  ←topコマンドで確認
    top – 15:35:09 up 39 min, 1 user, load average: 0.35, 0.09, 0.03
    Tasks: 80 total, 1 running, 79 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
    Mem: 2065580k total, 157068k used, 1908512k free, 8560k buffers
    Swap: 2040244k total, 0k used, 2040244k free, 52540k cached
    (Swapが2040244k)
     
    [root@example root]# cat /proc/swaps  ←確認のためのコマンド
    Filename Type Size Used Priority
    /dev/sda3 partition 2040244 0 -1
    [root@example root]#
    (/dev/sda3が使用されている)
  • 再起動後のための設定/etc/grub.confを修正
    kernel /vmlinuz ro root=LABEL=/ resume2=swap:/dev/sde3 vga=0x314
    ↓
    kernel /vmlinuz ro root=LABEL=/ resume2=swap:/dev/sda3 vga=0x314
    

    /etc/fstabを修正
    fstab上に記述してある「LABEL=SWAP-sde3」を「LABEL=SWAP-sda3」に変更する。

    LABEL=SWAP-sde3 swap swap defaults 0 0
    ↓
    LABEL=SWAP-sda3 swap swap defaults 0 0
    
  • 再起動後、dmesgを確認し、「BIG FAT WARNING!!」がないことを確認する。また、 swapがsda3にあることを確認する。
    [root@example root]# dmesg|grep BIG
    Use CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.
    [root@example root]# dmesg|grep swap
    Kernel command line: ro root=LABEL=/ resume2=swap:/dev/sda3 vga=0x314
    Adding 2040244k swap on /dev/sda3. Priority:-1 extents:1 across:2040244k ←この行が表示されること
    [root@example root]#[root@example root]# top
    
    top - 15:40:09 up 1 min, 1 user, load average: 0.36, 0.16, 0.06
    Tasks: 80 total, 1 running, 79 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
    Mem: 2065580k total, 156928k used, 1908652k free, 8172k buffers
    Swap: 2040244k total, 0k used, 2040244k free, 52408k cached
    (Swapが2040244k)
    
    [root@example root]# cat /proc/swaps
    Filename Type Size Used Priority
    /dev/sda3 partition 2040244 0 -1
    [root@example root]#
    

趣味の部屋 スマホ/タブレットサイト 趣味の部屋 PCサイト