[solved]gksudo gedit /etc/fstab not working + mount partitio

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

[solved]gksudo gedit /etc/fstab not working + mount partitio

Postby phidias81 on Sun Feb 10, 2013 9:37 am

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
Image

Below in the next message I attach my procedure to permanently mount the partition. I stop at step number 3
Last edited by phidias81 on Sun Feb 10, 2013 2:38 pm, edited 2 times in total.
At Nomad Travellers you find my travel stories, unusual places and amazing photos: visit my new website and travel from your chair! Make yourself comfortable and start your Nomad Travel! Davide
User avatar
phidias81
Level 1
Level 1
 
Posts: 43
Joined: Sun Feb 10, 2013 9:21 am

Linux Mint is funded by ads and donations.
 

Re: gksudo gedit /etc/fstab not working + mount partition

Postby phidias81 on Sun Feb 10, 2013 9:43 am

This is my gParted screen
Image

[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
At Nomad Travellers you find my travel stories, unusual places and amazing photos: visit my new website and travel from your chair! Make yourself comfortable and start your Nomad Travel! Davide
User avatar
phidias81
Level 1
Level 1
 
Posts: 43
Joined: Sun Feb 10, 2013 9:21 am

Re: gksudo gedit /etc/fstab not working + mount partition

Postby altair4 on Sun Feb 10, 2013 10:29 am

[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:
Code: Select all
gksudo pluma /etc/fstab


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.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6269
Joined: Tue Feb 03, 2009 10:27 am

Re: gksudo gedit /etc/fstab not working + mount partition

Postby phidias81 on Sun Feb 10, 2013 11:25 am

Thank you, now the editor opened. I pasted the line and after I executed
Code: Select all
sudo mount -a
and nothing happened. After I also wrote
Code: Select all
sudo chown davide /media/Data
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.
At Nomad Travellers you find my travel stories, unusual places and amazing photos: visit my new website and travel from your chair! Make yourself comfortable and start your Nomad Travel! Davide
User avatar
phidias81
Level 1
Level 1
 
Posts: 43
Joined: Sun Feb 10, 2013 9:21 am

Re: gksudo gedit /etc/fstab not working + mount partition

Postby phidias81 on Sun Feb 10, 2013 11:40 am

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

Image

Now I-m connected from the usb stick. Help :-(
At Nomad Travellers you find my travel stories, unusual places and amazing photos: visit my new website and travel from your chair! Make yourself comfortable and start your Nomad Travel! Davide
User avatar
phidias81
Level 1
Level 1
 
Posts: 43
Joined: Sun Feb 10, 2013 9:21 am

Re: gksudo gedit /etc/fstab not working + mount partition

Postby altair4 on Sun Feb 10, 2013 11:53 am

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:
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 16
Level 16
 
Posts: 6269
Joined: Tue Feb 03, 2009 10:27 am

Re: gksudo gedit /etc/fstab not working + mount partition

Postby phidias81 on Sun Feb 10, 2013 12:00 pm

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"
At Nomad Travellers you find my travel stories, unusual places and amazing photos: visit my new website and travel from your chair! Make yourself comfortable and start your Nomad Travel! Davide
User avatar
phidias81
Level 1
Level 1
 
Posts: 43
Joined: Sun Feb 10, 2013 9:21 am

Re: gksudo gedit /etc/fstab not working + mount partition

Postby phidias81 on Sun Feb 10, 2013 1:05 pm

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.
At Nomad Travellers you find my travel stories, unusual places and amazing photos: visit my new website and travel from your chair! Make yourself comfortable and start your Nomad Travel! Davide
User avatar
phidias81
Level 1
Level 1
 
Posts: 43
Joined: Sun Feb 10, 2013 9:21 am

Re: gksudo gedit /etc/fstab not working + mount partition

Postby altair4 on Sun Feb 10, 2013 1:15 pm

/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
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6269
Joined: Tue Feb 03, 2009 10:27 am

Re: gksudo gedit /etc/fstab not working + mount partition

Postby phidias81 on Sun Feb 10, 2013 2:02 pm

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?
Image
At Nomad Travellers you find my travel stories, unusual places and amazing photos: visit my new website and travel from your chair! Make yourself comfortable and start your Nomad Travel! Davide
User avatar
phidias81
Level 1
Level 1
 
Posts: 43
Joined: Sun Feb 10, 2013 9:21 am

Re: gksudo gedit /etc/fstab not working + mount partition

Postby altair4 on Sun Feb 10, 2013 2:21 pm

** 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
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6269
Joined: Tue Feb 03, 2009 10:27 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: all41, Bing [Bot] and 33 guests