我将此脚本粘贴到Ubuntu上的Grub自定义程序的源代码部分,以创建windows条目。但是我从另一台电脑上复制了这个脚本。此代码中的A23-C8F4部分在我的pc for Windows中是不同的,在哪里可以从windows文件中找到这段代码。密码在哪里?
insmod part_gpt
insmod fat
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 1A23-C8F4
else
search --no-floppy --fs-uuid --set=root 1A23-C8F4
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi发布于 2015-10-03 19:23:18
这是分区的UUID,您在其中安装了该操作系统,当您启动系统时,它将在此设备中搜索引导加载程序。因此,您可以通过使用命令在UUID中的/etc/fstab中看到
cat /etc/fstab或
ll /dev/disk/by-uuid/或
sudo blkid在我的系统里
....
else
search --no-floppy --fs-uuid --set=root a119cedc-3e53-4c17-8bdc-a6878c29adc9
....和
ll /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 100 Oct 3 16:32 ./
drwxr-xr-x 4 root root 80 Oct 3 18:32 ../
lrwxrwxrwx 1 root root 10 Oct 3 16:32 44a67255-60f1-44e6-8c3d-bdfc5a517c29 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 3 16:32 a119cedc-3e53-4c17-8bdc-a6878c29adc9 -> ../../dm-0而/etc/fstab条目是
# /boot was on /dev/sda1 during installation
UUID=44a67255-60f1-44e6-8c3d-bdfc5a517c29 /boot ext2 defaults 0 2对于ntfs分区,UUID的大小可能有所不同,所以不要为这件事操心。
https://askubuntu.com/questions/681207
复制相似问题