Port-xen archive

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

Re: xbd and large sectors



FWIW, there's a workaround for this. And really, only a *workaround*, not 
a permanent solution, so...please keep at it! :-)

In Linux one can setup loop[0] devices to make block devices 
from files. Kinda like vnconfig(8) in NetBSD. And for some reason that 
makes a 512-byte-sectorsize blockdevice from it:

 $ losetup --show -f /dev/vg0/netbsd-disk0 
 /dev/loop0
 
 $ blockdev --getss --getpbsz /dev/vg0/netbsd-disk0 /dev/loop0 
 4096
 4096
 512
 512

And with that I can boot and install NetBSD 9.3 in PV mode just fine:

---------------------------------------
$ disklabel xbd0
# /dev/rxbd0:
type: unknown
disk: xbd
label: fictious
flags:
bytes/sector: 512
sectors/track: 2048
tracks/cylinder: 1
sectors/cylinder: 2048
cylinders: 8192
total sectors: 16777216
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

4 partitions:
#       size  offset fstype [fsize bsize cpg/sgs]
 a:  8388608       0 4.2BSD  0   0   0  # (Cyl.    0 -   4095)
 b:  8388608 8388608   swap             # (Cyl. 4096 -   8191)
 d: 16777216       0 unused  0   0      # (Cyl.    0 -   8191)
---------------------------------------

Christian.

[0] https://man7.org/linux/man-pages/man4/loop.4.html
-- 
BOFH excuse #254:

Interference from lunar radiation


Home | Main Index | Thread Index | Old Index