这个问题与其他类似问题略有不同。
我有一个 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.
十分感谢你的帮助!
答案1
我发现这个教程是有关 GRUB2 的最佳信息来源 -http://www.dedoimedo.com/computers/grub-2.html#mozTocId398970。