Skip to content

Commit

Permalink
[script] Rework tmpfs
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeyexp committed Jul 8, 2018
1 parent b09bba7 commit d28b897
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stage2/05-crankshaft-system-ro/01-run-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sed -i 's/.*ROOTDEV.*/\/dev\/mmcblk0p2\t\/\t\text4\t\t\tro,defaults,noatime\t0\t
sed -i '/^$/d' /etc/fstab
echo "tmpfs /var/log tmpfs nodev,nosuid 0 0" >> /etc/fstab
echo "tmpfs /var/tmp tmpfs nodev,nosuid 0 0" >> /etc/fstab
echo "tmpfs /var/lib tmpfs nodev,nosuid 0 0" >> /etc/fstab
echo "tmpfs /var/lib/alsa tmpfs nodev,nosuid 0 0" >> /etc/fstab
echo "tmpfs /tmp tmpfs nodev,nosuid 0 0" >> /etc/fstab
echo "tmpfs /tmp/.local tmpfs nodev,nosuid 0 0" >> /etc/fstab
echo "tmpfs /tmp/.config tmpfs nodev,nosuid 0 0" >> /etc/fstab
Expand All @@ -18,10 +18,11 @@ sed -i 's/root=ROOTDEV/root=\/dev\/mmcblk0p2/' /boot/cmdline.txt
sed -i "s/#Storage=auto/Storage=volatile/" /etc/systemd/journald.conf

# Link dirs for read only
rm -rf /var/spool /var/lock /var/lib/dhcp/ /var/cache/apt/
rm -rf /var/spool /var/lock /var/lib/dhcp /var/lib/dhcpcd5 /var/cache/apt/
rm /etc/resolv.conf

ln -s /tmp /var/lib/dhcp
ln -s /tmp /var/lib/dhcpcd5
ln -s /tmp /var/spool
ln -s /tmp /var/lock
ln -s /tmp/.config /home/pi/
Expand Down

0 comments on commit d28b897

Please sign in to comment.