我问如何更改uuid,/boot/grub/grub.cfg以便 grub 可以加载指定分区上的操作系统。
我有两个磁盘:
两个磁盘包含相同的内容(Ubuntu 根目录),但分区 uuid 不同,因为 的内容是从以下sda1克隆的sdb1clonezilla
问题是/boot/grub/grub.cfg自动生成的包含:
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 47d9205b-00a8-40e5-88d6-e8b9571799a7
else
search --no-floppy --fs-uuid --set=root 47d9205b-00a8-40e5-88d6-e8b9571799a7
fi
echo 'Loading Linux 4.4.0-146-generic ...'
linux /boot/vmlinuz-4.4.0-146-generic root=UUID=47d9205b-00a8-40e5-88d6-e8b9571799a7 ro quiet splash $vt_handoff
Run Code Online (Sandbox Code Playgroud)
表明 grub 选择 Ubuntu root 而sdb1不是sda1,而我希望它选择sda1。
我尝试直接替换所有47d9205b-00a8-40e5-88d6-e8b9571799a7, …