Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2016 11:25:14 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: mounting OpenBSD partition
Message-ID:  <20160713112514.559ad201.freebsd@edvax.de>
In-Reply-To: <20160713074205.GA2894@c720-r292778-amd64>
References:  <20160713074205.GA2894@c720-r292778-amd64>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 13 Jul 2016 09:42:05 +0200, Matthias Apitz wrote:
> 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, ...

OpenBSD uses a partitioner similar to FreeBSD's bsdlabel (disklabel).
The device /dev/da0s4 (4th slice) equals /dev/da0s4c and mounts the
whole slice. This is strange, as the mountable partitions should be
/dev/da0s4[adefghijk]; /dev/da0s4a being the root partition, and
/dev/da0s4b is the swap partition. But I'm not fully sure the different
partitioning is 100% compatible...

Can you check the output of "mount -v" on OpenBSD, as well as
"disklabel da0s4" on FreeBSD? Additionally, what does "file -s <FS>"
say for those files?



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160713112514.559ad201.freebsd>