どうも不安定なので memtest86+ かけようとしたんだけど、reboot したら grub が keyboard に反応しなかったので、
/etc/default/grub でコメントアウトされてた
grub が
仕方ないので、Live USB から Ubuntu 16.04 LTS 立ち上げて以下のようにリカバリした。
まず、ZFS root が / に mount 出来ないので mountpoint を移動すると共に、mount 後、必要なディレクトリを bind し chroot
/etc/default/grub でコメントアウトされてた
#GRUB_PRELOAD_MODULES="usb usb_keyboard ehci ohci uhci"をアンコメントして update-grub した後 reboot かけたら
grub が
error: disk '(hd0, gpt2)' not foundとか言い出して、boot 出来なくなり酷い目にあった。
仕方ないので、Live USB から Ubuntu 16.04 LTS 立ち上げて以下のようにリカバリした。
まず、ZFS root が / に mount 出来ないので mountpoint を移動すると共に、mount 後、必要なディレクトリを bind し chroot
# zfs set mountpoint=/rpool/ROOT/ubuntu rpool/ROOT/ubuntu # zfs mount -a # for i in /dev /proc /run /sys /tmp; do mount -o bind $i /rpool/ROOT/ubuntu$i; done # chroot /rpool/ROOT/ubuntu/etc/default/grub の変更箇所を元に戻して update-grub
# update-grub /usr/sbin/grub-probe: error: failed to get canonical path of `/dev/ata-PLEXTOR_PX-256M5S_P02303100828-part2'.上記のように grub-probe が /dev/ 直下にシンボリックリンクを要求するので、ln で作成。
# ln -s /dev/disk/by-id/ata-PLEXTOR_PX-256M5S_xxxxxxxxxxxx-part2 /dev/改めて update-grub
# update-grub Generating grub configuration file ... Found background image: ubuntu-16.04-wallpaper.png Found linux image: /boot/vmlinuz-4.13.0-19-generic Found initrd image: /boot/initrd.img-4.13.0-19-generic Found linux image: /boot/vmlinuz-4.4.0-103-generic Found initrd image: /boot/initrd.img-4.4.0-103-generic Found linux image: /boot/vmlinuz-4.13.0-19-generic Found initrd image: /boot/initrd.img-4.13.0-19-generic Found linux image: /boot/vmlinuz-4.4.0-103-generic Found initrd image: /boot/initrd.img-4.4.0-103-generic Failed to probe /dev/sda1 for filesystem type grub-probe: error: cannot find a GRUB drive for /dev/sdg1. Check your device.map. Adding boot menu entry for EFI firmware configuration done/dev/sdg1 がみつからないから device.map 見ろとか言われてるけど、これ、Live USB のドライブ
# ls -l /dev/disk/by-id/|grep sdg lrwxrwxrwx 1 root root 9 Dec 11 05:54 usb-_silicon-power_xxxxxxxxxxxxxxxx-0:0 -> ../../sdg lrwxrwxrwx 1 root root 10 Dec 11 2017 usb-_silicon-power_xxxxxxxxxxxxxxxx-0:0-part1 -> ../../sdg1 lrwxrwxrwx 1 root root 10 Dec 11 2017 usb-_silicon-power_xxxxxxxxxxxxxxxx-0:0-part2 -> ../../sdg2とりあえず無視して chroot を抜ける
# exitbind 切って、ZFS root を unmount して mount point も / に戻したら reboot
for i in /dev /proc /run /sys /tmp; do umount /rpool/ROOT/ubuntu$i; done zfs umount /rpool/ROOT/ubuntu zfs set mountpoint=/ rpool/ROOT/ubuntu reboot以上で無事復旧した。
タグ
コメントをかく