grub-mkrescue: paths/disks are not updated in grub.cfg
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub |
New
|
Undecided
|
Unassigned | ||
grub2 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: grub2
Hello,
Ubuntu (grub2 1.99) is installed on a Usb drive.
I needed to create a boot cd for my system since the boot disk is failing more and more and I have NO USB BIOS support.
1. So after installation, I ran with root rights:
grub-mkrescue --output=cd.iso /boot
In that case, I get the image with inside:
/boot/grub/i386-pc/ {grub.cfg, eltorito.img & the modules}
/{kernel, initrd and the content of my boot folder in the system, INCLUDING THE GRUB FOLDER, which become in the image /grub
/boot/grub/i386-pc/ grub.cfg text is:
insmod part_acorn
insmod part_amiga
insmod part_apple
insmod part_bsd
insmod part_gpt
insmod part_msdos
insmod part_sun
insmod part_sunpc
source /boot/grub/grub.cfg
However, as told above, the original grub.cfg image from my system is on the CD in /grub/grub.cfg. So it IS NOT SOURCED BY GRUB AND I GET DIRECTLY TO THE CLI WHILE BOOTING.
2. I tried:
sudo grub-mkrescue --output=cd.iso /boot/grub
In that case, I get the image with inside:
/boot/grub/i386-pc/ {grub.cfg, eltorito.img & the modules}
/{the content of my system's boot/grub folder, i.e. modules and grub.cfg at the root of my CD.}.
So it is not sourced by the command "source /boot/grub/
3. To get the right path (/boot/
sudo grub-mkrescue --output=cd.iso /
i get:
-------
aure@aure-
Enabling BIOS support ...
xorriso 0.5.6 : RockRidge filesystem manipulator, libburnia project.
xorriso : FAILURE : Cannot determine attributes of source file ''
xorriso : sys : No such file or directory
-------
I do not understand these messages...
4. SOLUTION:
I copied the /boot folder in a temporary other folder, let's say /root/ttt
I use this folder in the command:
sudo grub-mkrescue --output=cd.iso /root/ttt
that way I get on the cd my original system's grub.cfg in /boot/grub/
-> Therefore, the grub-mkrescue command should adapt the source command to access the right file parsing the path passed as an argument.
-> The command should also include any required file (unicode.pf2, gfx etc.) inside the CD and change the references of the grub.cfg file to point to the CD's files. But as I state in the bug (721545), any file should be copied in /boot to eliminate all the problems of accessible files at once and solve all.
Thank you, I do not know C a lot so cannot play with that.
PS: May be somehow linked to the bug I just reported (721545) which highlights that the paths management is sometimes wrong, but this can be solved separately since it copies the system grub.cfg.
This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.