SteveSpencer
Posts: 351
Joined: Thu Mar 28, 2013 9:19 am
Location: Nottingham, UK

FAT32 partition size change

Thu Apr 13, 2017 8:11 am

I see in the newest release of Raspbian (2017-04-10) that the FAT32 partition has changed size.
Is there a particular reason for this?
Steve S
No, I can't think of anything funny that won't offend someone if they want it to...

hommar
Posts: 185
Joined: Sat Mar 25, 2017 1:55 pm
Location: Russia, Yekaterinburg

Re: FAT32 partition size change

Thu Apr 13, 2017 4:09 pm

The left hand doesn't know what the right hand is doing

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: FAT32 partition size change

Thu Apr 13, 2017 4:33 pm

To reduce the size a little. Why?

hommar
Posts: 185
Joined: Sat Mar 25, 2017 1:55 pm
Location: Russia, Yekaterinburg

Re: FAT32 partition size change

Thu Apr 13, 2017 9:34 pm

ShiftPlusOne wrote:To reduce the size a little. Why?
Script building was changed:
Old script:

Code: Select all

`expr $BOOT_SIZE \* 3`M
i.e. size all files on Mbytes on /boot *3
New script:

Code: Select all

$((BOOT_SIZE * 2 /512))
i.e. size all files on bytes on /boot *2

PS old script did not take into account small files

SteveSpencer
Posts: 351
Joined: Thu Mar 28, 2013 9:19 am
Location: Nottingham, UK

Re: FAT32 partition size change

Tue Apr 18, 2017 8:42 am

ShiftPlusOne wrote:To reduce the size a little. Why?
No just idle curiosity. I have scripts that I used to modify the root fs of the img files once downloaded and unzipped.
They stopped working because I had hard-coded the offset. I now do things properly by digging out the actual size, and everything works as it used to.
It is a shame really that the full version is slightly too large for most 4GB cards, as they are convenient for creating boot/root images where the boot stays on the SD, and the root is on a USB drive (not all Pi models, of course, support boot from USB).

Still, no real harm done, and firing on both cylinders again :)
Steve S
No, I can't think of anything funny that won't offend someone if they want it to...

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: FAT32 partition size change

Tue Apr 18, 2017 8:55 am

SteveSpencer wrote:They stopped working because I had hard-coded the offset. I now do things properly by digging out the actual size, and everything works as it used to.
Ah, I am surprised it worked for so long, given that the size of the partition was always calculated from the size of the files.
SteveSpencer wrote:It is a shame really that the full version is slightly too large for most 4GB cards, as they are convenient for creating boot/root images where the boot stays on the SD, and the root is on a USB drive (not all Pi models, of course, support boot from USB).
You should be able to just have bootcode.bin on the SD card, but boot the rest off USB, regardless of the pi model. If that doesn't work, NOOBS lite 2.4 can install rootfs to USB and keep boot on the sd card, which should work well on 4GB cards.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: FAT32 partition size change

Tue Apr 18, 2017 9:10 am

You should be able to just have bootcode.bin on the SD card, but boot the rest off USB, regardless of the pi model.
Where would I read more about that?

I always assumed that one has to have to have all of the usual /boot stuff on the SD card - including the kernel, the two *.txt files and all the overlays stuff. I'm guessing that you can redirect where it finds the kernel via config.txt, and that that would also pull in the overlays (from wherever the kernel is), but wouldn't config.txt itself still have to be on the SD card? (See footnotes).

Footnotes:
1) Not that any of this really matters much from a space conservation point of view, given that the size of all the files involved is so small (it's measured in those ancient units that used to matter so much: megabytes).

2) Also, once booted up, the SD card can be removed from the drive. The system doesn't access the SD card once it has booted.
If this post appears in the wrong forums category, my apologies.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: FAT32 partition size change

Tue Apr 18, 2017 9:15 am

Martin Frezman wrote:Where would I read more about that?
A little dated now, but the basic information is right https://www.raspberrypi.org/blog/pi-3-b ... rage-boot/

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: FAT32 partition size change

Tue Apr 18, 2017 9:38 am

ShiftPlusOne wrote:
Martin Frezman wrote:Where would I read more about that?
A little dated now, but the basic information is right https://www.raspberrypi.org/blog/pi-3-b ... rage-boot/
I think you mis-read my question. That URL is about "pure USB booting" which, although fashionable, is not what we were talking about.

The poster to whom I was responding (it may have been you; I can't check that right now, because I am writing this) said that you needed to put bootcode.bin (only) on the SD card. In a "pure USB boot", you don't need to put anything on the SD card.

So, to rephrase my question: Is it possible to do a hybrid boot (i.e., booting from the SD card for the /boot stuff, but with rootfs on USB) with only one file (bootcode.bin) on the SD card? (Or, as I always believed, do you still need the full coterie of /boot stuff to be on the SD card?)
If this post appears in the wrong forums category, my apologies.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: FAT32 partition size change

Tue Apr 18, 2017 11:06 am

Martin Frezman wrote: I think you mis-read my question.
I think you haven't read the article. It also talks about only having bootcode.bin on the SD card.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: FAT32 partition size change

Tue Apr 18, 2017 11:20 am

ShiftPlusOne wrote:
Martin Frezman wrote: I think you mis-read my question.
I think you haven't read the article. It also talks about only having bootcode.bin on the SD card.
I guess it is a case of tl;dr.

It'd be nice if you could just answer the question here. I'd be much obliged.
If this post appears in the wrong forums category, my apologies.

Return to “Raspbian”