If you are using a DIY distribution like Arch, this is a necessary thing to do after every reboot. So, it is better to wrap the steps up in a script and automate it using rc.d
. Say, I have 3 partitions that I would like to mount to 3 directories.
/media/
and create 3 directories called windows
, disk3
, storage
.
cd /media/
sudo mkdir windows disk3 storage
mounting
with following content:
##startup script to mount the disk drives
sudo mount /dev/sda1 /media/windows
sudo mount /dev/sda3 /media/disk3
sudo mount /dev/sda5 /media/storage
#EOF
chmod +x mounting
/etc/init.d/
:
sudo cp mounting /etc/init.d/
rc.d
so that the script is executed at startup:
sudo update-rc.d mounting defaults