tech-toolchain archive

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

Re: creating FFS2 file-system with makefs on linux




On 29/09/20 10:04 pm, Pierre-Philipp Braun wrote:
Maybe you could build with something like

     nbmakefs -N tree/etc -x -F tree/METALOG.sanitised -s 2g -f 100000 netbsd.ffs tree/

Nice, thanks.  Is -x -F critical here?  I tried without it and I got the same post-resize corruption with FFSv1.

The -x and -F options just help ensure that all the files and file permissions in the image are the right ones. Without that you could find that files in your image have strange owners and permissions.

Is resize_root supposed to give results at the first run already? While seeing the boot message about resizing /, should I therefore be able to check the size of `/` right away, or I am supposed to reboot afterwards?

resize_root (the shell script in /etc/rc.d) should reboot the system for you. I bet you don't have all of the following in your /etc/rc.conf.

    resize_root=YES
    resize_root_flags=-p
    resize_root_postcmd="/sbin/reboot -n"

That resize_root_postcmd is important and I've just noticed that it isn't set by default. I almost certainly copied it from a Raspberry Pi build. Rebooting without the "-n" flag will cause all sorts of corruption.

Cheers,
Lloyd


Home | Main Index | Thread Index | Old Index