I'm not sure this is strictly speaking a newbies question, but here we
go. I've got an old OpenBSD server that I wish to virtualize. (It'd
probably be easier to just rebuild it from scratch in a VM, but what's
the fun in that?)

I nfs-mounted some space to my source system and - after puzzling a
bit over which disk slice to dd - I copied as such:

dd if=/dev/wd0c of=/mnt/heron/hedgehog bs=512x1008 count=16383

I then fired up qemu using the disk image file on the VM host and the
darn thing actually booted to OpenBSD. Woo-hoo!

However, the VM does not mount the disks after / properly. Which I
guess is not much of a surprise, as the image file produced by dd is
considerably smaller than I would have expected, at 8455200768 bytes
when my source machine has about 15G used. The VM fails to mount other
slices with automatic fsck failing due to bad superblocks and magic
numbers.

I'm presuming at this point that I have an incomplete disk copy.

Was wd0c not the correct thing to copy with dd? Did I do something
incorrectly in my dd command? Is there perhaps an 8GB filesize limit
somewhere I'm not aware of? (nfs host is Ubuntu 8.04.)  Any ideas or
tips to point me in a useful direction?

Thanks!

-Alan

>From physical source machine:

# disklabel wd0
# Inside MBR partition 3: type A6 start 63 size 16514001
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: IC35L060AVV207-0
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 78165360
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#             size        offset  fstype [fsize bsize  cpg]
  a:        409185            63  4.2BSD   2048 16384  328 # Cyl     0*-   405
  b:       1024128        409248    swap                   # Cyl   406 -  1421
  c:      78165360             0  unused      0     0      # Cyl     0 - 77544
  d:        409248       1433376  4.2BSD   2048 16384  328 # Cyl  1422 -  1827
  e:        409248       1842624  4.2BSD   2048 16384  328 # Cyl  1828 -  2233
  f:      16777152       2251872  4.2BSD   2048 16384  328 # Cyl  2234 - 18877
  g:      33554304      27417600  4.2BSD   2048 16384  328 # Cyl 27200 - 60487
  h:       8388576      19029024  4.2BSD   2048 16384  328 # Cyl 18878 - 27199
# mount
/dev/wd0a on / type ffs (local)
/dev/wd0h on /home type ffs (local, nodev, nosuid)
/dev/wd0d on /tmp type ffs (local, nodev, nosuid)
/dev/wd0f on /usr type ffs (local, nodev)
/dev/wd0e on /var type ffs (local, nodev, nosuid)
/dev/wd0g on /var/www type ffs (local, nodev, nosuid)
# df -h
Filesystem             Size    Used   Avail Capacity  Mounted on
/dev/wd0a              195M   37.4M    148M    20%    /
/dev/wd0h              3.9G   10.7M    3.7G     0%    /home
/dev/wd0d              195M   18.0K    185M     0%    /tmp
/dev/wd0f              7.9G    1.7G    5.7G    23%    /usr
/dev/wd0e              195M    7.1M    178M     4%    /var
/dev/wd0g             15.7G   13.1G    1.9G    88%    /var/www
# df
Filesystem          512-blocks      Used     Avail Capacity  Mounted on
/dev/wd0a               398716     76660    302124    20%    /
/dev/wd0h              8252924     21884   7818396     0%    /home
/dev/wd0d               398780        36    378808     0%    /tmp
/dev/wd0f             16511100   3646988  12038560    23%    /usr
/dev/wd0e               398780     14596    364248     4%    /var
/dev/wd0g             33022236  27470580   3900548    88%    /var/www


-- 
You've been signed up to the NSA friends and family plan!
_______________________________________________
Openbsd-newbies mailing list
[email protected]
http://mailman.theapt.org/listinfo/openbsd-newbies

Reply via email to