help-grub
[Top][All Lists]
Advanced

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

Re: How to mount a "BIOS boot partition"?


From: Xen
Subject: Re: How to mount a "BIOS boot partition"?
Date: Wed, 05 Oct 2016 19:47:18 +0200
User-agent: Roundcube Webmail/1.2.0

Giovanni Gherdovich schreef op 05-10-2016 19:41:
On Sat, Oct 1, 2016 at 12:51 AM, Xen <address@hidden> wrote:
Giovanni Gherdovich schreef op 30-09-2016 20:25:

Hello,

I'd like to install two different linux distributions and use grub to
boot into one or the other. I have a dedicated grub partition on
/dev/sda1 and two other partitions for the OSes. /dev/sda1 appears to
be a "BIOS boot partition" to tools like parted(8), fdisk(8) or
gdisk(8).


As far as I know the "BIOS Boot Partition" does not contain any filesystem but only the Grub image. It is the space you need that would otherwise be
put somewhere between the MBR and the first partition.

I think you do not need to run grub2-install on /dev/sda1, but on /dev/sda,
though, and it will pick the boot partition automatically(?).

Your boot directory is just going to be on any regular filesystem that you
have access to. In your case that is /dev/sda4, apparently.

So I think you simply need to be installing on /dev/sda.

In case you want to move your boot files off of /dev/sda4, you could split
/dev/sda1 (it doesn't need to be 500MB, 1 or 2MB would be fine).

So you would delete it, create a new first partition of /dev/sda1, then another dedicated boot partition /dev/sda2 (you can use a tool like parted to renumber your gpt partitions) and then your remaining partitions will shift until /dev/sda5, you will now have 5 partitions, including one new
"regular boot partition" containing an actual filesystem (like ext2).

Regards.

Thanks, that worked like a charm.

I did exactly what you suggested (I used gdisk to manipulate the partitions).
After that I went with

   grub2-install --boot-directory=/mnt/boot /dev/sda

and it just did the right thing: put the core.img file on the filesystem-less "bios boot partition", which it found on its own; core.img then was pointing to a grub2 binary located in /mnt/boot, i.e. the mount point of my newly created
ext2 regular boot partition.

Haha, but core.img is in that partition-less space, and it is your grub menu that points to (is loaded from) your ext2 regular boot partition. Yes I guess your core.img would point to that after install. It just doesn't point to a binary, but only text and resource files, I think.

Well, no that's wrong, it obviously loads modules. Anyway.

Hope it helps, and thanks for the feedback. Regards.



reply via email to

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