Commit 7985740c authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

mount rootfs readonly to prevent CRC errors after hard resets

The script wrfs_mnt can be used for remounting rootfs to update the
configuration of the switch.
parent 5b6848ab
......@@ -3,7 +3,7 @@
# boot kernel from bad block aware partition
cp /dev/nand0.kernel.bb /dev/mem.kernel
bootargs="console=ttyS0,115200 panic=10 mem=64M"
bootargs="$bootargs root=/dev/mtdblock1 rootfstype=jffs2"
bootargs="$bootargs root=/dev/mtdblock1 rootfstype=jffs2 ro"
bootargs="$bootargs wr_nic.macaddr=$macaddr"
bootz /dev/mem.kernel
......
......@@ -15,7 +15,7 @@
# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
#::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
::sysinit:/bin/mkdir -p /dev/pts
::sysinit:/bin/mkdir -p /dev/shm
::sysinit:/bin/mount -a
......
#!/bin/ash
if [ ! $# -eq 1 ]; then
echo "ro/rw paremeter needed"
exit 0
fi
if [ $1 = "rw" ]; then
echo "Remounting rootfs read/write"
mount -o remount,rw,sync /
fi
if [ $1 = "ro" ]; then
echo "Remounting rootfs read-only"
sync
mount -o remount,ro,async /
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment