It looks like the kernel doesn't expect a "dk" block device to be read-only. I'm trying to offer an adm64-install.img file to a domU as follows: disk = [ 'format=raw, vdev=0x6, access=ro, target=/images/NetBSD-9.99.64-amd64-install.img' ] extra = "root=dk1" Here's what happens [ 1.0000000] xenbus0 at hypervisor0: Xen Virtual Bus Interface [ 1.0000000] xencons0 at hypervisor0: Xen Virtual Console Driver [ 1.0000000] entropy: WARNING: extracting entropy too early [ 2.0040596] xenbus0: can't get state for device/suspend/event-channel (2) [ 2.0040596] xbd0 at xenbus0 id 6: Xen Virtual Block Device Interface [ 2.0100586] xennet0 at xenbus0 id 0: Xen Virtual Network Interface [ 2.0100586] xennet0: backend features 0x4<RX-COPY> [ 2.0100586] pool redzone disabled for 'xnfrx' [ 2.0100586] xennet0: MAC address 00:16:3e:48:de:51 [ 2.0110604] xbd0: 3814 MB, 512 bytes/sect x 7811072 sectors [ 2.0110604] xbd0: backend features 0x1<CACHE-FLUSH> [ 2.0120591] balloon0 at xenbus0 id 0: Xen Balloon driver [ 2.0120591] balloon0: current reservation: 4096000 KiB [ 2.0250884] dk0 at xbd0: "EFI system", 262144 blocks at 2048, type: msdos [ 2.0250884] dk1 at xbd0: "2de8ef15-25bf-444d-a440-1bcfb035c514", 7544832 blocks at 264192, type: ffs [ 2.0260598] swwdog0: software watchdog initialized [ 2.0260598] WARNING: 1 error while detecting hardware; check system log. [ 2.0260598] boot device: dk1 [ 2.0260598] opendisk: can't open dev dk1 (30) [ 2.0260598] root on dk1opendisk: can't open dev dk0 (30) [ 2.0260598] opendisk: can't open dev dk1 (30) [ 2.0260598] vfs_mountroot: can't open root device [ 2.0260598] cannot mount root, error = 30 [ 2.0260598] root device (default dk1): If I change the access mode to "rw" it works fine, but then the root filesystem is mounted "rw" too, even on the install image: [ 2.0300698] dk0 at xbd0: "EFI system", 262144 blocks at 2048, type: msdos [ 2.0300698] dk1 at xbd0: "2de8ef15-25bf-444d-a440-1bcfb035c514", 7544832 blocks at 264192, type: ffs [ 2.0311210] swwdog0: software watchdog initialized [ 2.0311210] WARNING: 1 error while detecting hardware; check system log. [ 2.0311210] boot device: dk1 [ 2.0320665] root on dk1 [ 2.0430645] xenbus0: can't get state for device/suspend/event-channel (2) [[ .... ]] # df Filesystem 1K-blocks Used Avail %Cap MountedOn /dev/dk1 3648078 2641724 823952 76% / tmpfs 3907632 8 3907624 0% /tmp # mount /dev/dk1 on / type ffs (local) tmpfs on /tmp type tmpfs (local) Is this intended? How might I allow for a read-only xbd0 and thus read-only root on dk1? -- Greg A. Woods <gwoods%acm.org@localhost> Kelowna, BC +1 250 762-7675 RoboHack <woods%robohack.ca@localhost> Planix, Inc. <woods%planix.com@localhost> Avoncote Farms <woods%avoncote.ca@localhost>
Attachment:
pgp2wxHEiSJTM.pgp
Description: OpenPGP Digital Signature