Page 1 of 1
[solved]gksudo gedit /etc/fstab not working + mount partitio
Posted: Sun Feb 10, 2013 9:37 am
by phidias81
Hello, this is my first Message here, and first Linux ever for me. I have installed Mint 14.1 mate, without windows. I created several partitions for installation, plus a Data partition that I would like to mount (I didn't create \home). I read at least 20 topics to be sure of the procedure (that I will past after) but after creating the mount point, the command gksudo gedit /etc/fstab launched from the terminal is not opening anything. I see "starting administrative application" on the bar, that is closing itself without opening anything. What is wrong?
And also from computer, I cannot see my Data partition. I see a 500 gb HD icon that if I try to mount I get an error message like in the picture
Below in the next message I attach my procedure to permanently mount the partition. I stop at step number 3
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 9:43 am
by phidias81
This is my gParted screen
[1] Find the correct UUID number for your windows partitions:
Code: Select all
sudo blkid -c /dev/null
In my case: /dev/sda6: UUID="af4f8440-66b3-4001-9708-f9e1d092c8dc" TYPE="ext4"
[2] Create permanent mountpoints for your partitions to live in, in my case:
sudo mkdir /media/Data
[3] Edit fstab as root:
Code: Select all
gksudo gedit /etc/fstab
[4] Add the following lines to the end of fstab, examples:
Code: Select all
UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /media/Data ext4 defaults,noatime 0 2
[5] If you have already mounted these partitions manually through computer(icon) - unmount them.
[6] Run the following command that will test for errors and if there are none mount the partitions to their new home without requiring a reboot:
Code: Select all
sudo mount -a
[] Once it's mounted take possession of the mounted partition. For example:
Code: Select all
sudo chown /media/Data
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 10:29 am
by altair4
[3] Edit fstab as root:
Code: Select all
gksudo gedit /etc/fstab
That's for the Gnome DE. You are using MATE. The step for you is:
EDIT: This isn't quite right either:
[] Once it's mounted take possession of the mounted partition. For example:
Code: Select all
sudo chown /media/Data
This looks better:
Code: Select all
sudo chown your-user-name /media/Data
Change your-user-name to .. well ... your user name.
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 11:25 am
by phidias81
Thank you, now the editor opened. I pasted the line and after I executed
and nothing happened. After I also wrote
and still nothing happened, so I'm not sure if this is the correct behavior or something is wrong. As far as I understood, after this procedure a new Icon in my desktop was supposed to be created, but I see nothing.
Same as before if I go to computer.
If instead I go to location: /media/Data I see a folder lost+fount with an X and a lock.
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 11:40 am
by phidias81
Ok, I guess I did something wrong. Now I tried to restart and Linux is not starting up, I get a black screen and if I press a key I get this message
Now I-m connected from the usb stick. Help
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 11:53 am
by altair4
If you are running from the LiveCD or USB in your case locate the /etc/fstab file on the partition that holds Mint and put a # sign in front of the line you added:
#UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /media/Data ext4 defaults,noatime 0 2
Then see if you can boot into your box again.
If you can please post he output of the following commands:
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 12:00 pm
by phidias81
I was able to enter again. So this is what I get
Code: Select all
davide@davide-Aspire-3820 ~ $ 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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=3b82ac51-e857-495d-8b6d-92c0c28c531a / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=1e3a0511-f65b-437a-83fa-7ea93fd8031e /boot ext4 defaults 0 2
# /data was on /dev/sda6 during installation
UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /data ext4 defaults 0 2
# swap was on /dev/sda7 during installation
UUID=acc6541f-ff10-4980-8654-193dccc81515 none swap sw 0 0
#UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /media/Data ext4 defaults,noatime 0 2
Code: Select all
davide@davide-Aspire-3820 ~ $ sudo blkid -c /dev/null
[sudo] password for davide:
/dev/sda1: UUID="1e3a0511-f65b-437a-83fa-7ea93fd8031e" TYPE="ext4"
/dev/sda5: UUID="3b82ac51-e857-495d-8b6d-92c0c28c531a" TYPE="ext4"
/dev/sda6: UUID="af4f8440-66b3-4001-9708-f9e1d092c8dc" TYPE="ext4"
/dev/sda7: UUID="acc6541f-ff10-4980-8654-193dccc81515" TYPE="swap"
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 1:05 pm
by phidias81
I guess the problem is that I referred 2 times to #UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc with 2 different moun options? SO maybe I should delete that last line I added, and do binding instead as explained in this post?
Code: Select all
[3] Auto Mount at Boot by creating your own Upstart script:
This is the method I now use by default since I can make sure that the bind operation only happens after the original partition is mounted.
Create an upstart job named "bind-home.conf"
Code: Select all
gksu gedit /etc/init/bind-home.conf
The content of that file would look like this:
Code: Select all
# Remount partitions with bind
#
description "Bind Data Partition Subdirectories to My Home Directory"
start on stopped mountall
script
mount --bind /Data/Documents /home/altair/Documents
mount --bind /Data/Downloads /home/altair/Downloads
mount --bind /Data/Pictures /home/altair/Pictures
end script
The "start on stopped mountall" insures that the bind commands will not be executed until all system mounts ( i.e., fstab ) are completed.
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 1:15 pm
by altair4
/dev/sda6: UUID="af4f8440-66b3-4001-9708-f9e1d092c8dc" TYPE="ext4"
You already have this partition mounted:
UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /data ext4 defaults 0 2
There's no need for this:
#UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /media/Data ext4 defaults,noatime 0 2
If you want to change the mount point to get an icon on the desktop for this you can get the same affect by creating a launcher so that you don't have to edit fstab again - this is the simplest thing to do:
Right Click the desktop > Create launcher >
NAME: data
COMMAND: caja /data
OR, you can reverse the # sign on the 2 so that instead of this:
UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /data ext4 defaults 0 2
#UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /media/Data ext4 defaults,noatime 0 2
You would have this:
#UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /data ext4 defaults 0 2
UUID=af4f8440-66b3-4001-9708-f9e1d092c8dc /media/Data ext4 defaults,noatime 0 2
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 2:02 pm
by phidias81
Ok, thank you, it works. One last thing: is it normal that if I go to "Computer" I cannot see my Data partition. I see a 500 gb HD icon that if I try to mount I get an error message like in the picture. This link that I create on the desktop, is the only way to access my data partition? In example, if I press "open" somewhere, there is no way to browse to my data partition directly from "places" rather than going to file system>Data?
Re: gksudo gedit /etc/fstab not working + mount partition
Posted: Sun Feb 10, 2013 2:21 pm
by altair4
** I can't explain the error message or why it's showing the icon at all.
** Your /data partition is listed in "Computer". Since it's now mounted it under "File System"
** You can bookmark this mountpoint so it shows up in Caja's left side panel:
caja /data
Then Bookmark it: Bookmarks > Add Bookmark