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: Jordan Uggla
Subject: Re: grub-install to a partition
Date: Fri, 8 Oct 2010 02:21:18 -0700

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
}

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

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

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

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)



reply via email to

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