mount -o nosuid,noexec,nodev -t proc proc /proc
/bin/mkdir /sysroot
+/bin/mkdir /opt
#Find devices
ROOTFS=`/sbin/blkid -L rootfs`
fi
#Check and mount devices
+FIRSTBOOT=1
+if [ x"$DATAFS" != "x" ]
+then
+ /bin/mount $DATAFS /opt
+
+ if [ -e /opt/var/.fsck_done ]
+ then
+ FIRSTBOOT=0
+ else
+ echo " " > /opt/var/.fsck_done
+ /bin/umount /opt
+ fi
+fi
+
if [ x$ROOTFS != "x" ]
then
- /sbin/fsck -y $ROOTFS
- /sbin/resize2fs -f $ROOTFS
+ if [ "$FIRSTBOOT" = "1" ]
+ then
+ /sbin/resize2fs -f $ROOTFS
+ /sbin/fsck -y $ROOTFS
+ fi
/bin/mount $ROOTFS /sysroot
else
echo "WARNING : THERE IS NO ROOTFS."
if [ x$MODULES != "x" ]
then
- /sbin/fsck -y $MODULES
- /sbin/resize2fs -f $MODULES
+ if [ "$FIRSTBOOT" = "1" ]
+ then
+ /sbin/resize2fs -f $MODULES
+ /sbin/fsck -y $MODULES
+ fi
/bin/mount $MODULES /sysroot/usr/lib/modules
fi
if [ x"$DATAFS" != "x" ]
then
- /sbin/fsck -y $DATAFS
- /sbin/resize2fs -f $DATAFS
- /bin/mount $DATAFS /sysroot/opt
+ if [ "$FIRSTBOOT" = "1" ]
+ then
+ /sbin/resize2fs -f $DATAFS
+ /sbin/fsck -y $DATAFS
+ /bin/mount $DATAFS /sysroot/opt
+ else
+ /bin/mount -M /opt /sysroot/opt
+ fi
fi
cd /sysroot