read-only root fs with Busybox?

Kevin P. Dankwardt k at kcomputing.com
Fri Dec 9 03:26:53 UTC 2005


In my experience, mount only complains about /etc/fstab if you leave off
either the device file or the mount point.

Did you try:

mount /dev/hda1 / -oremount,rw

or did you just do either:  mount / -oremount,rw
or: mount /dev/hda1 -oremount,rw

-kevin dankwardt
-----Original Message-----
From: busybox-bounces at busybox.net [mailto:busybox-bounces at busybox.net]On
Behalf Of Jessee, Mark
Sent: Thursday, December 08, 2005 7:07 PM
To: busybox at busybox.net
Subject: read-only root fs with Busybox?




Hi,

I'm attempting to setup a read-only root filesystem on a Compact Flash card.
I'm using the GRUB bootloader and am passing 'root=/dev/hda1 ro' to the
kernel boot. This seems to do what I want. However I also need to be able to
login via telnet to make some configuration changes (requiring write
access). When I try to remount the root fs read-write, the mount command
complains that '/' or '/dev/hda1' aren't in my /etc/fstab (which they
aren't). Currently my /etc/fstab contains:

# /etc/fstab
#
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
tmpfs /var tmpfs size=25% 0 0

On my target 'cat /proc/mounts' returns:
rootfs / rootfs rw 0 0
/dev/root / ext2 ro 0 0
none /proc proc rw,nodiratime 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
tmpfs /var tmpfs rw 0 0

I'm unsure about a few things ...

Do I need to add an entry in /etc/fstab for '/' to allow the mount command
to work properly? Does this work alongside the GRUB parameters? Or does
adding an entry for '/' in /etc/fstab with the 'ro' option mean I no longer
need to pass 'ro' in GRUB?

Why does 'cat /proc/mounts' give 2 entries for '/' with 'rootfs' being 'rw'?

Any tips on the correct configuration for a read-only root fs with support
for remounting read-write?

Thanks alot,
Mark

The information contained in this e-mail message is PRIVATE. It may contain
confidential information and may be legally privileged. It is intended for
the exclusive use of the addressee(s). If you are not the intended
recipient, you are hereby notified that any dissemination, distribution or
reproduction of this communication is strictly prohibited. If the intended
recipient(s) cannot be reached or if a transmission problem has occurred,
please notify the sender immediately by return e-mail and destroy all copies
of this message.
Thank you.




More information about the busybox mailing list