Grub font file should be in /boot, not /usr
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Expired
|
Low
|
Unassigned |
Bug Description
Good morning everyone.
Having some troubleshoot with the internal HD of my laptop, I installed Ubuntu 10.10 on a usb drive (in ext4) in /dev/sdb2 - (hd1,msdos2).
The /boot is actually /dev/sda - (hd0,msdos1) formated in ext because the first 32 MB of my internal hard drive are still accessible and it avoids my to need a boot CD. Grub2 is on the mbr of the internal HD. Version 1.98 ubuntu 3.1 but I tried 1.99 has the same problem.
When Grub2 boots. I have a message stating that grub2 cannot get C/H/S of partition (hd1,msdos2), which is normal since there is no BIOS support in my (old) laptop but it finally boots after some seconds waiting on the error message (or show me the menu if I press shift) without any problem since it loads the kernel and initrd from internal HD, then recognizes the USB with the kernel/module and uses it as root.
After investigation, i found that in /boot/grub/
-------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_
set saved_entry=
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set c9083da5-
if loadfont /usr/share/
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 8812973d-
set locale_
set lang=fr
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.
### BEGIN /etc/grub.
set menu_color_
set menu_color_
### END /etc/grub.
### BEGIN /etc/grub.
ETC ETC.
-------
As you can see, after the load_video function, there is:
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set c9083da5-
if loadfont /usr/share/
set gfxmode=640x480
load_video
insmod gfxterm
fi
which of course cannot work since the Usb HD is not accessible yet.
These lines come from the execution of 00_header:
if [ "x$gfxterm" = x1 ]; then
# Make the font accessible
prepare_
cat << EOF
if loadfont `make_system_
set gfxmode=
load_video
insmod gfxterm
fi
-------
which uses /usr/lib/
is_path_
{
path=$1
# abort if path doesn't exist
if test -e $path ; then : ;else
return 1
fi
# abort if file is in a filesystem we can't read
if ${grub_probe} -t fs $path > /dev/null 2>&1 ; then : ; else
return 1
fi
return 0
}
and also prepare_
It seems this function replies positively whereas the fs is not accessible at boot time because the filesystem is of a recognized type and the path exists to the system.
Strange thing, the first time I installed 10.10 it was working but after a while & reinstalling not anymore.
May be the gfx sceen was disabled for some reason so it did not execute this part of the code. I don't see any option and anyway that would just be a workaround.
I tried using --root-
1. Everything needed for grub2 should just be copied in /boot to ensure it is accessible and no reference to anything else should be made (outside of a personal script for some reasons).
2. So the system does not detect that some disk is not available at boot time before the kernel is loaded. If impossible to detect automatically what is available to the Bios, the configuration screen of grub2 should ask (when asking for where to install grub2) for it.
3. No Usb disk driver for grub2 ? I saw some tries on the net but I should just be included in grub2 if it works.
I can read some script but not very familiar with, so I could not fix it myself but if someone is involved, I could help but make it go slower than an expert alone !
Thanks in advance, If we can fix all these stuff, the system will be perfect and grub2 is very powerful.
Bye
affects: | grub → grub (Ubuntu) |
no longer affects: | grub (Ubuntu) |
Changed in grub2 (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
importance: | Wishlist → Low |
summary: |
- Root partition on Usb - boot without Usb bios support. + Grub font file should be in /boot, not /usr |
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.