Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Do I really need a boot partition?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Fri Jun 07, 2024 9:25 am    Post subject: [Solved] Do I really need a boot partition? Reply with quote

Hi folks

I've been experimenting with Gentoo on virtual machines, but I'm starting to feel confident enough to try again on real hardware. However, I can't sacrifice a working system. In particular, I have a machine with an old Windows and an old Fedora, and it has to dual boot. I can overwrite the old Fedora installation, but I can't touch the Windows stuff. This means that I can't (safely) change the partition layout.

So I can overwrite the old Fedora with a new Gentoo, but I don't have a spare partition for /boot.

I don't normally create separate boot partitions for Linux, except on Raspberry Pi which requires one in FAT format, as I recall. The Gentoo installation instructions say (with MBR) to format the boot partition and the root partition using XFS, so I'm guessing that the separate /boot isn't compulsory.

But I've made so many incorrect assumptions about Gentoo already, that I'm loathe to make another one, and end up with a broken system.

BR, Lars.


Last edited by lars_the_bear on Wed Jun 26, 2024 8:55 am; edited 1 time in total
Back to top
View user's profile Send private message
xgivolari
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2021
Posts: 102

PostPosted: Fri Jun 07, 2024 10:01 am    Post subject: Reply with quote

What is your current partition layout, exactly? And are you using legacy BIOS/MBR or UEFI/GPT?
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2435

PostPosted: Fri Jun 07, 2024 10:18 am    Post subject: Re: Do I really need a boot partition? Reply with quote

lars_the_bear wrote:
Hi folks

I've been experimenting with Gentoo on virtual machines, but I'm starting to feel confident enough to try again on real hardware. However, I can't sacrifice a working system. In particular, I have a machine with an old Windows and an old Fedora, and it has to dual boot. I can overwrite the old Fedora installation, but I can't touch the Windows stuff. This means that I can't (safely) change the partition layout.

So I can overwrite the old Fedora with a new Gentoo, but I don't have a spare partition for /boot.

I don't normally create separate boot partitions for Linux, except on Raspberry Pi which requires one in FAT format, as I recall. The Gentoo installation instructions say (with MBR) to format the boot partition and the root partition using XFS, so I'm guessing that the separate /boot isn't compulsory.

But I've made so many incorrect assumptions about Gentoo already, that I'm loathe to make another one, and end up with a broken system.

BR, Lars.


It looks like you have a computer with an old BIOS/MBR boot. If that's the case, refer to the relevant sections of the handbook. Yes, you don't need a boot partition.

If you have a an EFI computer, you already have an ESP, i.e efi system partition which is the boot partition. Without it your system won't boot as the EFI firmware requires the bootloader to be there by specification.

Best Regards,
Georgi
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Fri Jun 07, 2024 11:47 am    Post subject: Reply with quote

Thanks.

In my general incompetence, I assumed that my 2012 laptop would not support EFI. The old Fedora on it had nothing in /sys/firmware/efi, anyway.

Turns out I was wrong. I had done all the set-up steps assuming no EFI, right up until 'grub install'. Then I got a poke in the eye when grub said it was installing for EFI.

So I forced it to do an MBR install using '--target i386-pc' and it seems fine. grub-mkconfig even detected the old Windows installation and, surprisingly, it boots fine.

There's some existing EFI stuff in the first partition from, I guess, some previous Linux, or perhaps Windows. Dunno.

Weirdly, os-prober also detected 'Max OS/X' on one partition, which I've never used, and wouldn't expect to run on this kind of hardware. Oh, well.

So it looks like I dodged a bullet. But whether I've now got some kind of freaky franken-boot that will bite me later, I'm not sure.

BR, Lars.

[edit: it turns out that the 'Max OX/X' partition that os-prober detected was actually on the Gentoo installation USB stick' ;) ]
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22673

PostPosted: Fri Jun 07, 2024 1:53 pm    Post subject: Reply with quote

OS probing is a best effort based on finding byte patterns on the device that are commonly used by the reported system. In some cases, it can report incorrect results if the device has a foreign byte pattern present.

Although too late now, you could also have chosen to shrink the Fedora installation to make room to place Gentoo after it. That is more complicated to get right, but would have let you keep Fedora.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Fri Jun 07, 2024 2:59 pm    Post subject: Reply with quote

Hu wrote:

Although too late now, you could also have chosen to shrink the Fedora installation to make room to place Gentoo after it. That is more complicated to get right, but would have let you keep Fedora.


Yeah, thanks, fair enough. It's not keeping Fedora that's the problem -- I think it was Fedora 12 or something like that. If I created new partitions, I could adapt to that in Linux. I'm just not sure what would happen in Windows if all the drive letters changed. I just don't know Windows well enough to take that risk. I don't use Windows often, but I can't avoid it completely.

BR, Lars.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Fri Jun 07, 2024 7:02 pm    Post subject: Reply with quote

lars_the_bear,

A boot partition is not required on modern hardware. It's an old custom.
It came about because HDD grew (several times) to the point where the BIOS could not read all of the drive.
The small boot partition at the start of the drive ensured that the BIOS could read all the files needed to boot the system.

EFI systems require a VFAT formatted EFI System Partition but this is not the same as the boot partition, if you have one.
It can be but need not be.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2435

PostPosted: Fri Jun 07, 2024 7:38 pm    Post subject: Reply with quote

NeddySeagoon wrote:
lars_the_bear,

A boot partition is not required on modern hardware. It's an old custom.
It came about because HDD grew (several times) to the point where the BIOS could not read all of the drive.


Correct me if I'm wrong, but don't you need a boot partition if you're using disk encryption?

Isn't it created for security reasons as well?

Best Regards,
Georgi
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Sat Jun 08, 2024 7:50 am    Post subject: Reply with quote

logrusx wrote:
Correct me if I'm wrong, but don't you need a boot partition if you're using disk encryption?


That's exactly the kind of subtlety I was concerned about :/

BR, Lars.
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 496

PostPosted: Sat Jun 08, 2024 7:58 am    Post subject: Reply with quote

lars_the_bear wrote:
logrusx wrote:
Correct me if I'm wrong, but don't you need a boot partition if you're using disk encryption?


That's exactly the kind of subtlety I was concerned about :/


You can encrypt /boot. In this case you need a bootloader that is able to decrypt prior to load the system. It is also possible to encrypt /boot with LUKS1 and the rest of the system with LUKS2.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Sat Jun 08, 2024 8:55 am    Post subject: Reply with quote

logrusx,

With EFI booting, if you use grub too, it can deal with encryption.
The EFI firmware cannot decrypt anything so the EFI System Partition must be unencrypted.
With EFI and a stub kernel, the built in initrd can deal with encryption.

With BIOS booting, grub is in three parts. I'm not sure which part provides the decryption functions so some of it must be in unencrypted space.

If you want whole disk encryption, the boot partition should be on USB stick in your pocket that only gets fitted for booting. It's not mounted for booting.
The USB stick needs several validated and tested backups.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
FastTurtle
Guru
Guru


Joined: 03 Sep 2002
Posts: 499
Location: Flakey Shake & Bake Caliornia, USA

PostPosted: Fri Jun 28, 2024 2:46 pm    Post subject: Reply with quote

Thanks Lars for asking a question I was going to ask and Thankyou Neddy Seagoon for confirming what I'd finally started to understand from the handbook.

Now if only /EFI mounted on the ESP solves the grub not finding the EFI directory. Haven't tested as yet but if it does, then minor edit to the handbook with All Caps for /EFI so grub quits throwing that error duing install
_________________
AsRock B550 Phantom Gaming 4
128GB 3200 Mhz memory
1TB NVME as the boot disk
4x 4TB Sata - 2x 2TB Sata SSD - 4x 450GB SaS - 3x 900GB SaS - 72GB SaS for Gentoo system disk
LSI 9300-16i in HBA mode for all spinning disks
Radeon 6800 (Non XT) for GPU
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Sat Jun 29, 2024 2:49 pm    Post subject: Reply with quote

FastTurtle,

You can mount the ESP anywhere you like when you change its contents.
grub has a command line option, with a default value.
If you choose a non-default location for the mount point, you need to tell grub about it.

The ESP is not mounted during booting.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum