diff --git a/build_rootfs.sh b/build_rootfs.sh index 05ab12a..64f0eed 100755 --- a/build_rootfs.sh +++ b/build_rootfs.sh @@ -73,16 +73,10 @@ config_rootfs() { echo -e "\nT0:23:respawn:/sbin/getty -L ttymxc0 115200 vt100\n" >> ./rootfs/etc/inittab mkdir ./rootfs/mnt/onboard - echo -e "/dev/mmcblk0p3 /mnt/onboard vfat noatime 0 1\n" > ./rootfs/etc/fstab - echo -e "tmpfs /tmp tmpfs defaults 0 0\n" >> ./rootfs/etc/fstab - - # Prevents documentation from being installed to persistent storage - echo -e "tmpfs /usr/share/man tmpfs defaults 0 0\n" >> ./rootfs/etc/fstab - echo -e "tmpfs /usr/share/info tmpfs defaults 0 0\n" >> ./rootfs/etc/fstab - echo -e "tmpfs /usr/share/doc tmpfs defaults 0 0\n" >> ./rootfs/etc/fstab - - # Don't store logs (to save space & reduce flash wear) - echo -e "tmpfs /var/log tmpfs defaults 0 0\n" >> ./rootfs/etc/fstab + mkdir ./rootfs/mnt/external + cp files/fstab rootfs/etc/ + chown root:root rootfs/etc/fstab + chmod 644 rootfs/etc/fstab echo "Configuration done." } diff --git a/files/fstab b/files/fstab new file mode 100644 index 0000000..c0f4c89 --- /dev/null +++ b/files/fstab @@ -0,0 +1,15 @@ +# Data on the internal SD +/dev/mmcblk0p3 /mnt/onboard vfat noatime 0 1 + +# Data on the external SD +/dev/mmcblk1p3 /mnt/external vfat noatime 0 1 + +# Prevent documentation from being installed to persistent storage +tmpfs /usr/share/man tmpfs defaults 0 0 +tmpfs /usr/share/info tmpfs defaults 0 0 +tmpfs /usr/share/doc tmpfs defaults 0 0 + +# Don't store logs (to save space & reduce flash wear) +tmpfs /var/log tmpfs defaults 0 0 + +tmpfs /tmp tmpfs defaults 0 0