![]() |
|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
I am planning to do a new OpenBSD6.5 install as I will be implementing a number of configuration changes. In the past, I have copied over my /home files via sftp or tar'd/gzip'd my /home partition to DVD's.
I was wondering about mounting my OpenBSD /home partition from linux, read only, and copying to my Debian /home/user partition. Then, after installing 6.5, mount the Debian ext4 partition from OpenBSD and copy it back. I have been able to mount my OpenBSD root partition but /home is empty. My understanding is that OpenBSD root partition is the old ufs and the remaining patitions are ufs2. I've seen comments that linux ufs module is not reliable for writes but that should not be an issue. Has anybody done this? |
|
|||
![]()
From Debian Testing:
Code:
root@PooBear:/home/jsh# mount -t ufs -o ufstype=44bsd,ro /dev/sda4 /mnt root@PooBear:/home/jsh# ls -al /mnt total 54836 drwxr-xr-x 14 root root 512 Apr 10 16:22 . drwxr-xr-x 18 root root 4096 Mar 31 10:32 .. drwxr-xr-x 2 root root 512 Oct 11 12:18 altroot drwxr-xr-x 2 root root 1024 Oct 11 12:18 bin -rwx------ 1 root root 15446560 Apr 10 16:22 bsd -rwx------ 1 root root 15458384 Apr 10 12:29 bsd.booted -rw------- 1 root root 10017699 Oct 17 19:02 bsd.rd -rwx------ 1 root root 15346943 Oct 17 19:02 bsd.sp -rw-r--r-- 1 root root 578 Mar 24 2018 .cshrc drwxr-xr-x 3 root root 19456 Apr 10 16:21 dev drwxr-xr-x 48 root root 2048 Apr 10 19:41 etc drwxr-xr-x 2 root root 512 Apr 25 2018 home drwxr-xr-x 2 root root 512 Oct 18 09:43 mnt -rw-r--r-- 1 root root 468 Mar 24 2018 .profile drwx------ 6 root root 512 Dec 6 14:15 root drwxr-xr-x 2 root root 1536 Nov 18 08:26 sbin lrwxrwx--- 1 root root 11 Oct 11 12:18 sys -> usr/src/sys drwxr-xr-x 2 root root 512 Sep 11 2018 test drwxr-xr-x 2 root root 512 Apr 25 2018 tmp drwxr-xr-x 2 root root 512 Apr 25 2018 usr drwxr-xr-x 2 root root 512 Apr 25 2018 var root@PooBear:/home/jsh# ls -al /mnt/home total 4 drwxr-xr-x 2 root root 512 Apr 25 2018 . drwxr-xr-x 14 root root 512 Apr 10 16:22 .. |
|
||||
![]()
Right, you've mounted the root partition, but not the /home partition. So, you need to find the home partition. This should be doable by looking at your Linux dmesg. Here is what mine says when it's looking at the disk with an OpenBSD partition on it:
Code:
sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15 sda16 sda17 sda18 sda19 sda20 sda21 sda22 sda23 sda24 sda25 > sda1: <netbsd: sda26 sda27bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored > sda2: <openbsd: sda28 sda29 sda30 sda31bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored bad subpartition - ignored > I believe these are derived from the BSD-partitions found in the disklabel. In my case I think they are / (the root0, /home, /usr and swap (not in that order though). I can mount the /home partition by doing this: # mount -t ufs -o ro,ufstype=44bsd /dev/sda31 /mnt/tmp Here sda31 is the /home partition, and it's just ffs, i.e., 44bsd. If yours is ufs2 change that part of the mount command. First, you will need to figure out which partition in the openbsd part of your Linux dmesg is the home partition. I just did it by trial and error. Once you have that you can try to mount it as ufs2. Last edited by IdOp; 11th April 2019 at 05:48 PM. Reason: Added colour, and clarity. |
|
|||
![]()
@LdOp
You've given me something to look into - mounting a GPT partition. The entry must be in the partition table even though grub2 is ignoring it. I'm using a GPT paritioning scheme. I recall seeing warning messages in update-grub (aka grub-mkconfig) all bsdxx partition were ignored. example output: Code:
hostdisk//dev/sda,gpt4,bsd14 |
|
||||
![]()
Ah, I see. For clarity my disk was not using GPT, and I've never really used that before (nor grub for that matter).
The key will be to find out what label (analogous to my sda31) the Linux kernel assigns to the BSD-partitions defined in the disklabel -- if any --- in the GPT environment. I don't know if grub ignoring them is just a grub thing, or a reflection of the kernel not providing them. Hopefully it will be possible! Last edited by IdOp; 12th April 2019 at 03:25 AM. |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MultiBoot OpenBSD/Debian | Funkygoby | OpenBSD Installation and Upgrading | 23 | 5th March 2019 09:46 PM |
Microsoft has released a Debian Linux switch OS. Repeat, a Debian Linux switch OS | J65nko | News | 9 | 12th March 2016 11:58 PM |
Dual Booting on Apple PPC hardware. Debian and FreeBSD. | Mr-Biscuit | Guides | 2 | 8th March 2011 03:02 AM |
Debian 5.0 released | ephemera | Other BSD and UNIX/UNIX-like | 36 | 26th November 2010 04:50 PM |
Dual-boot laptop won't boot OpenBSD after upgrade to 4.3 | kbeaucha | OpenBSD Installation and Upgrading | 17 | 30th May 2008 02:40 PM |