mounting OpenBSD partition

Matthias Apitz guru at unixarea.de
Wed Jul 13 07:42:20 UTC 2016


Hello,

I was in need to investigate some hardware / driver issue and made an OpenBSD
bootable USB key. The creation and installation of this is pretty much
simple and fast. Based on an image install59.ff (some 290 MByte) after a
few minutes you have a running system on the disk or in my case on some
other USB key of 15 GByte which even contains already X11 (just login
and says 'startx'). Just do installation to sd1 (sd0 is the harddisk in your
laptop). Nice.

What is interesting for me as FreeBSD user is, that you can mount parts
of the OpenBSD file system to our FreeBSD; the layout is:

# fdisk da0

******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=1915 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1915 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
<UNUSED>
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
sysid 166 (0xa6),(OpenBSD)
    start 64, size 30764411 (15021 Meg), flag 80 (active)
	beg: cyl 0/ head 1/ sector 2;
	end: cyl 1023/ head 254/ sector 63

and we have the following devices in FreeBSD after plug-in:

# ls -l /dev/da*

crw-r-----  1 root  operator  0x74 jul.  13 07:44 /dev/da0
crw-r-----  1 root  operator  0x75 jul.  13 07:44 /dev/da0s4
crw-r-----  1 root  operator  0x77 jul.  13 09:38 /dev/da0s4a
crw-r-----  1 root  operator  0x78 jul.  13 09:38 /dev/da0s4b
crw-r-----  1 root  operator  0x79 jul.  13 09:38 /dev/da0s4d
crw-r-----  1 root  operator  0x7a jul.  13 09:38 /dev/da0s4e
crw-r-----  1 root  operator  0x7b jul.  13 09:38 /dev/da0s4f
crw-r-----  1 root  operator  0x7c jul.  13 09:38 /dev/da0s4g
crw-r-----  1 root  operator  0x7d jul.  13 09:38 /dev/da0s4h
crw-r-----  1 root  operator  0x7e jul.  13 09:38 /dev/da0s4i
crw-r-----  1 root  operator  0x7f jul.  13 09:38 /dev/da0s4j
crw-r-----  1 root  operator  0x80 jul.  13 09:38 /dev/da0s4k

The device /dev/da0s4 is normal UFS mountable and seems to contain the
root file system. I found no way to get further access, for example to
/home, ...

HIH

	matthias
-- 
Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/  ☎ +49-176-38902045
"Wer übersieht, dass wir uns den anderen weggenommen haben und sie uns wiederhaben wollen,
kann von den Kämpfen der letzten Tage keinen verstehen. Und kann natürlich auch keinen
dieser Kämpfe bestehen." Hermann Kant in jW 1.10.1989


More information about the freebsd-questions mailing list