Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: HOWTO: USB boot on 8 GB RPi4 with no SD card



On Jul 30, 2020, at 5:07 AM, Michael van Elst <mlelstv%serpens.de@localhost> wrote:

> bsd-lists%gromit.dlib.vt.edu@localhost (Paul Mather) writes:
> 
>> The FFS block size of 64K and fragment size of 8K are double the maximum you'd get by default (32K and 4K respectively) based upon the total file system size according to the newfs man page.
> 
> Look at the size of the filesystem and the size of the partition.


It's probably confusing, but I wasn't suggesting 64K block and 8K fragment sizes are invalid, just that I've never seen FFS file systems created with blocks that big. :-)  (I wonder what the maximum allow size is?  The newfs man page tops out at 32K.)

Looking at the filesystem vs. partition size you are right that there is a mismatch.  The cylinder group of 145792 8K fragments = 1166336K or 2332672 512-byte sectors.  However, the GPT FFS partition is smaller at only 2326528 512-byte sectors, and so the FFS data structures are referencing data beyond the end of the partition.

It looks like the FFS data structures cover the space occupied by the FFS partition + the unused space + secondary (backup) GPT data: 2326528 + 6139 + 4 + 1 = 2332672.

I guess this works in practice because during boot the mount is initially read-only.  Then, the resize_gpt and resize_root services will operate and I guess this fixes the problem with the root FFS file system being bigger than the partition in which it lives.

Cheers,

Paul.


Home | Main Index | Thread Index | Old Index