pop-os / installer

Installer for Pop!_OS & other Linux-based OSes
https://system76.com/pop
GNU General Public License v3.0
26 stars 15 forks source link

Require minimum ESP size of 1 GB #276

Closed crawfxrd closed 1 year ago

crawfxrd commented 1 year ago

With the requirement of adding the NVIDIA drivers to initramfs, we are approaching the limit of 500 MB. Increase the minimum required size so new installs will not run out of space.

crawfxrd commented 1 year ago

Alternatively, we could require a /boot partition and keep the kernels off the ESP. The boot partition would need to be 1 GB, but the ESP could be reduced to 200 MB.

leviport commented 1 year ago

Would that work more easily with default ESP sizes that are created by other OSes? I think Windows makes one that's around 300gb, so oftentimes installing Pop on a drive that has already had Windows installed on it can cause issues if the user doesn't manually expand the ESP first.

crawfxrd commented 1 year ago

ESP doesn't need to be big if it's not holding the kernels.

For example, I have a system with Fedora and Windows installed.

Fedora uses grub, creates a 1 GiB /boot partition, and a 200 MiB /boot/efi partition. 3 kernels are stored on /boot and the bootloader is on /boot/efi.

/dev/mapper/fedora-boot xfs      1014M  316M  699M  32% /boot
/dev/nvme0n1p1          vfat      200M   32M  169M  16% /boot/efi
# du -sh /boot/efi/EFI/*
1.0M    /boot/efi/EFI/BOOT
5.2M    /boot/efi/EFI/fedora
26M /boot/efi/EFI/Microsoft
leviport commented 1 year ago

I like the sound of that. It sounds like it'd make the eventual "Install alongside" feature a bit easier to implement later since the ESP won't need to be expanded.

isantop commented 1 year ago

@crawfxrd One note is that I believe the area where the kernels are stored must be formatted using a partition format that the firmware can understand, meaning /boot would need to be outside of encrypted/LVM systems and likely formatted as FAT.

crawfxrd commented 1 year ago

ESP must be FAT16 or FAT32. (Technically not required by edk2, but Microsoft.)

/boot can be anything the shim bootloader can read, so can be ext4 or XFS for example. This also extends to LVM and encrypted devices, but support for encrypted /boot has always been a headache. I think Fedora still doesn't allow it.

Of course, this is with grub. Would need to see how limited systemd-boot is in this regard.

mmstick commented 1 year ago

Needs similar changes to be applied to distinst

linuxgnuru commented 1 year ago

We typically have three as well, current, oldkern, and recovery which on my system is close to 400MB.

root@pop-os:~# du -sh /boot/efi/*
4.0K    /boot/efi/339c38e55e6260576ce5249c6103eb80
373M    /boot/efi/EFI
28K /boot/efi/loader
22M /boot/efi/system76-firmware-update

root@pop-os:~# du -sh /boot/efi/EFI
373M    /boot/efi/EFI
root@pop-os:~# du -sh /boot/efi/EFI/*
104K    /boot/efi/EFI/BOOT
4.0K    /boot/efi/EFI/Linux
249M    /boot/efi/EFI/Pop_OS-8cfa500d-f864-4436-b978-f783d0a53d00
125M    /boot/efi/EFI/Recovery-B67A-9C02
104K    /boot/efi/EFI/systemd
mmstick commented 1 year ago

Yeah clean install is one of the automatic layouts in distinst