这个问题与其他类似问题略有不同。
我有一个 Ubuntu 生产系统的克隆映像,并计划将它传播到两个不同的分区(例如,/dev/sda1、/dev/sda2)。
如何设置,让用户可以选择启动哪一个?
以下是我到目前为止所做的。
1. boot from rescue cd
2. add a new file /etc/grub.d/11_boot_2 in /dev/sda1
3. point uuid in 11_boot_2 to /dev/sda2
4. chroot to /dev/sda1, and run update-grub
5. modify /etc/fstab in /dev/sda2 to use different mount point
重新引导时,GRUB 菜单显示第二个引导选项。但是选择它之后,引导以(initramfs)提示结束。uuid 应该是正确的,否则启动会打印出类似“没有这样的文件系统”的错误。
所以我的问题是:
1. Is any step above wrong, or did I missing anything?
2. At the initramfs stage, what could I do to troubleshoot?
3. Is there any way to enter "grub rescue"?
I end up in grub rescue before and I can test boot there.
But this time, the system didn't stop at grub rescue.
4. Exactly what stage is initramfs during the whole boot process?
That may tell me what is right so far, and what may be wrong.
非常感谢你的帮助!
我发现本教程是有关 GRUB2 的最佳信息来源 - http://www.dedoimedo.com/computers/grub-2.html#mozTocId398970。