Public bug reported:

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/grub.cfg" in the default 
file read by the eltorito.img core.

3. To get the right path (/boot/grub/grub.cfg) for my system's file 
(/boot/grub/grub.cfg), I tried
sudo grub-mkrescue --output=cd.iso /
i get:
---------------------------------
aure@aure-VGN-A517B:/$ sudo grub-mkrescue --output=/root/cd.iso /
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/grub.cfg.


-> 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.

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/721560

Title:
  grub-mkrescue: paths/disks are not updated in grub.cfg

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to