I hadf the same problem before
This is how I patched /etc/rc
Basicly /etc/rc Trys to remout /var /usr and /
While booting this beaks the mfs mounts
Manon
--- /etc/rc.old Fri Mar 18 22:08:10 2005
+++ /etc/rc Fri Mar 18 22:12:58 2005
@@ -22,6 +22,51 @@
} < $_file
}
+testmount() {
+ # Returns True if mountpiont has options
+ local _mountpoint="$1"
+ local _opt="$2"
+ # If set returns only true if mountpiont is not mounted
+ local _mounted="$3"
+ local _line
+ stripcom /etc/fstab | {
+ while read _line ; do
+ # echo $_line
+ testmountopts "$_mountpoint" "$_opt" `echo $_line`
\
+ && return 0
+ _line=${_line%%$_mountpoint *}
+ # echo "###########"
+ done
+ return 1
+ } && /sbin/mount | {
+ test -z "$_mounted" && return 0
+ while read _line ; do
+ local _test=" on $_mountpoint "
+ _line=${_line%%*$_test*}
+ test -z "$_line" && return 1
+ done
+ return 0
+ }
+}
+
+testmountopts() {
+ # Returns True if mountpoint exists and has tested flags
+ local _mnt="$1"
+ local _opt="$2"
+ # echo "$_mnt" "$_opt"
+ local _fstab_dev="$3"
+ local _fstab_mnt="$4"
+ local _fstab_type="$5"
+ local _fstab_option="$6"
+ local _fstab_dump="$7"
+ local _fstab_pass="$8"
+ test -z "$_opt" && _opt=$_fstab_option
+ _opt=${_fstab_option%%*$_opt*}
+ # echo "$_mnt" "$_opt"
+ test "$_mnt" = "$_fstab_mnt" -a -z "$_opt" && return 0
+ return 1
+}
+
# End subroutines
stty status '^T'
@@ -122,7 +167,7 @@
umount -a >/dev/null 2>&1
mount -a -t nonfs
-mount -uw / # root on nfs requires this, others aren't hurt
+testmount / rw && mount -uw / # root on nfs requires this, others aren't
hurt
rm -f /fastboot # XXX (root now writeable)
# pick up option configuration
@@ -192,8 +237,8 @@
fi
fi
-mount /usr >/dev/null 2>&1
-mount /var >/dev/null 2>&1
+testmount /usr "" mounted && mount /usr >/dev/null 2>&1
+testmount /var "" mounted && mount /var >/dev/null 2>&1
# if there's no /var/db/host.random, make one through /dev/urandom
if [ ! -f /var/db/host.random ]; then
--On 3. Juni 2005 18:52:24 +0200 SchC6berle DC!niel
<[EMAIL PROTECTED]> wrote:
> Hi all,
> I'm runnig 3.7-release on i386 with a 512MB CF card acting as wd0 and
> I'm having a strange problem with mfs mounted /var. It gets mounted
> twice, while I have only one mfs /var line in fstab.
>
> I did a usual install directly on CF (hence all partitions physically
> exist on CF) and wanted to mfs mount /var and /tmp based on existing
> partitions. If I do it from command line (boot single user or edit fstab
> not to mount /var) mfs /var is mounted only once. But if I enable it in
> fstab it always gets mounted twice. Check it out:
> (btw, there is no swap space the system has 64MB of ram so it should
> all fit in nicely)
> (and ignore the noatime stuff, currently I'm running the box with rw
> mouned /var directly from the CF, and it made no difference regarding
> the problem)
>
> Help please?
>
>> disklabel wd0
># using MBR partition 3: type A6 off 63 (0x3f) size 1000881 (0xf45b1)
># /dev/rwd0c:
> type: ESDI
> disk: ESDI/IDE disk
> label: Hitachi XX.V.3.4
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 16
> sectors/cylinder: 1008
> cylinders: 993
> total sectors: 1000944
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0 # microseconds
> track-to-track seek: 0 # microseconds
> drivedata: 0
> 16 partitions:
># size offset fstype [fsize bsize cpg]
> a: 102753 63 4.2BSD 2048 16384 102 # Cyl 0*-
> 101
> c: 1000944 0 unused 0 0 # Cyl 0 -
> 992
> d: 20160 122976 4.2BSD 2048 16384 20 # Cyl 122 -
> 141
> e: 41328 143136 4.2BSD 2048 16384 42 # Cyl 142 -
> 182
> g: 816480 184464 4.2BSD 2048 16384 328 # Cyl 183 -
> 992
> h: 20160 102816 4.2BSD 2048 16384 20 # Cyl 102 -
> 121
>
>> cat /etc/fstab
> /dev/wd0a / ffs rw,noatime,softdep 1 1
> /dev/wd0h /home ffs rw,noatime,nodev,nosuid,softdep 1 2
> /dev/wd0g /usr ffs ro,noatime,nodev,softdep 1 2
># /dev/wd0e /var ffs rw,noatime,noexec,nodev,nosuid,softdep 1 2
> /dev/wd0e /var mfs rw,-P=/dev/wd0e,noexec,nosuid,nodev 0 0
> /dev/wd0d /tmp mfs rw,noexec,nosuid,nodev 0 0
>
>> mount
> /dev/wd0a on / type ffs (local, noatime, softdep)
> /dev/wd0h on /home type ffs (local, noatime, nodev, nosuid, softdep)
> /dev/wd0g on /usr type ffs (local, noatime, nodev, read-only, softdep)
> mfs:25832 on /var type mfs (asynchronous, local, nodev, noexec, nosuid,
> size=41328 512-blocks)
> mfs:160 on /tmp type mfs (asynchronous, local, nodev, noexec, nosuid,
> size=20160 512-blocks)
> mfs:31849 on /var type mfs (asynchronous, local, nodev, noexec, nosuid,
> size=41328 512-blocks)
>
>> df
> Filesystem 1K-blocks Used Avail Capacity Mounted on
> /dev/wd0a 50526 31602 16398 66% /
> /dev/wd0h 9870 30 9348 0% /home
> /dev/wd0g 400398 274362 106018 72% /usr
> mfs:25832 20278 7298 11968 38% /var
> mfs:160 9870 6 9372 0% /tmp
> mfs:31849 20278 7306 11960 38% /var
>
>> dmesg
> OpenBSD 3.7 (GENERIC) #50: Sun Mar 20 00:01:57 MST 2005
> [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel Pentium (P54C) ("GenuineIntel" 586-class) 75 MHz
> cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8
> cpu0: F00F bug workaround installed
> real mem = 66691072 (65128K)
> avail mem = 53440512 (52188K)
> using 839 buffers containing 3436544 bytes (3356K) of memory
> mainbus0 (root)
> bios0 at mainbus0: AT/286+(00) BIOS, date 10/20/98, BIOS32 rev. 0 @
> 0xfd770 apm0 at bios0: Power Management spec V1.1
> apm0: AC on, battery charge unknown, estimated 0:00 hours
> pcibios0 at bios0: rev 2.0 @ 0xf0000/0x10000
> pcibios0: pcibios_get_intr_routing - function not supported
> pcibios0: PCI IRQ Routing information unavailable.
> pcibios0: PCI bus #0 is the last bus
> WARNING: can't reserve area for BIOS PROM.
> bios0: ROM list: 0xc0000/0x8000
> cpu0 at mainbus0
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "VLSI 82C594 Wildcat" rev 0x01
> pcib0 at pci0 dev 1 function 0 "VLSI 82C596/597 Wildcat ISA" rev 0x01
> de0 at pci0 dev 2 function 0 "DEC 21041" rev 0x21: irq 9
> de0: 21041 [10Mb/s] pass 2.1 address 00:80:c8:47:5c:86
> de1 at pci0 dev 3 function 0 "DEC 21041" rev 0x11: irq 9
> de1: SMC 21041 [10Mb/s] pass 1.1 address 00:e0:29:04:73:c9
> vga1 at pci0 dev 5 function 0 "Cirrus Logic CL-GD5434-8" rev 0xfc
> wsdisplay0 at vga1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> le1 at pci0 dev 6 function 0 "AMD 79c970 PCnet-PCI" rev 0x02: irq 9
> le1: address 08:00:09:f8:7b:bf
> le1: 8 receive buffers, 2 transmit buffers
> pciide0 at pci0 dev 7 function 0 "CMD Technology PCI0640" rev 0x02: no
> DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
> wd0 at pciide0 channel 0 drive 0: <Hitachi XX.V.3.4.0.0>
> wd0: 1-sector PIO, LBA, 488MB, 1000944 sectors
> pciide0: channel 1 ignored (disabled)
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5
> pckbd0 at pckbc0 (kbd slot)
> pckbc0: using irq 1 for kbd slot
> wskbd0 at pckbd0 (mux 1 ignored for console): console keyboard, using
> wsdisplay0
> pcppi0 at isa0 port 0x61
> midi0 at pcppi0: <PC speaker>
> sysbeep0 at pcppi0
> lpt0 at isa0 port 0x378/4 irq 7
> npx0 at isa0 port 0xf0/16: using exception 16
> pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
> fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
> fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
> biomask fd65 netmask ff65 ttymask ffe7
> pctr: 586-class performance counters and user-level cycle counter enabled
> dkcsum: wd0 matched BIOS disk 80
> root on wd0a
> rootdev=0x0 rrootdev=0x300 rawdev=0x302
[demime 1.01d removed an attachment of type application/pgp-signature]