Mounting /dev/ufs/pfsense read-write
-
Somehow this should be obvious, but I'm failing. I want to add a script to /usr/local/etc/rc.d/ and I have an embedded 1.2.2. The file system mounts read-only:
gw:/usr/local/etc/rc.d# mount /dev/ufs/pfSense on / (ufs, local, noatime, read-only) devfs on /dev (devfs, local) /dev/md0 on /tmp (ufs, local) /dev/md1 on /var (ufs, local) /dev/ufs/pfSenseCfg on /cf (ufs, local, read-only) devfs on /var/dhcpd/dev (devfs, local)
I'm a little fuzzy on how to upgrade an existing mount, but I tried:
gw:/usr/local/etc/rc.d# mount -fw -o noatime /dev/ufs/pfSense /
This returns with no errors; but the file system is still read-only.
Thanks.
-
Not really relevant but you really should be on 1.2.3.
You can't permanently mount / as read-write on embedded without hacking out the functions that handle switching between read/write and read-only modes.
Look at /etc/rc.conf_mount_rw to see what it does.
-
Not really relevant but you really should be on 1.2.3.
To be honest, I want to be running 2.0; but this is on a pre-Alix PCEngines board. I suppose I could use the same technique for hacking the boot record, and edit the mounted image?
Thanks for the tip.
-
[stupid]Really helps when you read the man page carefully…[/stupid]
Reading /etc/inc/config.inc it becomes apparent that the proper toggle between rw and ro is simply:mount -uw / mount -ur /
The mount man page explains that: "The -u flag indicates that the status of an already mounted file system should be changed."
-
It works fine on a WRAP if you flip the bits as described here:
http://doc.pfsense.org/index.php/NanoBSD_on_WRAP2.0 might be a little heavy on CPU/RAM for a WRAP but it might work. I haven't tried it on my WRAP yet.