help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-install to a partition


From: Barry Jackson
Subject: Re: grub-install to a partition
Date: Fri, 08 Oct 2010 13:36:02 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-UK; rv:1.9.2.12pre) Gecko/20101007 Lightning/1.0b2 Lanikai/3.1.6pre

On 08/10/10 10:21, Jordan Uggla wrote:
On Fri, Oct 8, 2010 at 1:29 AM, Barry Jackson<address@hidden>  wrote:
I want to chainload into a system on sda21 from a dedicated grub2 on sda1
with :-

menuentry 'Mandriva 2010.1 x86-64' {
search --no-floppy --label --set 2010_1_64_root
chainloader +1
}

Loading grub's core.img via multiboot is more reliable than
chainloading. For example:

menuentry 'Mandriva 2010.1 x86-64' {
   search --no-floppy --label --set 2010_1_64_root
   multiboot /boot/grub/core.img
}

Thanks Jordan,
Yes that works, however I see a snag in that Mandriva does not support grub2, so kernel updates will not automatically update core.img. On the other hand the links vmlinuz and initrd.img will be updated, so it would be better to use those.


which works fine if the system on sda21 uses legacy grub.

I just installed grub2 to that system built from source (1.97~beta4) and
with the bootloader in the MBR it boots fine, but after using :-

grub-setup --force --root-directory=/ /dev/sda21

Don't use grub-setup directly, use grub-install.

I tried grub-install --force first and chainloading still failed.

...from within that system it fails to chainload from my dedicated grub
partition.
All I see is "loading" then a black screen and it reboots.
/boot/grub/core.img and grub.cfg do exist.

I had difficulty stopping it jumping into a legacy stage1.5 which was
embedded in the start of sda21 - I finally cured that with dd zeroing out
the first 480 bytes of the partition.
grub-setup still fails to embed core.img though, but with --force it should
still chainload IIUC.
I can boot the system directly with:-

menuentry 'Mandriva 2010.1 x86-64' {
linux (hd0,21)/boot/vmlinuz
initrd (hd0,21)/boot/initrd.img
}

This can be rewritten to use labels like this:

menuentry 'Mandriva 2010.1 x86-64' {
   search --no-floppy --label --set 2010_1_64_root
   linux /boot/vmlinuz
   initrd /boot/initrd.img
}

Now this I like! :-)
Using this I see no reason to have any grub installed in the booted system at all. Just my grub2 dedicated partition booting the symlinks directly - clean and simple with no references to sdxxx or uuids which is what I was looking for - also no second menu gets displayed.

Many thanks for the tips,

Barry


...but that uses sdaxx device identifiers which I am trying to avoid in
favour of labels.

Is there a later version that fixes this?

Thanks - Barry

_______________________________________________
Help-grub mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-grub






reply via email to

[Prev in Thread] Current Thread [Next in Thread]