Thu 02 May 2013 08:31:33 AM UTC, original submission:
The release is on ubuntu precise grub 1.99-21ubuntu3.9.
I have 4 servers, each with a 300GB main drive for Ubuntu roots.
Each is GPT partitioned with a BIOS Boot partition, a separate boot partition, and many [8] root partitions all sharing the same boot partition. This works great, and is easy to upgrade.
The problem is that the grub.cfg file generated by update-grub
has many repeated incorrect root=UUID=xxxxxxxxxxxxxxxxxxxxxxxx
parameters ending the linux vmlinuz lines.
One of the stock formating scripts in /etc/grub.d, specifically 30_os-prober has a significant error on blank line 217.
If I insert the following lines of code there, then the problem can be resolved:
##### ===== begin fix =====
LBOOTUUID="`blkid -o value -s UUID -d ${LBOOT}`"
echo " Found boot device ${LBOOT} UUID=${LBOOTUUID}" >&2
LROOTUUID="`blkid -o value -s UUID -d ${LROOT}`"
LPARAMS="`echo ${LPARAMS} | sed -e s/UUID=..................................../UUID=${LROOTUUID}/`"
echo " Found root device ${LROOT} UUID=${LROOTUUID}" >&2
echo " Fix ${LROOT} linux vm root=UUID=${LROOTUUID}" >&2
##### ===== end fix =====
For release just comment out the LBOOT stuff and the echo stuff.
The blkid tool provides the correct UUID for each partition.
The sed tool is used to patch in the correct UUID for each root.
The problem and resolution are rock solid on each of my servers.
This must be tested not just dual boot, but many [8] way boot.
There are many optimizations possible, there is no need to repeat invocations of the tools blkid and sed, they should be combined much earlier in the linux-boot-prober.
Anytime,
Doug
Douglas P Finch
Principal Software Developer and Consultant
-unavailable-
main: 253-863-3007
cell: 253-218-9313
|