Re: Changing disk image boot options without root privileges

2017-04-16 Thread Taylor R Campbell
> Date: Sun, 16 Apr 2017 13:48:30 +0300 > From: Andreas Gustafsson > > vnconfig vnd0 NetBSD-7.99.1-amd64-live-wd0root.img > installboot -e -o console=com0 /dev/vnd0a > vnconfig -u vnd0 > > but the problem is that it requires root privileges, which the > automated test infrastructure doesn'

Re: Changing disk image boot options without root privileges

2017-04-16 Thread Andreas Gustafsson
I played around with rump a bit and the following seems to work: #!/bin/sh img=./NetBSD-7.99.1-amd64-live-wd0root.img export RUMP_SERVER=unix:///tmp/installboot_rumpserv offset=$(disklabel $img | awk '/ a:/ { print $3 }') size=$(disklabel $img | awk '/ a:/ { print $2 }') rump_server -l

Re: Changing disk image boot options without root privileges

2017-04-16 Thread Izumi Tsutsui
> How is the image made bootable in an unprivileged build ? > The same can probably be used to change the boot option. installboot(8) against a single raw ffs partition, then MBR and swap etc. for the whole image are concatenated by cat(1): https://nxr.netbsd.org/xref/src/distrib/common/bootimage

Re: Changing disk image boot options without root privileges

2017-04-16 Thread Andreas Gustafsson
Izumi Tsutsui wrote: > - prepare "serial console liveimage option" to build.sh by > - using INSTALLBOOTOPTIONS (see distrib/common/bootimage/Makefile.bootimage) > - special boot.cfg(5) to set consdev=com0 I'd like to avoid building special images for testing, because that would mean the image be

Re: Changing disk image boot options without root privileges

2017-04-16 Thread Andreas Gustafsson
Manuel Bouyer wrote: > How is the image made bootable in an unprivileged build ? It first builds an image of the root partition, runs installboot on that, and then constructs the full disk image by concatenating the initial label area and the root partition using "cat". See src/distrib/common/boo

Re: Changing disk image boot options without root privileges

2017-04-16 Thread Manuel Bouyer
On Sun, Apr 16, 2017 at 01:48:30PM +0300, Andreas Gustafsson wrote: > Hi all, > > The build.sh script has a "live-image" target, but the resulting live > images are not being systematically tested. I would like to set up > automated tests for them, but I'm stuck on the issue below. > > The i386

Re: Changing disk image boot options without root privileges

2017-04-16 Thread Izumi Tsutsui
> vnconfig vnd0 NetBSD-7.99.1-amd64-live-wd0root.img > installboot -e -o console=com0 /dev/vnd0a > vnconfig -u vnd0 > > but the problem is that it requires root privileges, which the > automated test infrastructure doesn't (and shouldn't) have. > > Is there a way to accomplish this without

Changing disk image boot options without root privileges

2017-04-16 Thread Andreas Gustafsson
Hi all, The build.sh script has a "live-image" target, but the resulting live images are not being systematically tested. I would like to set up automated tests for them, but I'm stuck on the issue below. The i386 and amd64 live images are configured to use the PC VGA console, but for the automa