[SOLVED] Difficulty Mounting ext3 partition in OpenBSD 6.4
*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
there are three entries, one for the swap, one for /, and one for /home
So I think that sd0a, sd0b, and sd0d are the OpenBSD partitions, while sd0c points to the entire disk.
does this make sense? if so, where do I find my Linux partition?
If this is a dumb question, where would be a good place for me to look in the man pages?
I tried fdisk(8), and mount(8), and the openBSD FAQ
If I read correctly what you wrote, you are trying to mount the / partition
To see which partition OpenBSD has labeled for linux, run as root: disklabel -p sd0 or perhaps /dev/sd0...if that's the harddrive you are using.
That will show you which partition to try and mount. So then you might, as an example write as root mount -t ext2fs /dev/sd0h /mnt.
Also, it may also have to be mounted read only, so then you type mount -r -t ext2fs /dev/sd0h /mnt
I can't run OpenBSD on this particular laptop, which makes my blood boil, so I'm going by memory.
HTH
Last edited by multios; 01-10-2019 at 09:46 PM.
Reason: add welcome comment
I was not clear enough in my first post, sorry.
So I am trying to mount my Linux partition from inside OpenBSD, and cannot find it.
I did a little research online and found that in FreeBSD I would look for something like ad0s1.
I could not find it, or sd0s1, so maybe OpenBSD uses a different system.
I guess it's time to dig into the FAQ again...
@multios, I tried running disklabel, It just gives me the OpenBSD partitions.
BTW are you sure it's disklabel -p?
Let's start with some level-setting. Let us assume, for right now, that you only have one physical disk drive, and you are using an architecture such as amd64 or i386 that boots with either MBR or GPT partitioning.
On OpenBSD, this drive would be either "wd0" or "sd0". wd(4) is the driver for IDE/PATA drives, while sd(4) is the driver for SCSI/SATA/USB drives. Disklabel partitions begin with "a" and end with "p", such as sd0h or wd1a.
There are two levels of disk partitioning. 1) MBR/GPT partitions, and 2) OpenBSD disklabel partitions. The single OpenBSD MBR/GPT partition is subdivided into multiple disklabel partitions.
When OpenBSD is first connected to a disk drive, and there is no on-disk OpenBSD disklabel already present -- OpenBSD will scan the MBR/GPT partition table and look for any pre-existing, recognized "foreign" MBR/GPT filesystem. It will build a virtual disklabel, pre-populated with any of these recognized filesystems, starting with disklabel partition letter "i". If there is already an OpenBSD disklabel on-disk, it will not scan the MBR or GPT partition table, and will only use what it finds on the on-disk disklabel. Therefore, if you have pre-existing MBR/GPT partitions, OpenBSD will find them when first installed. If you created these MBR/GPT partitions AFTER OpenBSD has written its disklabel, you must add these partitions to the disklabel manually.
Last edited by jggimi; 01-11-2019 at 02:34 PM.
Reason: typos
Thanks, @jggimi.
This helps clear up a lot of confusion.
I installed Linux before installing BSD, and because I formatted its partition as an ext3 instead of an ext2 it was not recognized, and thus not added to the disklabel.
Am I correct?
No, that's not the reason. EXT3 is EXT2 plus journaling. OpenBSD ignores journaling and treats the filesystem as EXT2. The apparent reason for failure to mount appears to be improper nomenclature in your mount command.
You have stated that the Linux partition was first-on-disk before OpenBSD was installed. If that is true, then there should be an "i" disklabel partition created when OpenBSD did not find a pre-existing disklabel, and scanned the MBR or GPT.
Your mount command should be one of these two commands, depending on whether the drive is EDI/PATA or SCSI/SATA/USB.
Code:
# mount -t ext2 /dev/wd0i /mnt
or
Code:
# mount -t ext2 /dev/sd0i /mnt
I have intentionally NOT added your directory "sda1" as a mount point because you are already confused about OpenBSD disk drive nomenclature, and I recommend you not use Linux nomenclature which does not apply on OpenBSD systems.
I solved the problem, with all of your help.
My Linux partition was not in the disklabel, so I edited the disklabel, and I can mount now.
Thank you for all your help.
P.S. I changed the name of the mount point from sda1 to Linux. P.P.S OpenBSD has great documentation, better than Linux IMHO.
As noted earlier, that will happen when an OpenBSD disklabel is stored on disk before the Linux partition is installed.
There are two OTHER ways this might have occured: either a custom partitioning schema was deployed during installation, or, more likely, OpenBSD was re-installed and the partition not retained during re-installation.
Last edited by jggimi; 01-17-2019 at 12:57 PM.
Reason: clarity, and a thinko
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.