Ubuntu: Mount disk partitions at system startup
Create script like following:
#!/bin/bash
if
! test -x "/media/PartitionA"
then
mkdir /media/PartitionA
fi
if
! test -x "/media/PartitionB"
then
mkdir /media/PartitionB
fi
mount /dev/sda1 /media/PartitionA
mount /dev/sdb1 /media/PartitionB
Now let's tell Ubuntu that this script must be run at startup:
Edit /etc/rc.local file and add absolute path to your script.
#!/bin/sh -e
#
# ...
#Mount Windows partitions
/home/ubuntuUser/Desktop/mount-partitions.sh
exit 0
Important note!
Remember that /etc/rc.local must be ended with exit 0
Written by Adam Dziendziel
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#