chwe
Posts: 116
Joined: Tue Jul 31, 2018 1:35 pm

/boot not on FAT for RPi4

Thu Jun 27, 2019 9:55 pm

With the recent changes, e.g. boot binary yet on SPI flash, do we have a chance to get the new RPi booted from ext4 directly? For those want to argue about pro and con of such an approach, I'm not interested in this discussion. ;)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23352
Joined: Sat Jul 30, 2011 7:41 pm

Re: /boot not on FAT for RPi4

Thu Jun 27, 2019 10:00 pm

I don't think so. We would have to write a bootloader to recognise EXT4 as well as the current formats, and I don't think there will be enough space in the EEPROM. I vaguely remember someone talking about it, and the engineer who writes the bootloaders making a very strange face.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
rpdom
Posts: 14987
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: /boot not on FAT for RPi4

Thu Jun 27, 2019 10:40 pm

If anything, exFAT would be more useful as that is the default for larger SD cards. But I understand that might raise problems with licencing.

dickon
Posts: 386
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: /boot not on FAT for RPi4

Thu Jun 27, 2019 10:49 pm

Personally, I recommend ZFS on a remote host via tftp...

Hopefully soon?

Getting fed up with having to faff with the uSD card when breaking things. Much easier to just edit a textfile and bounce the power.

chwe
Posts: 116
Joined: Tue Jul 31, 2018 1:35 pm

Re: /boot not on FAT for RPi4

Fri Jun 28, 2019 11:32 am

jamesh wrote:
Thu Jun 27, 2019 10:00 pm
I don't think so. We would have to write a bootloader to recognise EXT4 as well as the current formats, and I don't think there will be enough space in the EEPROM. I vaguely remember someone talking about it, and the engineer who writes the bootloaders making a very strange face.
thanks for the fast response.. well I would happily lose fat capability with a 'custom boot.bin' clearly not as a default for everyone, raspian relies on it but it would be a nice feature. I guess if it's not available from the BSP you got from broadcom it will probably never appear.

Aydan
Posts: 688
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: /boot not on FAT for RPi4

Fri Jun 28, 2019 1:16 pm

I'd prefer a move towards grub or u-boot booted from MBR, both can read a multitude of file systems.

dickon
Posts: 386
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: /boot not on FAT for RPi4

Fri Jun 28, 2019 1:31 pm

Out of interest, why? It isn't as if you ever want to put anything on a boot partition other than stuff needed to boot, and FAT32 is more or less universally supported on virtually everything (for good or ill).

The only reason I want full-network boot is then it'll be snapshotted and backed up with all the rest of the network-backed infrastructure I have here, and it also makes upgrades stress-free.

User avatar
rpdom
Posts: 14987
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: /boot not on FAT for RPi4

Fri Jun 28, 2019 3:26 pm

Aydan wrote:
Fri Jun 28, 2019 1:16 pm
I'd prefer a move towards grub or u-boot booted from MBR, both can read a multitude of file systems.
MBR relies on x86 instructions. It is possible to emulate the ones required, but seems pointless.

fbe
Posts: 494
Joined: Thu Aug 17, 2017 9:08 pm

Re: /boot not on FAT for RPi4

Fri Jun 28, 2019 6:45 pm

rpdom wrote:
Fri Jun 28, 2019 3:26 pm
MBR relies on x86 instructions. It is possible to emulate the ones required, but seems pointless.
The MBR has an area that is reserved for bootcode. The bootcode should at least start with x86 instructions that avoid unexpected behavior if a x86 system accidentically tries to boot, using this MBR. E.g. the first instructions could simply stop any further processing on x86 systems. The Pi could skip over these first bytes. The remaining bytes could be filled with instructions for ARM.

epoch1970
Posts: 3556
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: /boot not on FAT for RPi4

Fri Jun 28, 2019 7:30 pm

dickon wrote:
Fri Jun 28, 2019 1:31 pm
Out of interest, why? It isn't as if you ever want to put anything on a boot partition other than stuff needed to boot, and FAT32 is more or less universally supported on virtually everything (for good or ill).

The only reason I want full-network boot is then it'll be snapshotted and backed up with all the rest of the network-backed infrastructure I have here, and it also makes upgrades stress-free.
Network boot is fine but that’s one use case

The current read-the-kernel-and-overlays-from-FAT design is not compatible with multi boot or A/B OTA update systems. Chainbooting via something like uboot becomes mandatory then.

FAT, MBR and DOS disklabel are just terrible. Want to use more than 3 partitions? Enters extended partitions, one fierce hack if I’ve seen any.
Don’t want to use extended partitions? Then you need hybrid GPT/MBR formatting, another fateful hack.

Something has to be done I think. Perhaps making uboot support “official” is the easiest path?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “General discussion”