I installed a new hard drive that will be used for additional storage only. I have followed these instructions on Ubuntu pages to partition it, but when I follow the instructions to automatically mount it, I get lost. It tells me to enter a new line in fstab but when I enter the line, there is no way to press enter and confirm. I also see it says something about using uuid but that link is no help either.
The output of sudo fdisk -l
:
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 488397167 244198583+ ee GPT
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00034d6c
Device Boot Start End Blocks Id System
/dev/sdb1 2048 1953523711 976760832 83 Linux
sudo blkid:
/dev/sda1: UUID="9EDD-FADC" TYPE="vfat"
/dev/sda2: UUID="f45d9121-db97-4b97-bdf1-6db2ceaaa3b6" TYPE="ext4"
/dev/sda3: UUID="f908decc-66cd-41ec-a588-7df965077dea" TYPE="swap"
/dev/sdb1: UUID="4dfbef06-0f1a-4ec4-a637-0ea911e656ba" TYPE="ext4"
cat etc/fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=f45d9121-db97-4b97-bdf1-6db2ceaaa3b6 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=9EDD-FADC /boot/efi vfat defaults 0 1
# swap was on /dev/sda3 during installation
UUID=f908decc-66cd-41ec-a588-7df965077dea none swap sw 0 0
UUID=4dfbef06-0f1a-4ec4-a637-0ea911e656ba /media/micah/new_hd ext4 defaults 0 2
Mounting partition require first mount point. Create a directory where you want to mount the partition of new hdd:
(Note that the first time you use the sudo command prompts you to enter your password)
Second step, find the UUID of the partition to mount:
read output, and copy the relevant UUID.
Finally, edit
/etc/fstab
(assuming that the filesystem is ext4):fields in
fstab
are:so add this line:
To do that, remember to edit with superuser permission, then using
sudo
:Note: Gtk-WARNING when execute this command is normal. instead of
gedit
you can usenano
orvim
(non-GUI editor).Check if new line was added, by typing:
Then mounting and checking the partitions typing the following command in terminal:
If everything is ok, this command should not give back any output, and partition the new hd should be mounted.
Type
man fstab
for more help and options, or read here as suggested, and typeman sudo
for help withsudo
command.The answer was changing the ownership. I moved the directory to /home/micah/Media instead of /media/micah/new_hd. I then entered sudo chown micah:micah /home/micah/Media -R and after a reboot I now have permission to use the hard drive. One question. I know I can use the hard drive listed under devices but is there a way to have the "Media" folder show up on the left side of Nautilus just like "Pictures, Videos"? Thanks for all your help @girardengo