[Buildroot] [PATCH 4/4] board/raspberrypi: auto-expand rootfs on first boot

Benoît Thébaudeau benoit at wsystem.com
Fri Aug 28 10:36:36 UTC 2015


Hi Jérôme,

On 27/08/2015 23:22, Jérôme Pouiller wrote:
> On Thursday 27 August 2015 11:02:02 Benoît Thébaudeau wrote:
>> Hi Vivien, Yann, all,
>>
>> On 22/08/2015 22:01, Benoît Thébaudeau wrote:
> [...]
>> So the initial contents of the unused space on the SD card seem to have an
>> influence, and there seems to be a bug somewhere (Linux, resize2fs,
>> genext2fs, tune2fs, or lack of call to e2fsck before calling resize2fs but
>> this would not be reliable with an online partition).
>>
>> Then I retried with a 16-GiB SD card on a Raspberry Pi B, and it was very
>> slow too. Same if the resize is performed on a PC. However, it's very quick
>> with raspi-config and the latest Raspbian image. The main difference seemed
>> to be the block size (4 KiB on Raspbian vs. 1 KiB with mke2img), so I
>> hacked mke2img to test with genext2fs -B 4096 and tune2fs -J size=4, but it
>> did not make things faster, only the image bigger (about 512 MiB, probably
>> the minimal size for 4-KiB blocks). So I don't know which ones, but it's
>> probably some ext4 parameters that are having an influence on the resize2fs
>> speed here. Any idea?
> Yes, I have an idea :-) Did you try sparse_super?

[...]

Awesome, it works, even if resizing the partition online. Thanks for the tip!

I'll send a patch changing mke2img to allow the use of this option.

Best regards,
Benoît


More information about the buildroot mailing list