Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Autoexpand of root file system after image copy - need something better
On Tue, Dec 26, 2017 at 12:15:16AM -0500, Alan Corey wrote:
> Seems like a simple solution would be to expand it to the size of the
> partition, or if there's no partition maybe ask. So you use your
> fdisk or gparted or whatever first if you know you want other things
> in part of the space. Then have the expansion respect the partition
> size. OpenBSD setup asks early on if you want to use the whole medium
> space. Same idea, this is when creating a disklabel I think. It also
> simplifies replacing the contents of a partition with part of another
> operation system for instance.
When using armv7.img or rpi.img you don't get a choice of
partitioning, you dd the img to your SD card, boot it and that's it,
you are running the full installation already. The first thing you
then can do is log in as root on the console (but before that, two
scripts in /etc/rc.d take care of the whole automatic resizing
business). A working system always needs a FAT partition to boot, and
a NetBSD installation then has a second partition with FFS and both
{armv7,rpi}.img provide both. In principle it is possible to provide
a working image for both, the FAT boot partition and the second
partition, have the user pre-partition the SD card and dd the two
images to the first two partitions and then really just expand to the
size of the second partion (i.e., just expand the filesystem, not the
partition), but this seems overly involved for a feature that probably
not too many people will use.
I have the impression that most people are quite happy with the
automatic resizing that is being done for the last two years and there
will probably be quite a few complaints if that is changed because
that is what people are used to now. At the most, a reasonable
compromise might be to not set resize_{disklabel,root}=YES in
/etc/rc.conf and instead ask the user to do that and reboot if they
want to resize the root partition, that at least would not require all
the steps of booting single user etc., which is a bit challenging if
you don't have a console of some sorts.
What about making the default /etc/rc.conf on {rpi,armv7}.img test for
a /boot/rc.conf and source it if it exists (I am not sure if this even
works, /boot might not be mounted yet at this point), then the user
can disable automatic resizing by adding resize_{disklabel,root}=NO to
/boot/rc.conf.
Instead of all this, if you really want more manual control, you can
always install using rpi_inst.img. That gives you a sysinst where you
have control over all the partitioning/labeling parameters.
Harold
Home |
Main Index |
Thread Index |
Old Index