Add fstab file. Also mount the data partition on the external SD
This commit is contained in:
parent
6e360802bd
commit
f5eefd5f78
@ -73,16 +73,10 @@ config_rootfs() {
|
|||||||
echo -e "\nT0:23:respawn:/sbin/getty -L ttymxc0 115200 vt100\n" >> ./rootfs/etc/inittab
|
echo -e "\nT0:23:respawn:/sbin/getty -L ttymxc0 115200 vt100\n" >> ./rootfs/etc/inittab
|
||||||
|
|
||||||
mkdir ./rootfs/mnt/onboard
|
mkdir ./rootfs/mnt/onboard
|
||||||
echo -e "/dev/mmcblk0p3 /mnt/onboard vfat noatime 0 1\n" > ./rootfs/etc/fstab
|
mkdir ./rootfs/mnt/external
|
||||||
echo -e "tmpfs /tmp tmpfs defaults 0 0\n" >> ./rootfs/etc/fstab
|
cp files/fstab rootfs/etc/
|
||||||
|
chown root:root rootfs/etc/fstab
|
||||||
# Prevents documentation from being installed to persistent storage
|
chmod 644 rootfs/etc/fstab
|
||||||
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
|
|
||||||
|
|
||||||
echo "Configuration done."
|
echo "Configuration done."
|
||||||
}
|
}
|
||||||
|
15
files/fstab
Normal file
15
files/fstab
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user