発端
自分のPCはrEFIndを使ってWindows 10とArch Linuxをデュアルブートしているのですが、Windows updateをかけたらEFI領域を見事にぶっ壊されました。 なんやかんやで解決したので今後のためにも自分が行った解決方法を記しておきます。
症状
Windows updateをかけたあとrEFIndから vmlinuz-linux を起動しようとすると
Invalid loader file! Error: Not Found while loading vmlinuz-linux * Hit any key to continue *
こんな感じのエラーが。
解決方法
vmlinuz-linux がなんか知らんがおかしいらしく、起動しないので、Arch Linuxのインストールメディアを用いる。
あのArchLinuxInstallBattleに使うやつです。
おなじみコマンド。
sd{X1} とかは自分の環境にあったやつに置き換えてください。
# mount /dev/sd{X1} /mnt
# mount /dev/sd{X2} /mnt/boot
# arch-chroot /mnt
これでとりあえずLinuxに入る。
そして ip コマンドとか iw コマンドとか使ってネットにつないでください。
Free-Wifiがおすすめです( wpa_supplicant のCLIむずすぎない?)。
そしたら vmlinuz-linux を更新します。
# pacman -S linux
これで vmlinuz-linux はOK。
これでいいかと思ったらrEFInd君が探してくる vmlinuz から起動しようとしたら、
mount: /new_root: wrong fs type, bad option, bad superblock, on /dev/sda2, missing codepage or helper program, or other error
今度はbtrfs君が死んでいます(いや知らんが…)。
rEFIndの設定を見直して手動でブートディスクを指定します。
/boot/EFI/refind/refind.conf をこんな感じに。
menuentry Arch {
icon /EFI/refind/icons/os_arch.png
volume "Arch"
loader /vmlinuz-linux
initrd /initramfs-linux.img
options "root=/dev/sd{X1} ro"
submenuentry "Boot using fallback initramfs" {
initrd /initramfs-linux-fallback.img
}
submenuentry "Boot to terminal" {
add_options "systemd.unit=multi-user.target"
}
#disabled
}
loader と initrd は vmlinuz-linux があるファイルシステムのルートディレクトリからの相対パスにするらしい。
これ豆知識ね。
あと /refind_linux.conf があるとそっちの設定が読み込まれちゃうので refind_linux.conf.old とか適当にリネームしとく。
これでrEFIndの画面からArch Linuxのアイコンのやつを選択して起動!
起動したわw
まとめ
(大事なレポートや論文の提出間近にWindows updateは)してはいけない(戒め)。