tech-userlevel archive

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

Re: Changing disk image boot options without root privileges



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 -lrumpvfs -lrumpdev -lrumpdev_disk -d key=/rdk0a,hostpath=$img,offset=${offset}b,size=${size}b,type=chr $RUMP_SERVER
  LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=path=/rump installboot -e -o console=com0 /rump/rdk0a
  rump.halt

It ought to be possible to pass "disklabel=a" to rump_server instead
of figuring out the partition offset and size and passing
"offset=${offset}b,size=${size}b", but that doesn't currently work,
presumably because rump_server only searches for a disklabel in the
first 64 k of the disk but the default partition offset is now 1 M.
This also means the cgd example in the rump tutorial at
http://www.netbsd.org/docs/rump/sptut.html no longer works.
-- 
Andreas Gustafsson, gson%gson.org@localhost


Home | Main Index | Thread Index | Old Index