|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
||||
I believe the "1 1" must be "0 0" for read only filesystems.
With the default installation, the following hierarchies need to be read/write: /rootYou should either make these MFS, or make appropriate adjustments. /tmp is the only one you've accounted for. You may also want to set the mode for /tmp to 1777. |
|
||||
I don't want to discount that.
After all you saved my bacon getting pxe working. I don't think this will help though. The first number (fs_freq) is the dump(8) identifier. Apparently this allows for different levels of backup (0 to 9). I suspect that it is usual to back up / even if it is read only. The second number (fs_passno) is used by fsck(8) to work out the order of checking on boot. If the number is 0 apparently the file system is not checked. I suspect that / should be checked even if it is read only. I guess that's why all the docs I read for doing this (mounting a filesystem in RAM) had "0 0" for the memory filesystem. They also had "1 1" for the CF. Hey, I'll give it a whirl ... Quote:
This is the minimum according to (user) documentation. One guide recommends /root also. I suspect I don't need it. Nor /home. Can you confirm or deny. Are you sure I need /etc read write? I think the big problem is I don't have symlinks yet. It seems obvious to me that the kernel is gonna still look for these folders in the usual places until I tell it otherwise. :] I suspect when I get that done it will be okay ... Best wishes. |
|
||||
I tried. :]
0 0 Code:
# cat fstab /dev/wd0a / ffs ro 0 0 # mount -v /dev/wd0a on / type ffs (rw, local, ctime=Fri Aug 15 05:30:45 2008) dmesg: Automatic boot in progress: starting file system checks. 1 1 Code:
# cat fstab /dev/wd0a / ffs ro 1 1 # mount -v /dev/wd0a on / type ffs (rw, local, ctime=Fri Aug 15 05:34:20 2008) dmesg: Automatic boot in progress: starting file system checks. /dev/rwd0a: file system is clean; not checking Best wishes. |
|
||||
Ooops. "/" is mounted writeable by /etc/rc; read-only in fstab(5) won't help. You'll have to modify the rc(8) script to keep it read only:
Code:
. . . umount -a >/dev/null 2>&1 mount -a -t nonfs,vnd mount -uw / # root on nfs requires this, others aren't hurt rm -f /fastboot # XXX (root now writeable) . . . /etc read/write is required by dhclient(8) as it writes resolv.conf(5). |
|
||||
Quote:
Presumably this is true and it could be changed for other mounts - not that I would. Quote:
A good thing ™ I paid attention in Italian lessons ... Quote:
As long as I don't want to write I don't need them. Quote:
Best wishes. |
|
||||
dhclient is the DHCP client. If you are using TCP/IP, and not using static IP for your embedded platform, your choice is either use DHCP or BOOTP, both of which use dhclient(8). If your DHCP or BOOTP server passes any domain or nameserver information, dhclient will attempt to write it to /etc/resolv.conf. This is, of course, dependent on your environment: whether TCP/IP is used, and whether information for the resolver is passed by your DHCP/BOOTP server.
|
|
||||
Quote:
I had a look today. Of course you made it much easier. This makes me wonder if other people doing this are getting read only drives. Still they are doing custom installs. Me - I did a standard install. :] I figured that way I would have to learn everything. Doing a standard installation on a desktop is not very challenging. Doing one read only on the other hand is turning into quite the experience. Exactly what I wanted. Oop. Here's someone who knows: http://bsd.dischaos.com/2008/10/06/r...ead-only-mode/ I like the idea of using fstab to organize /dev and /var. Still considering there is additional jiggery pokery involved I might stick with my current plan. Linking. Best wishes. |
|
||||
If you really want to try something fancy -- you can use a RAIDframe configuration in RAID 1. You set the read-only media to one side of the mirror, RAM disk to the other, then break the mirror pair.
I use RAIDframe, which requires a custom kernel, but I've never tried this: http://undeadly.org/cgi?action=artic...20020818020316 |
|
||||
Quote:
Please no more interesting ideas. I will get sidetracked even more. Haha. What a great idea. It's utterly fantastiche. :] What a great way to learn RAID. Instead of having symlinks and whatnot I duplicate /var and /dev on one of the mirrors. Ahh, but the kernel will try to access both of them. So you mean it as a curiosity? Off to read Undeadly. Best wishes. EDIT: I started reading and now I see where you are going. Haha. Great stuff. Last edited by diw; 29th March 2009 at 12:58 AM. |
|
||||
Hiya.
Rather than stuff around with symlinks - something I am not 100% comfortable with, I formed my own plan. Code:
# cat /etc/fstab /dev/wd0a / ffs ro 1 1 swap /dev mfs rw,-P=/populate/dev,-s=16384 0 0 swap /var mfs rw,-P=/populate/var,-s=32768 0 0 swap /tmp mfs rw,-s=16384 0 0 Code:
# df Filesystem 512-blocks Used Avail Capacity Mounted on /dev/wd0a 491612 445080 21952 95% / mfs:12843 15710 44 14882 0% /dev mfs:27993 31582 8998 21006 30% /var mfs:20489 15710 2 14924 0% /tmp It seems to work. What do you think of my sizes? What do you think of my genius plan? Do I really need to worry about noatime, nosuid, etcetera? Best wishes. |
|
||||
The size of /var will need to be set based on your application needs, and there's no way to predict it without knowing your application set and use requirements.
"noatime" is a helpful primarily for power consumption savings with hard drives (or flash memory) with read/write disk. It can also have performance savings, too. By default, a read/write FFS filesystem will store the last-time-of-access for every file. It isn't used on read/only mounts, so "noatime" will have no impact on them. For MFS filesystems which do not get swapped, you won't see any impact from "noatime". If there is any swapping, "noatime" may reduce the amount occuring, depending on access patterns. The use of "nodev" and "nosuid" are for security, and are recommended. If need be, "dev" or "suid" may be enabled with mount -u. ----- I was joking a little bit about deploying RAIDframe to create a complete set of filesystems-in-RAM. I would say you'd need a lot more operational experience with OpenBSD, first. Why? Because that "how to" document is:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A name for an embedded FreeBSD-based OS | nimnod | Off-Topic | 15 | 16th March 2009 03:06 PM |