News for hackers. Stuff that matters.
Re:Fedora considers deprecating legacy BIOS by mjg59 on Thursday April 21, 2022 @06:00AM (#31107590)
- previously, x86 MBR-style partition tables (which were the only thing really supported in Linux) gave you no strong semantic information about what a partition was[1]. GPT may involve GUIDs, but in the grand scheme of things that's a small part of the cost of mounting stuff.

- FAT is old, and FAT is well-supported by basically anything, and what features do you want in the partition that contains your bootloader that FAT doesn't support?

- Yeah in an ideal universe we wouldn't have to deal with PE binaries and we wouldn't have to deal with the Windows 64-bit calling convention for jumping into the firmware and also we've solved all of this shit and it just isn't a big deal any more. We can look at any platform and complain about the implementation details, but at least this one is better documented than the BIOS interface ever was.

In summary: Linux has to boot on computers that exist, and most computers that exist have UEFI. The Linux community has had the opportunity to make meaningful improvements to the UEFI spec in a way that wasn't true with BIOS. UEFI isn't ideal, but it's better than what came before in this respect.

[1] Partitions could be identified as "Linux", but that gave you no information about what they were or where they should be mounted. Current systemd-driven development has allowed us to define the partition mount point as part of the GPT data, which means they can be automatically mounted in the correct place without static configuration about partition layout

Re:Fedora considers deprecating legacy BIOS by qwerty456127 on Thursday April 21, 2022 @06:46AM (#31107831)
> what features do you want in the partition that contains your bootloader that FAT doesn't support?

Well, I'd love to be able to drop a bunch of 8GB (notably FAT doesn't support files this big) LiveDVD disk images on a bare file system and see them in the computer's built-in boot-menu immediately. I already enjoy the fact I don't need a traditional boot loader (like GRUB) to handle multi-OS as I can have 2 independent EFI boot partitions (one for Windows and one for Linux) and use the computer's boot menu too choose which to boot from.

Ideally the whole OS should be just a read-only boot image and a traditional partition should only be used for config/data files IMHO.

Re:Fedora considers deprecating legacy BIOS by tremon on Thursday April 21, 2022 @09:17AM (#31108963)
I can have 2 independent EFI boot partitions and use the computer's boot menu too choose which to boot from.

You don't need 2 EFI boot partitions for this -- you can have multiple boot loaders in the same EFI partition, each with its own entry in the boot menu. In fact, this is how I boot: the default entry boots the linux kernel directly from the EFI partition (some UEFI implementations require the kernel to have a .efi extension, others don't), and I have separate fallback entries for refind and shellx64 in case I need to boot with different kernel parameters.

Re:Fedora considers deprecating legacy BIOS by Macha on Thursday April 21, 2022 @07:59AM (#31108329)
> Well, I'd love to be able to drop a bunch of 8GB (notably FAT doesn't support files this big) LiveDVD disk images on a bare file system and see them in the computer's built-in boot-menu immediately. I already enjoy the fact I don't need a traditional boot loader (like GRUB) to handle multi-OS as I can have 2 independent EFI boot partitions (one for Windows and one for Linux) and use the computer's boot menu too choose which to boot from.

Different systems have different constraints. For example, loading the firmware interface on my systems so it can present a boot menu is way, way slower than rEFInd or Grub. And presents an ugly menu in a non-native resolution for my monitors. And doesn't let me override kernel parameters adhocly at boot time if needed (thought it has been a number of years since I have, I'm reluctant to let go of the option).

Re:Fedora considers deprecating legacy BIOS by brobinson on Thursday April 21, 2022 @07:31AM (#31108110)
Ventoy can do this: small EFI partition with keys you can enroll in SecureBoot and a fat second partition you drop all your ISOs onto.
Re:Fedora considers deprecating legacy BIOS by Nextgrid on Thursday April 21, 2022 @10:36AM (#31109990)
GRUB can also do this. In fact, I'd be in favour of deprecating GRUB as the default for UEFI on Linux distros as it's a huge codebase (including lots of legacy things) which is overkill for booting a single OS (the Linux kernel itself can be a UEFI application, no bootloader needed) but for this use-case it's perfect as it's essentially its own mini-OS and can handle a wide array of filesystems including LUKS, Linux mdadm RAID, LVM, etc.
Re:Fedora considers deprecating legacy BIOS by horsawlarway on Thursday April 21, 2022 @01:33PM (#31112582)
To be fair - some distros are moving away from GRUB as the default.

Pop!Os uses systemd-boot (formerly gummi-boot) by default if you're on an UEFI system, and only falls back to GRUB for legacy bios.

Arch is also much easier to setup on systemd-boot.

The issue is that GRUB still has a very compelling support matrix - it'll work basically everywhere, and with most all configurations. So if you're already running a batteries included distro, where someone else is doing most of the configuration and the downstream systems are hugely variable (old consumer hardware) - then GRUB still makes the most sense.

Re:Fedora considers deprecating legacy BIOS by mjg59 on Thursday April 21, 2022 @07:01AM (#31107920)
That's a reasonable desire, but it's also not something that's supported by traditional BIOS - UEFI isn't any worse in this respect
Re:Fedora considers deprecating legacy BIOS by mmphosis on Thursday April 21, 2022 @02:28PM (#31113373)
The first and only instruction that runs is on the “read-only” boot image which can be the whole OS. The solid state image is read-only because the tab is physically in the read-only position. The is the entire specification for booting.
Re:Fedora considers deprecating legacy BIOS by zozbot234 on Thursday April 21, 2022 @06:54AM (#31107883)
> notably FAT doesn't support files this big

ExFAT can support those. You could also use the UDF file system.

Re:Fedora considers deprecating legacy BIOS by qwerty456127 on Thursday April 21, 2022 @07:04AM (#31107935)
But ExFAT lacks the FAT's virtues of being universally supported and royalty-free, yet still is a very dumb FS with no journal (which means unreliable) and no extended attributes (which means data-metadata separation impossible) so I don't see a reason for it to exist anywhere outside severely resource-limited embedded applications. I would rather use Ext4 everywhere for everything. Is the problem preventing wide adoption of Ext4 GPL?
Re:Fedora considers deprecating legacy BIOS by speeder on Thursday April 21, 2022 @09:27AM (#31109088)
Seemly ExFAT is specially unreliable... Nintendo Switch community first advice when you buy one is: If you buy a SD Card with ExFAT, reformat it to FAT, because ExFAT will eventually cause your files to be corrupted...
Re:Fedora considers deprecating legacy BIOS by babypuncher on Thursday April 21, 2022 @01:37PM (#31112638)
That may have more to do with Nintendo's implementation. The exFAT support that was added to the Linux kernel a few years ago has been fine.
Re:Fedora considers deprecating legacy BIOS by oynqr on Thursday April 21, 2022 @02:46PM (#31113622)
The Switch has a bad exfat driver.
Re:Fedora considers deprecating legacy BIOS by Beltalowda on Thursday April 21, 2022 @10:50AM (#31110160)
A EFI partition is mostly read-only, so I don't think that's a particularly large problem?

> I would rather use Ext4 everywhere for everything. Is the problem preventing wide adoption of Ext4 GPL?

The BSDs don't support ext{2,3,4} particularly well, and Linux doesn't support FFS/UFS particularly well. I mean, there's support for these things, but it's far from complete or perfect and it's taken a long time.

It's just a fair amount of effort to implement filesystems well, and there's very little tolerance for errors. Ext4 isn't spectacularly complicated, but it's not exactly a simple FS either. I think that has more to do with lack of support than anything else: lots of effort for not all that much practical benefit.

Re:Fedora considers deprecating legacy BIOS by Macha on Thursday April 21, 2022 @08:02AM (#31108343)
NTFS hasn't been widely adopted by firmware manufacturers either. I don't think firmware manufacturers want to spend time implementing support for even the NTFS/ext/APFS era of filesystems, never mind anything newer like ZFS or btrfs.
Re:Fedora considers deprecating legacy BIOS by vetinari on Thursday April 21, 2022 @09:36AM (#31109195)
NTFS was also undocumented, and whatever the ntfs-3g folks or others working on alternate implementation figured out, it was via reverse engineering.
Re:Fedora considers deprecating legacy BIOS by Macha on Thursday April 21, 2022 @01:19PM (#31112366)
Sure, but the manufacturers presumably play for licenses for the AMD AGESA, etc. so could pay for a NTFS license if they wanted to.

And ext has plenty of documentation and they haven't implemented that either.

So I think keeping down the software complexity is the more likely method. Down to

1. The limited software investment these companies make (often just buying and reskinning firmware from AMI)

2. The limited space available on the ROMs due to hardware cost savings (e.g. companies have had to drop GUIs or support for less popular APUs to add support for new generations of mainstream CPU in firmware updates)

Re:Fedora considers deprecating legacy BIOS by qwerty456127 on Thursday April 21, 2022 @02:18PM (#31113234)
> NTFS hasn't been widely adopted by firmware manufacturers either.

Although very complex and very undocumented, NTFS has actually been adopted very widely and quite reliably. Most of the pre-smart TVs and set-top-boxes can read FAT and NTFS USB drives which makes NTFS the only choice if you want movies exceeding 4 GiBs.

Re:Fedora considers deprecating legacy BIOS by AshamedCaptain on Thursday April 21, 2022 @02:24PM (#31113311)
In fact NTFS is available on most commercial UEFI implementations. You can use NTFS to format your Windows install pendrive...
Re:Fedora considers deprecating legacy BIOS by blueflow on Thursday April 21, 2022 @07:00AM (#31107914)
ExFAT is not supported by EFI.
Re:Fedora considers deprecating legacy BIOS by dinosaurdynasty on Thursday April 21, 2022 @09:44AM (#31109280)
> what features do you want in the partition that contains your bootloader that FAT doesn't support?

Atomic updates and not getting corrupted if the power is pulled/lost while the filesystem is being written to.

Re:Fedora considers deprecating legacy BIOS by StillBored on Thursday April 21, 2022 @01:24PM (#31112436)
I suspect your thinking about FAT as a general purpose filesystem rather than the uEFI System Partition (ESP). For the latter case, one simply serializes access to the FAT/directory and renames files into their final resting place. That is going to be as robust and uncorruptable as any of the more "advanced" file systems jouraling mechanisms. Sure you might have a lost FAT chain, or a FAT chain mismatch between FAT copies, but its not going to cause a boot problem and a FAT "fsck" operation done during boot is going to be the equivalent of throwing the incomplete journal entries away, and probably just as fast given most ESP's contain a less than a dozen files.

So, not a problem, with the huge advantage FAT can be implemented/validated/etc in a few dozen lines of code.

KISS

Re:Fedora considers deprecating legacy BIOS by zozbot234 on Thursday April 21, 2022 @06:49AM (#31107852)
> previously, x86 MBR-style partition tables (which were the only thing really supported in Linux) gave you no strong semantic information about what a partition was[1]

LVM appears to solve this issue as well as the related issue of only supporting a limited number of partitions in BIOS.

Re:Fedora considers deprecating legacy BIOS by chasil on Thursday April 21, 2022 @08:00AM (#31108331)
I believe that btrfs can be whole-disk and avoid partitions entirely, which would drastically simplify things.

The only snag is swap, which I don't believe can be on a subvolume.

vgchange is a struggle for me, from the first time I saw it in HP-UX.

Re:Fedora considers deprecating legacy BIOS by asveikau on Thursday April 21, 2022 @12:29PM (#31111583)
> The only snag is swap, which I don't believe can be on a subvolume.

Linux can make swap a regular file, even. It doesn't need to be a partition.

Google result shows: https://wiki.archlinux.org/title/swap#Swap_file

Re:Fedora considers deprecating legacy BIOS by StillBored on Thursday April 21, 2022 @01:54PM (#31112886)
And its something you want to do for security reasons anyway, since linux by default isn't encrypting swap partitions. Putting swap on an LUKs encrypted partition is a bit of a PITA but allows one to hibernate/resume without fear that ones private keys end up in plaintext stored on a disk.
Re:Fedora considers deprecating legacy BIOS by forty on Thursday April 21, 2022 @06:16PM (#31115850)
And relevant to OP, you cannot hibernate on Linux with secure boot enabled, I think precisely because Linux doesn't know how to sign/encrypt the RAM dump (no idea how it's actually called)
Re:Fedora considers deprecating legacy BIOS by StillBored on Thursday April 21, 2022 @10:14PM (#31117486)
Well, its an artificial limitation on secure boot in the Linux kernel pending some cleaups, and is fairly trivial to work around if your willing to comment out the line in question build your own kernel and sign it with a key of your own creation you have enrolled in the firmware.

The problem is less about linux being capable of encrypting/protecting the swap file and more around being able to assure that is true. So like many Linux kernel issues recently its less technical, more political.

So, as I mentioned previously its entirely possible with off the shelf distro's to enable encrypted swap, the average user just has to choose between hibernate, assuring the swap is secure, and secure boot. Its a bit irritating, but seems to be low priority as the focus seems to be on suspend or hibernate without secure boot.

Re:Fedora considers deprecating legacy BIOS by zhfliz on Thursday April 21, 2022 @02:49PM (#31113665)
until kernel 5.0 swap files were not supported on btrfs.

there's also some limitations, see https://btrfs.readthedocs.io/en/latest/btrfs-man5.html#swapf...

Re:Fedora considers deprecating legacy BIOS by asveikau on Thursday April 21, 2022 @04:39PM (#31114883)
I don't think these limitations are that major, and not everybody uses btrfs either.
Re:Fedora considers deprecating legacy BIOS by StillBored on Thursday April 21, 2022 @01:51PM (#31112851)
Most (all?) linux filesystems work just fine against raw devices. They are simply unaware of the difference. The larger problem is firmware trying to find partition tables/etc in the middle of a filesytem, but even then its mostly a non issue because random data doesn't tend to look like partition tables or MBRs.
Re:Fedora considers deprecating legacy BIOS by Dwedit on Thursday April 21, 2022 @05:10PM (#31115233)
FAT filesystems tend to get the cluster chains corrupted, then all your files are suddenly truncated to exactly 1 cluster long.

So I'd rather use EXT3 or NTFS because of Journaling, and not FAT.

[dead]
Re:Fedora considers deprecating legacy BIOS by dralley on Thursday April 21, 2022 @12:02PM (#31111243)
Matthew left Red Hat 10 years ago. If you're going to "full disclosure" people, you should probably do a better job with the details.
Re:Fedora considers deprecating legacy BIOS by homarp on Thursday April 21, 2022 @11:22AM (#31110648)
workED for Red Hat, per wikipedia: https://en.m.wikipedia.org/wiki/Matthew_Garrett

Right now at Aurora

Re:Fedora considers deprecating legacy BIOS by edgyquant on Thursday April 21, 2022 @10:57AM (#31110264)
I don’t think this is an important detail, if anything it may skew people against them as it seems they have corporate interests
[dead]
Re:Fedora considers deprecating legacy BIOS by mjg59 on Thursday April 21, 2022 @06:13AM (#31107667)
I'm responsible for a great deal of the UEFI support on x86 Linux systems. You're absolutely free to have concerns about a lot of the political and social positions I hold, but this is a topic where I am literally a domain expert. If you disagree with me on this subject, present technical arguments.
Re:Fedora considers deprecating legacy BIOS by mwcampbell on Thursday April 21, 2022 @09:16AM (#31108955)
As a newcomer to this thread, just wanted to say thanks for bringing your domain expertise to this discussion even though you're certainly not obligated to do so. And, though I presume you've been paid for at least some of the work you've done on Linux UEFI support, thanks for that as well. I'm thankful that someone is willing to go to the trouble to make Linux relatively easy to boot and install on modern PCs, though I imagine the desktop Linux space isn't very lucrative.
Re:Fedora considers deprecating legacy BIOS by scrollaway on Thursday April 21, 2022 @06:14AM (#31107675)
As an outsider to this debate, you’re the hostile party. You’re replying with name calling to someone who gave you a respectful and detailed answer.
Re:Fedora considers deprecating legacy BIOS by howinteresting on Thursday April 21, 2022 @12:53PM (#31111937)
blueflow's favorites list is remarkably revealing.
Re:Fedora considers deprecating legacy BIOS by blueflow on Thursday April 21, 2022 @06:01PM (#31115722)
i fixed it! thanks for reminding me.
Re:Fedora considers deprecating legacy BIOS by blueflow on Thursday April 21, 2022 @01:21PM (#31112397)
Check the screenshot i posted in your sister post and guess why the font colors are off.