On 03/05/15 01:52, Joshua Kramer wrote:
Hello-
I just did a new install of RSEL6 on my Raspberry Pi via the "install
Raspbian, then wipe out the root directory and replace it with RSEL root
directory" method.
For some reason, the system is mounting the root directory as read-write
from the very start. This has the undesired side-effect of a warning
prompt on boot, something to the effect of "Warning: running fsck on a
mounted filesystem. This WILL cause SEVERE damage. Continue?" Of
course I can 'N' to not continue and then it resumes booting up.
Here's what I have under /etc/fstab:
/dev/mmcblk0p2 / ext4 ro,defaults,noatime 1 1
/dev/mmcblk0p1 /boot vfat defaults,noatime 1 2
/dev/sda1 /var ext4 defaults,noatime 1 2
/dev/sda2 /home ext4 defaults,noatime 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
(/dev/sda is an external USB hard disk. I put /var and /home on there
so as to not burn through SD cards...)
What am I doing wrong here?
You shouldn't have your / specified as ro in fstab, that is _wrong_ and
will make the whole thing not work.
The fsck warnings you are seeing is from earlier in the init than
anything to do with the fstab. What you need to do is add "ro" to your
kernel parameters, to tell it to mount the rootfs read-only.
The process is something like:
1) Kernel mounts rootfs (ro if you tell it to, which you should)
2) rc.sysinit runs and if required performs fsck on the rootfs and other
FS-es listed in fstab
3) rc.sysinit then remounts rootfs as per your fstab parameters and
mounts other non-network file systems
If it still doesn't work after you add "ro" to your kernel boot
parameters, then you have an initrd problem. It is a common hack on ARM
devices with various dodgy/broken/closed boot loaders to have the initrd
handle a few things like mounting the rootfs explicitly because, e.g.
you have no access to modify the kernel boot parameters, but there is no
need for such hacks on the Pi.
Or you could just grab the RedSleeve Pi image from on of the mirrors and
use that, no need to reinvent the wheel.
Gordan
_______________________________________________
users mailing list
[email protected]
http://lists.redsleeve.org/mailman/listinfo/users