[Top][All Lists]

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

Re: Chainload grub to grub?

From: Pascal Hambourg
Subject: Re: Chainload grub to grub?
Date: Mon, 6 Mar 2023 15:45:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

Hello Michael,

Le 06/03/2023 à 10:11, Michael Peters a écrit :
Hi. I'm trying to figure out how to chainload one grub to another.

bios boot, not UEFI.
grub 2.06 built from source.

What GNU/Linux identifies as /dev/sdc has a CentOS 7.9 install with its own
/boot at /dev/sdc1 and the operating system root at /dev/sdc2. I have had
too many bad experiences with a shared /boot between multiple Linux
installs, especially when package managers like to rewrite the grub
configuration file.

What GNU/Linux identifies as /dev/sda has a "Linux From Scratch" install
with its own /boot at /dev/sda1 and the operating system root at /dev/sda2.

Switching the boot order in the bios every time I want to switch operating
systems is a royal pain in the arse, but I also don't want a shared /boot

What I would like to do is keep the /dev/sda (the drive with Linux From
Scratch) as the boot drive the bios sees, but have a menu entry that will
chain load the CentOS managed grub.

The chainloader target must be a valid boot sector. It can be a GRUB boot sector or any other boot loader. Here, I guess that Centos GRUB boot sector is in sdc, not sdc1 or sdc2. I do not know how to search for a whole partitioned drive or extract a whole drive id from a partition id. Installing the GRUB boot sector in an ext* partition is not recommended because this uses unreliable blocklists.

Other options:
- swap the boot drive (hd0) and the target drive with "drivemap"
- load GRUB core image /grub/i386-pc/core.img with "multiboot"
- load GRUB config file /grub/grub.cfg with "configfile"

Some pathsnames may be different in your distro, grub2 instead of grub.

reply via email to

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