LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 12-12-2019, 08:29 AM   #31
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Devuan (mainly)
Posts: 4,279

Rep: Reputation: Disabled

OpenBSD can mount & write to ext2 filesystems, it's how I transfer files between it & Linux, via external drives.

I wouldn't call it inferior either, it does what it does well & securely, that being it's main reason for existence.


Edit: Open BSD does not have ext4 drivers, only ext2, at present. It's the journal.

Last edited by fatmac; 12-12-2019 at 08:32 AM.
 
Old 12-12-2019, 09:35 AM   #32
cynwulf
Senior Member
 
Registered: Apr 2005
Location: Walsall, UK
Posts: 2,692
Blog Entries: 6

Rep: Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276
Quote:
Originally Posted by BW-userx View Post
Isn't OpenBSD somewhat inferior to FreeBSD?
No. Neither are "inferior" to the other - but merely different.
Quote:
Originally Posted by BW-userx View Post
it branched off in FreeBSD earlier stages and has been developed slowly from there
Incorrect. OpenBSD is a very early fork of NetBSD.
Quote:
Originally Posted by BW-userx View Post
whereas FreeBSD has finally gotten ext2 type FileSystem to read and write.
As has OpenBSD. They are foreign file systems however, so it's not a focus of the project. As I recall ext2/ext3 are treated as the same in OpenBSD, but ext3 partitions are mounted as ext2 (no journalling). Both can be mounted read/write.

ext4 is read only.

While FreeBSD for example may expend vast amounts of time and resources incorporating a file system such as ZFS, you won't find many will to spend time on file systems such as ext2/ext3/ext4, simply because they're only of interest to casual "multi-booters".
Quote:
Originally Posted by BW-userx View Post
this just gives me the option there should be one main file system type that everyone can use for people that dual (multi) boot Operating Systems.
It's likely that every existing file system type had a similar goal - to be "the one", which is why we have so many...

It's worth noting however that multi-booting is never going to be a goal of any particular OS.
Quote:
Originally Posted by BW-userx View Post
nevertheless, it seems to me if you can get OpenBSD to boot, then you should be able to get FreeBSD to do the same
I would tend to agree, but it's not a given that one supports all the hardware which the other does.
Quote:
Originally Posted by BW-userx View Post
some mount commands for OpenBSD
mount(8) covers this - so no need for the 3rd party guides.

Last edited by cynwulf; 12-12-2019 at 09:36 AM.
 
2 members found this post helpful.
Old 12-12-2019, 09:55 AM   #33
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,860

Original Poster
Blog Entries: 16

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
Never mind FreeBSD! OpenBSD is what I've got right now and I want to learn how to use it. In my experience, making mistakes is usually an educational process. I already guessed that the problem had something to do with the fact that my Linux filesystems are ext4 but OpenBSD reads them as ext2.
Quote:
Originally Posted by cynwulf View Post
As I recall ext2/ext3 are treated as the same in OpenBSD, but ext3 partitions are mounted as ext2 (no journalling). Both can be mounted read/write.

ext4 is read only.
That explains a lot. I had already noticed that my Linux partitions need to be mounted read-only in BSD. What I hadn't realised is that they might be treated as corrupt. I have mounted that partition by hand successfully -- I wouldn't have put it into fstab otherwise -- but it seems that automounting during startup is more fussy.

The question is "How do I get out of this?"

Last edited by hazel; 12-12-2019 at 09:57 AM.
 
Old 12-12-2019, 11:12 AM   #34
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,860

Original Poster
Blog Entries: 16

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
I wonder if this is relevant
Quote:
Due to a bug in FreeBSD 2.2.8 and earlier you will have to unmount all ext2fs filesystems before you shut down FreeBSD if you are using these any of these versions. If you shut down FreeBSD with an ext2fs filesystem mounted, FreeBSD cannot sync the UFS filesystems. This results in fsck being run the next time FreeBSD is booted. You can work around this bug by putting the line:
umount -a -t ext2fs in the /etc/rc.shutdown file.
OK, that's FreeBSD but it might apply to openBSD too. I mentioned that I mounted this partition yesterday by hand as a test and got no errors. I probably didn't umount it before shutting down because I don't usually do that. But that may be what caused this error. I'd still like to know how to fix it. If one of our OpenBSD gurus tells me it's safe to just fsck the disk and exit the shell, I'll do that.
 
Old 12-12-2019, 11:43 AM   #35
cynwulf
Senior Member
 
Registered: Apr 2005
Location: Walsall, UK
Posts: 2,692
Blog Entries: 6

Rep: Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276
I had inadvertently skipped over this post...
Quote:
Originally Posted by hazel View Post
What happened was this: I put my main data partition (/dev/sd0m -t ext4) into fstab for automount on /home/data. That's where I have it in all my linuxen. OpenBSD thinks it's corrupt and won't let the boot go any further unless I fsck it. I don't want to do that because it's never a good idea to fsck a filesystem from an alien OS and I have all my personal files on that disk. So I tried to edit the fstab to comment that line out. But the root partition is mounted read only at that stage of the boot.
fstab(5) man page provides the hints you need:

Quote:
The sixth field, fs_passno, is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or is zero, a value of zero is returned and fsck(8) will assume that the filesystem does not need to be checked.
You'd probably also want to omit fs_freq from the mount stanza of foreign file systems.


At the boot prompt boot from the ramdisk kernel:
Code:
boot> boot bsd.rd
Once it has booted drop to a shell, mount the root partition, edit that line out and reboot.

You can then read the man page at your leisure and work out where you went wrong.

//edit: And it's unlikely that old bugs in ancient FreeBSD releases are in any way relevant.

It's important to remember that the 'BSDs are all separate and distinct OS.

Last edited by cynwulf; 12-12-2019 at 11:48 AM.
 
1 members found this post helpful.
Old 12-12-2019, 11:53 AM   #36
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,860

Original Poster
Blog Entries: 16

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
Silly me! I copied "1 2" from the existing partition entries. But of course they were for bsd partitions, not a foreign one. I take it the dump column for that drive should be 0 as well.

Going to fix it now.
 
Old 12-12-2019, 11:54 AM   #37
cynwulf
Senior Member
 
Registered: Apr 2005
Location: Walsall, UK
Posts: 2,692
Blog Entries: 6

Rep: Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276
Quote:
Originally Posted by hazel View Post
Silly me! I copied "1 2" from the existing drive entries. But of course they were for bsd partitions, not a foreign one. I take it the dump column for that drive should be 0 as well.
Just omit those two numbers. It's the same as specifying 0.
 
Old 12-13-2019, 04:48 AM   #38
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,860

Original Poster
Blog Entries: 16

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
Quote:
Originally Posted by cynwulf View Post
At the boot prompt boot from the ramdisk kernel:
Code:
boot> boot bsd.rd
Once it has booted drop to a shell, mount the root partition, edit that line out and reboot.
Thank you, that was exactly what I needed. What a brilliant idea to have a built-in rescue disk! I wish Linux had that. Actually if that bug exists in OpenBSD, I can test for it by mounting the data partition by hand and seeing if unmounting/not unmounting it makes a difference the next time around.

In the mean time I have fixed cron so that it will run the regular jobs at 6:30 PM, not 1:30 AM. Now I need to read up the update procedures.
 
Old 12-29-2019, 12:02 PM   #39
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,860

Original Poster
Blog Entries: 16

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
Oh dear! I've actually found something which BSD does better than Linux. When I logged into X, I found I had a British keyboard already set up for me. In Linux, you have to create a configuration file in /etc/X11/Xorg.conf.d to get this to work (unless the installer does this for you). I checked all the locations where X might expect to find a configuration file and found nothing relevant. So I looked in the Xorg log file and found this:
Code:
[    80.888] (II) config/wscons: checking input device /dev/wskbd
[    80.888] (II) wskbd: using layout gb
...............
[    80.906] (**) Option "Protocol" "standard"
[    80.906] (**) Option "XkbRules" "base"
[    80.906] (**) Option "XkbModel" "pc105"
[    80.906] (**) Option "XkbLayout" "gb"
[    80.906] (II) XINPUT: Adding extended input device "/dev/wskbd" (type: KEYBOARD, id 6)
The starred lines are exactly what I would have put into the keyboard configuration file if I had written one but it looks as if X has got the information directly from the console. The (**) notation usually indicates reading from a configuration file but like I said there ain't no such file.

That's pretty cool!
 
Old 12-31-2019, 04:52 AM   #40
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,860

Original Poster
Blog Entries: 16

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
Something odd happened yesterday. I wonder if anyone can explain it. I decided to take my data partition out of fstab; it's not much good having it automounted if I can't write to it. In the evening security report (and btw that's another thing that I like about BSD) changes were logged not only to fstab but also to the disklabel. The line for that partition had been replaced...by an identical line. Now what caused that to happen?
 
Old 12-31-2019, 07:40 PM   #41
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 249

Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by hazel View Post
The line for that partition had been replaced...by an identical line. Now what caused that to happen?
Since you haven't posted the security report, my guess is the lines were not identical. Double-check the contents of /var/log/security.out or /var/log/security.out.old as applicable.
 
Old 01-01-2020, 05:11 AM   #42
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,860

Original Poster
Blog Entries: 16

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
You're right! They are not quite identical. Here are the lines:
Code:
-  m:        204800000         13846528  ext2fs                    # /home/data
+  m:        204800000         13846528  ext2fs
The old line included the mount point. Does that mean that when automounting occurs at the start, mount doesn't need to read fstab at all?
 
Old 01-01-2020, 09:44 AM   #43
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 249

Rep: Reputation: 114Reputation: 114
This is not a comparison of changes in your fstab(5) file. This is a comparison of changes to the output of disklabel(8).
 
Old 01-01-2020, 09:49 AM   #44
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,860

Original Poster
Blog Entries: 16

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
Quote:
Originally Posted by jggimi View Post
This is not a comparison of changes in your fstab(5) file. This is a comparison of changes to the output of disklabel(8).
That's the whole point! I expected to find my fstab edit in the security report. I've already found out that changes to system configuration files are logged automatically. So no problem there! I wasn't expecting the disklabel to be modified just because I removed an automount instruction from fstab. And it made me wonder about having mountpoints in the disklabel. Why is that done? And is it only done for non-native partitions?
 
Old 01-01-2020, 10:07 AM   #45
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 249

Rep: Reputation: 114Reputation: 114
When you use the disklabel(8) command to read the contents of a drive, you get the in-core label including active mount points. Try, for example, # disklabel sd0 and review the output. From the disklabel(8) man page:
Quote:
The first form of the command (read) is used to examine the label on the
named disk drive. It will display all of the parameters associated with
the drive and its partition layout. The kernel's in-core copy of the
label is displayed; if the disk has no label, or the partition types on
the disk are incorrect, the kernel may have constructed or modified the
label.
Why? Because security(8) looks at changes to the active system. From the security(8) man page:
Quote:
security is a command script that examines the system for some signs of
security weaknesses. It is only a security aid and does not offer
complete protection. security is run by daily(8), which mails any output
to root on a daily basis.
Why review changes to the disklabel of an actively running system? The fstab(5) file is only read when mount(8) is used with the -a option, such as used in the rc(8) script at boot time.

At this time, the security(8) script does not currently inspect changes to the fstab(5) file. You're welcome to submit a diff(1) to the OpenBSD Project's misc@ mailing list to add an fstab(5) inspection.

Last edited by jggimi; 01-01-2020 at 10:09 AM. Reason: clarity, one typo
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD: nvidia drivers, screen resolution and FreeBSD binaries on OpenBSD ::: *BSD 2 08-21-2009 05:18 AM
LXer: Fsck errors in the Linux filesystem on my OpenBSD laptop NOT caused by OpenBSD LXer Syndicated Linux News 1 08-31-2008 04:15 AM
LXer: OpenBSD: The OpenBSD Foundation LXer Syndicated Linux News 0 07-26-2007 11:31 AM
OpenBSD - Where can i get OpenBSD 3.7 ISO CD -- Please help me b:z Linux - Software 5 04-08-2005 08:09 AM
OpenBSD - Where can i get OpenBSD 3.7 ISO CD -- Please help me b:z Linux - Software 1 04-07-2005 09:46 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 06:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration