I'm trying to set up a auto backup, so want to figure out how to mount an external hard drive in a script.
According to blkid this is the UUID that is for the external drive:
Code:
joe@crunchbang:~$ blkid
/dev/sdf1: LABEL="root_backup" UUID="0fda3ef4-5a62-43e8-b4e6-6eb655a9c6af" TYPE="ext4"
I put this entry in /etc/fstab:
Quote:
# External hard drive
0fda3ef4-5a62-43e8-b4e6-6eb655a9c6af /media/root_backup ext4 defaults,noauto 0 2
|
When I try to mount the device with UUID I get an error:
Code:
sudo mount -U 0fda3ef4-5a62-43e8-b4e6-6eb655a9c6af
mount: no such partition found
Also with trying to mount with the diredtory:
Quote:
joe@crunchbang:~$ sudo mount /media/root_backup/
mount: special device 0fda3ef4-5a62-43e8-b4e6-6eb655a9c6af does not exist
|
I could put an entry in the script like:
Quote:
joe@crunchbang:~$ sudo mount -t ext4 /dev/sdf1 /media/root_backup/
|
but the device is not always the same.
Any suggestions of how to resolve this?
Thanks