系統啟動時未安裝加密設備,可手動使用BusyBox

系統啟動時未安裝加密設備,可手動使用BusyBox

透過最近的更新,我被迫使用引導修復來修復我的引導磁區。

以前,當啟動到 Ubuntu 時,我會在啟動時提示輸入密碼來解密我的根分割區。現在我被丟到 BusyBox 並沒有安裝根。在 BusyBox 上,我可以透過下達以下指令來手動掛載根目錄:cryptsetup open /dev/sda3 crypt然後mount /dev/vgkubuntu /。之後退出 BusyBox 似乎可以正常啟動並恢復正常啟動。

如何引導和掛載根目錄,而不必每次都從 BusyBox 手動執行此操作?

GRUB 設定:

load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
else
  search --no-floppy --fs-uuid --set=root aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
fi
linux   /vmlinuz-5.11.0-16-generic root=/dev/mapper/vgkubuntu-root ro  quiet splash $vt_handoff
initrd  /initrd.img-5.11.0-16-generic

謝謝

答案1

看來重新安裝核心映像就可以了。

相關內容