[Solved!] Hdd will not mount when formatted to ext4

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
nonekiller

[Solved!] Hdd will not mount when formatted to ext4

Post by nonekiller »

when I try to mount my hdd when it is formated to ext4 it will give me this error:
Error mounting system-managed device /dev/sda1: Command-line `mount "/mnt/sda1"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

then when i type in "dmesg | tail" terminal i get:
[ 110.665895] EXT4-fs (sda1): Unrecognized mount option "x-gvfs-show" or missing value
[ 575.989223] EXT4-fs (sda1): Unrecognized mount option "x-gvfs-show" or missing value

I know that the hdd works because if i format it as ntfs it works just fine, can someone help me?
PS. my fstab is:

# /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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sdb5 during installation
UUID=222d9078-879f-43af-b41d-04ee41f2ea78 / ext4 errors=remount-ro 0 1
# swap was on /dev/sdb6 during installation
UUID=3dea3943-aa29-4f08-a18c-94d528f6a83a none swap sw 0 0
/dev/sda1 /mnt/sda1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/sdb2 /mnt/sdb2 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/sda2 /mnt/sda2 auto nosuid,nodev,nofail,x-gvfs-show 0 0
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18209
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: [Help] Hdd will not mount when formatted to ext4

Post by karlchen »

Hello, nonekiller.

/dev/sda1 has been formatted to filesystem ext4. The corresponding line in fstab has to specify ext4 as the filesystem type, not x-gvfs-show.
Therefore the corresponding line should read

Code: Select all

/dev/sda1 /mnt/sda1 ext4 rw,nosuid,nodev,uhelper=udisks 0 0
HTH,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
nonekiller

Re: [Help] Hdd will not mount when formatted to ext4

Post by nonekiller »

ok so i edited my fstab with the line you gave me and it dosent show up in the gui(i use the hdd for backups) but if i add x-gvfs-show to the end of your line it shows but the same error occurs, any ideas?
If i mount it with "sudo mount /dev/sda1 /mnt/sda1" it'll show in /mnt/sda1 but i cant edit it,but it will mount fine with that command besides the fact i dont have permission to edit it. I would think it would have somthing to do with useing sudo to mount it, but it would not let me mount it without using sudo. sry i don't know much about linux, i switched over last month.
on a side note i think i gave you post 666 :p
cecar

Re: [Help] Hdd will not mount when formatted to ext4

Post by cecar »

Try in terminal

Code: Select all

sudo chown -R yourusername:yourusername /mnt/sda1
Change yourusername to whatever your username is.
User avatar
karlchen
Level 23
Level 23
Posts: 18209
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: [Help] Hdd will not mount when formatted to ext4

Post by karlchen »

Hi, cecar. Hello, nonekiller.

I got my fstab entry by
  • opening Nautilus
  • clicking on the device /dev/sda1, displayed with its label "lm13cinn" here, thus mounting it
  • running the command mount as well as cat /etc/mtab
  • replacing my mount point /media/lm13cinn by /mnt/sda1
Yet, and this was very likely my mistake: I neglected to check the owner and group of the mount point /media/lm13cinn.

So I assume that after running the commandline given by you, cecar, once, /dev/sda1 should be mounted on /mnt/sda1 without further hassle. (I do hope so.)

Kind regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: [Help] Hdd will not mount when formatted to ext4

Post by altair4 »

For what it's worth:

Udisks has been rewritten ( udisks2 ) and the "Disks" utility ( aka gnome-disk-utility, aka Palimpsest ) has been rewritten for it ( by the same developer ) which is why you have the x-gvfs-show option showing up. "x-gvfs-show" forces the device to show up in the UI where it was never intended. The whole thing is a mess really and multiple bug reports have already been submitted.

My suggestion is you go back to doing it the old way:

** Don't use /dev/sdxy use UUID's. You have multiple physical disks so you are just asking for trouble if you don't use UUID's.
** Don't use x-gvfs-show. If you want it to show up in say Nemo or wherever just bookmark it.

Here is an ext4 template:

Code: Select all

UUID=076426af-cbc5-4966-8cd4-af0f5c879646 /media/Data ext4 defaults,noatime 0 2
Run the following command to find the right UUID number for your partition:

Code: Select all

sudo blkid -c /dev/null
With the right UUID number you would replace this line in fstab:
/dev/sda1 /mnt/sda1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
With something that looks like this:

Code: Select all

UUID=076426af-cbc5-4966-8cd4-af0f5c879646 /mnt/sda1 ext4 defaults,noatime 0 2
To make it show up in the file manager bookmark it:
Open Nemo and go to /mnt/sda1 then select Bookmarks > Add Bookmark
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
nonekiller

Re: [Help] Hdd will not mount when formatted to ext4

Post by nonekiller »

Thanks karlchen,cecar, and altair4 for your prompt help this problem now has been resolved, i set all my hdd to use the uuid and got the hdd permissions set properly.

-nonekiller
User avatar
karlchen
Level 23
Level 23
Posts: 18209
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: [Solved!] Hdd will not mount when formatted to ext4

Post by karlchen »

Hello, nonekiller.

Glad to learn that you have achieved your goal, in particular with the help of altair4's post.


Hello, altair4.

Thank you for drawing my/our attention to the differences implemented in Ubuntu 12.10/Mint 14 as compared to Ubuntu 12.04/Mint 13. - I admit that I had done my tests on ancient Lucid Lynx (Ubuntu 10.04) before writing my reply. :oops:

Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
Locked

Return to “Beginner Questions”