Re: [Soekris] mounting /dev in RAM in OpenBSD
Chris Cohen wrote: Yes, i know. But, with my cf mounted ro I wasn't able to login via ssh. Yes. I've just tested mounting the CF ro and SSH does indeed not get me through to a shell, even with /tmp and /var each in an mfs. I haven't yet set up a log server to see what the specific errors are, but that's probably not necessary, yet. ... I think someone on misc@ told me to place /dev in an mfs. Did that and everything worked fine... Would you post how you've managed to put /dev into RAM? I've tried a few ways that have each prevented the system from completing its boot process. Regards, -Lars ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] mounting /dev in RAM in OpenBSD
Chris Cohen wrote: Yes, i know. But, with my cf mounted ro I wasn't able to login via ssh. I think someone on misc@ told me to place /dev in an mfs. Did that and everything worked fine. I think openssh needs write access to the ttyp devices. Never occurred to me. Thanks. I would have tripped over that myself I'm sure. Chris -)- -- Implementing CIFS - the Common Internet FileSystem ISBN: 013047116X Samba Team -- http://www.samba.org/ -)- Christopher R. Hertel jCIFS Team -- http://jcifs.samba.org/ -)- ubiqx development, uninq. ubiqx Team -- http://www.ubiqx.org/ -)- [EMAIL PROTECTED] OnLineBook -- http://ubiqx.org/cifs/-)- [EMAIL PROTECTED] ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] mounting /dev in RAM in OpenBSD - RESOLVED
It looks like the trick was to mount the mfs version of /dev on top of the regular /dev, the system did not like to boot with only a read-only /dev or with only a mount point for /dev Currently the system successfully boots read only and SSHd accepts logins. Below is /etc/fstab for the adjustments I have made to an otherwise plain vanilla OpenBSD 4.2. Later, after Christmas or so, I'll look into adjusting the sizes and such. Have to clean up now for a few days... -Lars /dev/wd0a / ffs ro,noatime 1 1 /dev/wd0d /data ffs rw,nodev,nosuid 1 2 swap /var mfs -P/var.base,-s16000,noexec,async,nosuid,nodev,noatime,rw 0 0 swap /tmp mfs noexec,async,nosuid,nodev,noatime,rw,-b4096,-i1024,-s21200,-m0 0 0 swap /dev mfs rw,-P/dev.orig,-b4096,-i1024,-s21200,-m0,nosuid 0 0 ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] mounting /dev in RAM in OpenBSD
Chris Cohen [EMAIL PROTECTED] wrote: Openssh needs to write to some devices. (Don't know which ones..) sshd wants to change permissions on /dev/ttyXX when you login so that only you can write to it (or your group) - i originally dealt with this in flashdist by making /dev/ttyXX symbolic links to the actual devices at writeable (mfs) /var/run/dev/ttyXX. unfortunately, sshd uses login() to write your login entries to utmp, which fails if ttyname() decides that your device is not an actual character device. this was a problem with flashdist, symbolic links caused ttyname() to fail so utmp was always empty - and then i moved /dev to full mfs ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
[Soekris] mounting /dev in RAM in OpenBSD
I'd like to move the directories that are frequently written to off of the CF and into RAM so that / can be mounted read-only. /tmp and /var can be managed simply by modifying /etc/fstab: # /var.base has a template of directories to populat /var with swap /var mfs -P/var.base,-s16000,async,nosuid,nodev,noatime,rw 0 0 swap /tmp mfs async,nosuid,nodev,noatime,rw,-s=15000 0 0 It's not the same with /dev, however. I've tried a few variations, e.g. swap /dev mfs -P/dev.base,async,rw,-s=5000,-i=128 0 0 but none allow the system to finish booting. What are the good ways to do work with /dev in RAM ? Regards, -Lars ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] mounting /dev in RAM in OpenBSD
On Sat, Dec 22, 2007 at 08:29:11PM +0200, Lars Noodén wrote: I'd like to move the directories that are frequently written to off of the CF and into RAM so that / can be mounted read-only. /tmp and /var can be managed simply by modifying /etc/fstab: # /var.base has a template of directories to populat /var with swap /var mfs -P/var.base,-s16000,async,nosuid,nodev,noatime,rw 0 0 swap /tmp mfs async,nosuid,nodev,noatime,rw,-s=15000 0 0 It's not the same with /dev, however. I've tried a few variations, e.g. swap /dev mfs -P/dev.base,async,rw,-s=5000,-i=128 0 0 but none allow the system to finish booting. What are the good ways to do work with /dev in RAM ? What writes in /dev? Isn't it just device nodes? -- Jussi Peltola ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] mounting /dev in RAM in OpenBSD
Hello Lars, not sure about the OS you're using, probably FreeBSD (?), but you will have to re-create the device nodes in the MFS partition under /dev after setting up the MFS. Mounting stuff in memory is more complex than just editing fstab.. Best done from a script from /etc/rc{whatever}. For an OpenBSD example see these: http://stsx.xs4all.nl/www.stsx.org/software/openbsd/mfsmount.txt http://stsx.xs4all.nl/www.stsx.org/software/openbsd/README.mfsmount.txt Good luck with it, Bill On Sat, 2007-12-22 at 20:29 +0200, Lars Noodén wrote: I'd like to move the directories that are frequently written to off of the CF and into RAM so that / can be mounted read-only. /tmp and /var can be managed simply by modifying /etc/fstab: # /var.base has a template of directories to populat /var with swap /var mfs -P/var.base,-s16000,async,nosuid,nodev,noatime,rw 0 0 swap /tmp mfs async,nosuid,nodev,noatime,rw,-s=15000 0 0 It's not the same with /dev, however. I've tried a few variations, e.g. swap /dev mfs -P/dev.base,async,rw,-s=5000,-i=128 0 0 but none allow the system to finish booting. What are the good ways to do work with /dev in RAM ? Regards, -Lars ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech -- The only statistics you can trust are those you falsified yourself Winston Churchill ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] mounting /dev in RAM in OpenBSD
On 2007/12/22 20:29, Lars Noodén wrote: It's not the same with /dev, however. I've tried a few variations, e.g. swap /dev mfs -P/dev.base,async,rw,-s=5000,-i=128 0 0 This is fine, just make sure you don't remove /dev from / (it works fine just overlaying it with the MFS), just make dev.base a copy of it (or just copy MAKEDEV across and run it by hand). This, which is practically the same as yours, works fine for me: swap /dev mfs rw,nosuid,-s=4096,-i=1024,-P=/dev_src 0 0 ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech