Fstab editing causes hang

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Fstab editing causes hang

Postby fmayhewubh on Tue Apr 16, 2013 6:54 pm

Hello,
Im running LM14 and want to auto mount a hard disk on boot or log in. I did it the old fassioned way, editing fstab, but when it boots and gets to the linux mint splash screen, some application trys to access/mount/somthing the drive i set up to auto mount, but cant, so the system hangs until i press "S" to skip the disk. it may be the file system error dector beacuse this error follows any "must check for errors on sd*#" statements.

I can boot again, had to add noauto to fstab (or comment the line) but still want it mounted when i start using my system. nothing system vital is on it so auto mounting on log in would suffice. i just don't want to have to manualy mount the FS.

Thanks for not saying "google it" (already did, pysdm is gone.)
fmayhewubh
Level 1
Level 1
 
Posts: 6
Joined: Thu Nov 29, 2012 1:24 pm

Linux Mint is funded by ads and donations.
 

Re: Fstab editing causes hang

Postby altair4 on Tue Apr 16, 2013 7:08 pm

What would help the folks here answer your question is to post the output of the following commands so they can see how things are set up:

Code: Select all
cat /etc/fstab

Code: Select all
sudo blkid -c /dev/null
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5837
Joined: Tue Feb 03, 2009 10:27 am

Re: Fstab editing causes hang

Postby fmayhewubh on Tue Apr 16, 2013 7:12 pm

FSTAB
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>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sdd2 during installation
UUID=89ee5b26-66ac-4c09-b674-3bdf3950e02c /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdd6 during installation
UUID=bd62a968-f9dd-43d4-9a77-962646c49f9e none            swap    sw              0       0
#after install options
UUID=a81866e4-17e8-4fa0-a25c-eb1fbacac494       /media/fen/Mayhew\040Storage/    ext4   user,noauto  0 1


blkid
Code: Select all
/dev/sdb2: UUID="89ee5b26-66ac-4c09-b674-3bdf3950e02c" TYPE="ext4"
/dev/sdb5: LABEL="home1" UUID="cb5db27f-6ede-406c-8c16-8a19939a971a" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb6: UUID="bd62a968-f9dd-43d4-9a77-962646c49f9e" TYPE="swap"
/dev/sdb7: LABEL="cross platf" UUID="0464-500F" TYPE="vfat"
/dev/sdc1: LABEL="Gentoo" UUID="00f6a405-bc15-4149-8597-31993eebad13" TYPE="ext4"
/dev/sdc2: UUID="c64af971-77f9-44af-9b60-faccad060918" TYPE="swap"
/dev/sdd1: LABEL="Mayhew Storage" UUID="a81866e4-17e8-4fa0-a25c-eb1fbacac494" TYPE="ext2"

sdd1 is the drive in question.
fmayhewubh
Level 1
Level 1
 
Posts: 6
Joined: Thu Nov 29, 2012 1:24 pm

Re: Fstab editing causes hang

Postby altair4 on Tue Apr 16, 2013 7:20 pm

Mayhew Storage appears to be ext2 but you are trying to mount it ext4. Probably doesn't matter but I would remove the last "/" after storage as well.

Give this a shot:

Change the line to this:
Code: Select all
UUID=a81866e4-17e8-4fa0-a25c-eb1fbacac494       /media/fen/Mayhew\040Storage    ext2   defaults,user  0 1

Save it. If you have mounted it manually unmount it then run the following command to remount it:
Code: Select all
sudo mount -a


If it just comes back to the prompt then it mounted it. If it comes back with an error message then that may be the problem.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5837
Joined: Tue Feb 03, 2009 10:27 am

Re: Fstab editing causes hang

Postby fmayhewubh on Tue Apr 16, 2013 8:20 pm

just so you know it will mount manualy(gui & cli). w/o changes.
fmayhewubh
Level 1
Level 1
 
Posts: 6
Joined: Thu Nov 29, 2012 1:24 pm

Re: Fstab editing causes hang

Postby fmayhewubh on Tue Apr 16, 2013 8:26 pm

Code: Select all
sudo mount -a


Came back w/ empty prompt. problem persists on boot.
fmayhewubh
Level 1
Level 1
 
Posts: 6
Joined: Thu Nov 29, 2012 1:24 pm

Re: Fstab editing causes hang

Postby altair4 on Wed Apr 17, 2013 7:22 am

Create a new mount point and get it out of that /media/fen directory:
Code: Select all
sudo mkdir "/media/Mayhew Storage"

Change the line to this:
Code: Select all
UUID=a81866e4-17e8-4fa0-a25c-eb1fbacac494       /media/Mayhew\040Storage    ext2   defaults  0 2

Run the mount command to test syntax:
Code: Select all
sudo mount -a

Then reboot to see if the problem persists.

If it does go back to the user + noauto method and automate the manual mount:

Change the line to this:
Code: Select all
UUID=a81866e4-17e8-4fa0-a25c-eb1fbacac494       /media/fen/Mayhew\040Storage    ext2   defaults,user,noauto  0 2

Then add a mount to your startup applications:

Menu > Preferences > Startup Applications

Name: Mount-sdd1
Command: mount "/media/fen/Mayhew Storage"

Then logoff and login to see if it mounts correctly.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5837
Joined: Tue Feb 03, 2009 10:27 am

Re: Fstab editing causes hang

Postby fmayhewubh on Wed Apr 17, 2013 5:04 pm

Bless you altair4, it works ^.^ thanks much.

Idk what piece of software uses those /media/<username>/ folders but it'd be nice to see it tweaked so edits to fstab wouldn't cause so much problems.
fmayhewubh
Level 1
Level 1
 
Posts: 6
Joined: Thu Nov 29, 2012 1:24 pm

Re: Fstab editing causes hang

Postby PeterHi on Wed May 08, 2013 5:27 am

I had same difficulty. In the end it was solved by replacing 'default' by 'user' in fstab. I suspect that being new (2 weeks old) to Linux I wanted to make my drives as much like a Mac as possible and had used chown peter:peter and chmod to 0740. T :) rying to mount as root as default does caused a whole string of error messages from sudo mount -a. Anyway thanks for help as without it I wouldn't have known where to start.
PeterHi
Level 1
Level 1
 
Posts: 1
Joined: Wed May 08, 2013 5:08 am

Re: Fstab editing causes hang

Postby altair4 on Wed May 08, 2013 6:46 am

PeterHi wrote:I had same difficulty. In the end it was solved by replacing 'default' by 'user' in fstab.

It's "defaults" not "default" and changing "defaults" to "user" wouldn't have done anything. The "user" option in the context of fstab and without the "noauto" option is irrelevant since the only user at the moment fstab is read at boot time is root. "user" doesn't relate to who can use it it relates to who can mount it. "defaults" contains the option "nouser" - this will make it so only root can mount the partition and this is how the UNIX gods intended it.
Trying to mount as root as default does caused a whole string of error messages from sudo mount -a.

This is the way ( with defaults ) partitions have been mounted in UNIX/Linux for 40+ years.
I suspect that being new (2 weeks old) to Linux I wanted to make my drives as much like a Mac as possible and had used chown peter:peter and chmod to 0740.

It's not really relevant in this case because group=user but you don't want to chmod a directory with an even value number ( the "4" ). It must always be odd because that makes the directory executable and for a directory that enables it to be opened ( or traversed if you want to be persnickety about it :) )
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5837
Joined: Tue Feb 03, 2009 10:27 am

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 14 guests