Grub2 grumbles

Rajinder Yadav devguy.ca-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Nov 9 08:03:26 UTC 2010


On 10-11-09 12:31 AM, D. Hugh Redelmeier wrote:
> Context:
>
> I'm installing Ubuntu 10.10 on my Acer Revo to use as a Home Theatre PC.
> Mostly as a MythTV client.
>
> Sadly, I expect I might use the Win7 on it to get a performant Flash (the
> ION makes video fast but Flash on Linux doesn't exploit that whereas Flash
> on Win7 does).
>
> For peculiar reasons that I've mentioned previously, I'm intending to use
> XBMC as a Myth client for now.
>
> The XBMC ppa's don't support Ubuntu 10.10 -- still 10.04.  I found
> that building XBMC for 10.10 wasn't trivial.
>
> So: I installed Ubuntu 10.04 for now
>
> Summary: I need to triple boot:
>    Ubuntu 10.10
>    Ubuntu 10.04
>    Windows 7
>
> I use 10.10's Grub2 as the bootloader that chooses amongst these
> things.
>
> Complaints:
>
> grub-set-default with a label doesn't seem to work.  Perhaps it will
> work with a number, but talk about fragile!  (I just tested: a
> number doesn't work either)
>
> With Grub1, I used to be able to edit /boot/grub/menu.lst to customize
> the menu.  Now the equivalent (/boot/grub/grub.cfg) is automatically
> generated and not to be touched.  There is no clean and simple way for
> me to take control (I don't count writing those arcane scripts as a
> solution)
>
> Consequences:
>
> - I need to run grub on 10.10 whenever I update a kernel on 10.04.
>    That's because the grub configuration thinks it knows how to load
>    10.04's kernel rather than just chainloading
>
> - I expect this will break down when the 10.10 and 10.04 kernels
>    diverge in parameters.  After all, the 10.10 grub configuration
>    is supplying the parameters to the 10.04 kernel
>
> - the labels update-grub generates for the menu entries are not good.
>    I could do much better if it would let me.
>
>    It goofs up on the Windows partitions.  It calls the "recovery
>    partition" (the one that can wipe your system back to the state
>    it was delivered in):
>    	Windows Vista (loader) (on /dev/sda1)
>    and the real Win7 partition:
> 	Windows 7 (loader) (on /dev/sda2)
>    Those are quite ugly and increase the chance someone will blow away
>    the system.  I'd like to be able to suppress the recovery partition
>    menu item.
>
>    It doesn't bother to mention the version of the release in the
>    label.  So 10.10 and 10.04 kernels look alike (but it does mention
>    the partition, so those who remember what is in /dev/sda6 will
>    be OK).
>

True /boot/grub/grub.cfg is automatically generated each time you 
install grub 2, however once you have it, you can edit it by hand, don't 
let the warning scare you. If you mess up you can generate the grub 
config file again

FYI: you can remove menu entries you don't want of re-arrange them, 
place win-7 sys recovery at the bottom! just look for menuentry, 
something like this

menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
         insmod part_msdos
         insmod ntfs
         set root='(hd0,msdos1)'
         search --no-floppy --fs-uuid --set aa1ccf831ccf48d1
         drivemap -s (hd0) ${root}
         chainloader +1
}


Here is some info on grub 2:

https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB%202

basic steps to re-install grub 2

drop into rescue mode, mount your / root filesystem

make sure you mount your /boot partition if it's on a separate 
partition. regenerate grub install config list:

   sudo update-grub
   grub-probe -t device /boot/grub
   sudo grub-install /dev/<sdXXX>
   sudo grub-install --recheck /dev/<sdXXX>

where <sdXXX> is the partition to your /boot or / root if you didn't 
create a separate /boot partition

incidentally <sdXXX> should be the same partition that grub-probe spit out

-- 
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely

GNU/Linux: 2.6.35-22-generic
Kubuntu x86_64 10.10 | KDE 4.5.1
Ruby 1.9.2p0 | Rails 3.0.1
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list