4 ms·
It should be doable with the following rc.d configuration: resize_disklabel=YES resize_root=YES The second script is available by default, but the first o
by cnst 7y ago
It should be doable with the following rc.d configuration:
resize_disklabel=YES
resize_root=YES
The second script is available by default, but the first one is somehow hidden from general availability:
* http://bxr.su/n/distrib/utils/embedded/files/resize_disklabel http://bxr.su/n/distrib/utils/embedded/files/resize_disklabe...
* http://bxr.su/n/etc/rc.d/resize_root http://bxr.su/n/etc/rc.d/resize_root
You can fetch it raw, it seems to work great:
cd /etc/rc.d/
ftp http://bxr.su/raw/NetBSD/distrib/utils/embedded/files/resize_disklabel
chmod +x resize_disklabel
The `resize_disklabel` script does handle `fdisk`, too. If it doesn't work for your usecase, might want to provide the output of running `/etc/rc.d/resize_disklabel` manually, together with `fdisk` and `disklabel` outputs, too.
P.S. BTW, you probably don't want to run `resize_root onestart` once the system is running multiuser — it passes `-y` to `resize_ffs`, which causes temporary filesystem corruption if the filesystem is running in `rw` mode.
- ddevault 7y agoAye, but that doesn't seem to work. Check out the genimg script - it's already trying to set up resize_root. I've also tried resize_disklabel without success. What this needs isn't another well-meaning HN comment trying to debug by proxy - I need someone who knows how NetBSD works to get their hands dirty and get it done.
- cnst 7y agoThe resize_root script wouldn't do anything if the fdisk and disklabel aren't adjusted (provided it's not a raw filesystem file that's being resized as in http://wiki.netbsd.org/amazon_ec2/build_your_own_ami/ http://wiki.netbsd.org/amazon_ec2/build_your_own_ami/ page), so it's kind of expected that it doesn't work all by itself, and that https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/images/netbsd/genimg https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/images/... is wrong.