Mounted Drives and Persistence


I ended my previous post right before I edited the fstab -why, you might ask? Well, the first time that I edited this file, I used spaces to delimit the various values, when actually a tab should have been used – except for the final two values, around dumping ability and priority, which uses a space between the two.

My raspberry pi did not like that, and immediately hard-crashed, demanding a complete OS reinstallation. So that was a learning experience!

Thus, I wanted to do due diligence before approaching that step. To recap, up to this point I have created a partition on an attached system hard drive, created a filesystem (ext4), created a public folder under ‘mnt’ (/mnt/public) and had successfully mounted the drive to that mount point. However, that mounting would disappear upon system reboot.

To fix this, I opened up the file ‘/etc/fstab’ and used this syntax:

<src drive> tab <mount point> tab <FS type> tab defaults tab 1 space 2

I saved the file, and reboot the machine. Sure enough, upon reboot, the dev/sda1 drive was still mounted at /mnt/publc.

Hooray!


Leave a comment