MacBook上无法从安装Debian的USB启动盘启动的问题求助
MacBook上无法从安装Debian的USB启动盘启动的问题求助
我想在只有两个USB接口的MacBook上把Debian安装到U盘,让它可以从这个U盘直接启动。操作流程是这样的:先通过第一个USB口的Debian Live启动盘开机,接着用Debian安装程序把系统部署到第二个USB口的U盘里。安装完成后系统提示Debian已成功安装,但我却没法从这个安装好系统的U盘启动。
分区信息
Live系统所在U盘的分区情况:
Device: /dev/sdc1, Boot: *, Size: 3.2G, Id:0, Type: Empty Device: /dev/sdc2, Boot: , Size: 5M, Id:ef, Type: EFI (FAT-12/16/32)
安装了Debian的目标U盘分区情况:
Device: /dev/sdd1, Boot: , Size: 99M, Id:c, Type: W95 FAT32 (LBA) Device: /dev/sdd2, Boot: , Size: 14.5G, Id:83, Type: Linux
尝试过的修复操作
从Debian LiveU盘启动后,我尝试给目标U盘重装引导,执行了以下命令:
sudo mount /dev/sdd2 /mnt sudo mount --bind /dev /mnt/dev sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys sudo chroot /mnt grub-install /dev/sdd update-grub
结果grub-install /dev/sdd返回了错误:
Installing for x86_64-efi platform. grub-install error: cannot find EFI directory
有没有大佬知道怎么解决这个问题,让这个U盘能正常启动啊?
更新内容
按照ChanganAuto的建议,我在chroot之前加上了sudo mount /dev/sdd1 /mnt/boot/efi这一步,现在grub-install看起来能正常运行了:
user@debian:~$ sudo mount /dev/sdd1 /mnt/boot/efi user@debian:~$ sudo chroot /mnt root@debian:/# grub-install /dev/sdd Installing for x86_64-efi platform. grub-install: warning: EFI variables are not supported on this system.. Installation finished. No error reported.
不过update-grub执行时出现了警告:
root@debian:/# update-grub Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-6.1.0-18-amd64 Found initrd image: /boot/initrd.img-6.1.0-18-amd64 Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
但即便完成了这些操作,目标U盘还是没法启动...
备注:内容来源于stack exchange,提问作者dokondr




