Help! Messed up FSTAB [SOLVED]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Matt832
Level 2
Level 2
Posts: 69
Joined: Mon Feb 18, 2013 9:37 pm

Help! Messed up FSTAB [SOLVED]

Post by Matt832 » Sat Jun 16, 2018 12:26 am

Having a headache. I added a small hard drive to load video files on. I'm using Plex and Emby servers to feed to my Roku Tv. Unfortunately neither server will see the drive I added and from the research I did it seems I need to edit my Fsatb file to it can be seen. Tried to do that, now when I issue "sudo mount-a" I get an error "mount point does not exist". At this point I have not restarted my computer, odds are that will be a mess, so I need to fix what ever I did wrong. The drive I added is the last line, I got the info from blkid. Got errors I thought I fixed first "[mntent]: line 20 in /etc/fstab is bad" thought I corrected that, then got "[mntent]: line 1 in /etc/fstab is bad mount: mount point none does not exist" I think I inadvertently did a typo somewhere.

Code: Select all

# /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/sdc2 during installation
UUID=7c2d7bfd-24d0-44b3-9f09-168c3e03b645 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda1 during installation
UUID=f5f24712-85ca-4664-bde4-a2e510e742f8 none            swap    sw              0       0
# swap was on /dev/sdc1 during installation
UUID=2198402b-3811-4905-83d3-6d53689f639d none            swap    sw              0       0
/dev/disk/by-uuid/FE9C8A1F9C89D297 /mnt/FE9C8A1F9C89D297 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/ECB060BDB060903E /mnt/ECB060BDB060903E auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/B6BC5767BC572163 /mnt/B6BC5767BC572163 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/ata-TSSTcorp_CDDVDW_SH-224DB_R93E6YAF50055X /mnt/ata-TSSTcorp_CDDVDW_SH-224DB_R93E6YAF50055X auto nosuid,nodev,nofail,noauto,x-gvfs-s$
/dev/sdf1 /mnt/sdf1 auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0
UUID=af03fae6-94d9-45fe-9770-678672dab24e none             ext4                    0      0
Here is my info from blkid:

Code: Select all

/dev/sda1: LABEL="System Reserved" UUID="B6BC5767BC572163" TYPE="ntfs" 
/dev/sda2: UUID="38AC6540AC64F9B0" TYPE="ntfs" 
/dev/sda3: LABEL="New Volume" UUID="B644F65E44F620B3" TYPE="ntfs" 
/dev/sda5: UUID="0d3c26fb-55d7-45ff-9984-322c75033ead" TYPE="ext4" 
/dev/sda6: UUID="e2a07615-b931-4ef2-ba99-3c627ce9c975" TYPE="swap" 
/dev/sdb1: LABEL="System Reserved" UUID="ECB060BDB060903E" TYPE="ntfs" 
/dev/sdb2: LABEL="Video" UUID="7CFC63CAFC637CF0" TYPE="ntfs" 
/dev/sdc1: LABEL="Video 2" UUID="FE9C8A1F9C89D297" TYPE="ntfs" 
/dev/sdd1: LABEL="cxx" UUID="af03fae6-94d9-45fe-9770-678672dab24e" TYPE="ext4" 
/dev/sdd5: UUID="ea4610cb-0099-438f-9857-a4674012494a" TYPE="swap" 
/dev/sde1: UUID="2198402b-3811-4905-83d3-6d53689f639d" TYPE="swap" 
/dev/sde2: UUID="7c2d7bfd-24d0-44b3-9f09-168c3e03b645" TYPE="ext4" 
sdd1 labled cxx is what I'm trying to add.

Not sure what the problem is, help is appreciated...
Last edited by Matt832 on Thu Jun 28, 2018 1:21 am, edited 2 times in total.

User avatar
catweazel
Level 16
Level 16
Posts: 6964
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Help! Messed up FSTAB

Post by catweazel » Sat Jun 16, 2018 2:21 am

Matt832 wrote:
Sat Jun 16, 2018 12:26 am
I need to fix what ever I did wrong.
Edit the file again and undo the changes.

What's wrong is the last line is missing a mount point.
Caution: Dancing Wu Li Master and Official curmudgeon-in-chief

Matt832
Level 2
Level 2
Posts: 69
Joined: Mon Feb 18, 2013 9:37 pm

Re: Help! Messed up FSTAB

Post by Matt832 » Sat Jun 16, 2018 7:24 am

Ok, thanks -

But I'm back where I started. I just removed the last line for the drive I want to add, no issues this time. How do I add the new drive in? Odds are I've been staring at it too long but for some reason I'm not seeing it.

Mattyboy
Level 6
Level 6
Posts: 1196
Joined: Thu Mar 26, 2015 2:17 pm

Re: Help! Messed up FSTAB

Post by Mattyboy » Sat Jun 16, 2018 8:25 am

Matt832 wrote:
Sat Jun 16, 2018 7:24 am
Ok, thanks -

But I'm back where I started. I just removed the last line for the drive I want to add, no issues this time. How do I add the new drive in? Odds are I've been staring at it too long but for some reason I'm not seeing it.
:)

You need to add the mount point. /mnt/folderNAME

Code: Select all

UUID=af03fae6-94d9-45fe-9770-678672dab24e /mnt/folderNAME none ext4 0 0

altair4
Level 19
Level 19
Posts: 9187
Joined: Tue Feb 03, 2009 10:27 am

Re: Help! Messed up FSTAB

Post by altair4 » Sat Jun 16, 2018 9:19 am

/etc/fstab tells you how to do this in the file itself:
# <file system> <mount point> <type> <options> <dump> <pass>
So from blkid:
/dev/sdd1: LABEL="cxx" UUID="af03fae6-94d9-45fe-9770-678672dab24e" TYPE="ext4"
<file system> == LABEL=cxx OR UUID=af03fae6-94d9-45fe-9770-678672dab24e
<mount point> == Can be anything you want. If you want it to show up on the side panel of your file manager: /media/cxx
If not: /mnt/cxx
<type> == ext4
<options> = make it simple and just use defaults
<dump> == make it simple and just use 0
<pass> == for an ext4 it's customary to use 2

So the line in fstab would look like this:

Code: Select all

LABEL=cxx /media/cxx ext4 defaults 0 2
OR

Code: Select all

UUID=af03fae6-94d9-45fe-9770-678672dab24e /media/cxx ext4 defaults 0 2
** Create the mount point:

Code: Select all

sudo mkdir /media/cxx
** Mount the partition:

Code: Select all

sudo mount -a
If this is a new partition you will need to adjust ownership and permissions so that you can write to it. For a Linux fileystem you do that after the partition is mounted to its mount point not before.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Matt832
Level 2
Level 2
Posts: 69
Joined: Mon Feb 18, 2013 9:37 pm

Re: Help! Messed up FSTAB [SOLVED]

Post by Matt832 » Thu Jun 28, 2018 1:23 am

Altair4 Thanks! Finally got around to working on this. Your explanation helped my understanding of the commands a bit more. Followed your directions and it works as it should. Appreciate the help

Post Reply

Return to “Newbie Questions”