read-only root fs with Busybox?

Jessee, Mark Mark.Jessee at
Fri Dec 9 01:07:05 UTC 2005


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,

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. 

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the busybox mailing list