Auto Mounting External


Recommended Posts

Hey,

Im running Ubuntu and have a problem with automatically mounting my media HD at boot up on the ubuntu desktop. Currently I log in and see NOTHING on my desktop. In order to access my external, I have to go into "computer" and double click on the external drive, it will then ask me to use the same user/password I did on logging into ubuntu. After that I see the shortcut on my desktop and can access it freely.

I want to avoid that totally and just see the shortcut on my desktop after I log in.

Link to comment
Share on other sites

Hey,

Im running Ubuntu and have a problem with automatically mounting my media HD at boot up on the ubuntu desktop. Currently I log in and see NOTHING on my desktop. In order to access my external, I have to go into "computer" and double click on the external drive, it will then ask me to use the same user/password I did on logging into ubuntu. After that I see the shortcut on my desktop and can access it freely.

I want to avoid that totally and just see the shortcut on my desktop after I log in.

I had gotten one of those media HHDs (new) from a friend as trade for my iPod Video 60gig (Couple years old and won in a contest.). It was a Seagate FreeAgent 250Gb USB external Drive. It would appear to be mount and then unmount itself quite a bit. I even tried to use different formats and still no go. It worked fine under my XP partition as NTFS, but Ubuntu had trouble seeing it in any format. I thing it is because it is not a bootable drive that Ubuntu has the trouble with on it. I traded back after a couple of days of trying to get it to work properly under Ubuntu. I do have an older 40GB IDE that I put in an USB 2.0 casing that works perfectly under Ubuntu, though.

Link to comment
Share on other sites

You have to edit the file /etc/fstab to tell it to automount. If you can't figure out what you need to do, post the contents of that file and I or someone who comes along faster will do it for you. :)

Link to comment
Share on other sites

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>	   <dump>  <pass>
proc			/proc		   proc	defaults		0	   0
# /dev/sdc1
UUID=ed6e8ea0-e2fd-490e-8a66-e94dbcc36aba /			   ext3	defaults,errors=remount-ro 0	   1
# /dev/sdc5
UUID=d21369a1-eff4-4cda-b062-96eea17a2037 none			swap	sw			  0	   0
/dev/scd0	   /media/cdrom0   udf,iso9660 user,noauto,exec 0	   0
/dev/fd0		/media/floppy0  auto	rw,user,noauto,exec 0	   0
/dev/sdc		/media/floppy1  auto	rw,user,noauto,exec 0	   0

Link to comment
Share on other sites

Sorry, I thought it'd be listed, but I suppose not, so can you please let us know what device you're trying to mount? As in /dev/sdXY where X is a letter and Y a number. To find out what it is if you don't know already, while the drive is plugged in and mounted, type "sudo fdisk -l" into a command prompt (without quotes, and that's a lowercase "L" not the number one) and post the output here.

Link to comment
Share on other sites

puner@puner-desktop:~$ sudo fdisk -l
[sudo] password for puner:

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbba6bba6

   Device Boot	  Start		 End	  Blocks   Id  System
/dev/sda1   *		   1	   38913   312568641	7  HPFS/NTFS

Disk /dev/sdb: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9ccf9ccf

   Device Boot	  Start		 End	  Blocks   Id  System
/dev/sdb1			   1		7833	62918541	7  HPFS/NTFS
/dev/sdb2			7834	   11749	31455270	7  HPFS/NTFS
/dev/sdb3		   11750	   14946	25679902+   f  W95 Ext'd (LBA)
/dev/sdb5		   11750	   14946	25679871	7  HPFS/NTFS

Disk /dev/sdc: 10.2 GB, 10242892800 bytes
255 heads, 63 sectors/track, 1245 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000e13df

   Device Boot	  Start		 End	  Blocks   Id  System
/dev/sdc1   *		   1		1186	 9526513+  83  Linux
/dev/sdc2			1187		1245	  473917+   5  Extended
/dev/sdc5			1187		1245	  473886   82  Linux swap / Solaris

I'm trying to get the 320.0GB drive to place a shortcut on the desktop right after I log into my user account.

Link to comment
Share on other sites

Add this line to the bottom of /etc/fstab

/dev/sda1	 /media/sda1	 ntfs	defaults,umask=007,gid=46 0	   1

I tried, but apparently I don't have permission even though I'm the only user on my computer.

screenshotfstabetcgeditbg5.th.png

Link to comment
Share on other sites

In linux to open files outside your /home directory, you need to be root. To open the file with the proper permissions, in the terminal type "gksudo /etc/fstab" (without quotations) and type your password when prompted. Then you should be able to add that line to the bottom of your file. After that you'll be set. :)

Link to comment
Share on other sites

The only user is still just a user.

You need to open that file as root, or use sudo to tell Linux to authorize you to execute that command as root.

sudo gedit /etc/fstab

(Y)

Link to comment
Share on other sites

I find an easier way is to install a file manager called Krusader (Like Total Commander) and a terminal program like Konsole (Both can be installed from the ADD/REMOVE menu option.) and kdesu installed from Synaptic. Right-click on the "start menu" button and under Accessories you edit the Krusader entry and replace the command section with kdesu krusader -caption "%c" %i %m. You can also change the icon to the root version. It is the orange and yellow one in the ones available. When Krusader loads up it asks you for your ROOT password and you can use it as an easier means of doing stuff that requires ROOT privileges. Also when configuring Krusader you can have it show the "Terminal Emulator" at the bottom of the manager (You can addjust the window to make it more visible. This can also make it far easier if you have to install a program in Root Mode as you can get to the folder the files are in without having to enter a lot of commands to navigate there. Also make sure that you have compressor utils like RAR and zip, and the like installed as well. You can also get these through ADD/Remove. I've done this all under Ubuntu myself.

P.S.

Some Linux distros come with Krusader already installed and also with both a non-root and root entries.

Edited by Foub
Link to comment
Share on other sites

^^^ Just to note: that method does not require "krusader" or any other specific app. You can set up any file-browsing (or other) app to run with root permissions in the same way.

Mitch is two minutes faster than I am. :pinch:

Link to comment
Share on other sites

All of that can be accomplished using Gnome and GTK apps, why bring in all the overhead of using krusader and konsole which are KDE/Qt applications?

I was use to Total Commander and Krusader was the closest to it I could find. Which Gnome versions can do the same thing and how? I discovered this method a while ago when I was first playing around with Linux and wasn't ready yet to start using it on a full time basis. I would use a VM like VixturalBOX to try out different distros in the different desktops.

Edited by Foub
Link to comment
Share on other sites

Right click the nautilus shortcut and append gksudo before it, and voila!

Ok. The one under Accessories called File Browser? I tried that and it says Starting File Browser and then it just stops loading and nothing. I tried it under Gnome Commander and it worked, but I don't see any Terminal Emulator window.

It seems for what I want and how I do it that Krusader is the better way, though. I don't have to worry about resources since I have a fast enough CPU and a Gig of RAM.

Edited by Foub
Link to comment
Share on other sites

Nautilus doesn't have a terminal, you have to launch it and it's called gnome-terminal.

Oh, I don't have to do that under Krusader since the Terminal Emulator window is already built in. Its right there at the bottom of the manager at all time. Like this.

Screenshot.png

Link to comment
Share on other sites

^^^ Just to note: that method does not require "krusader" or any other specific app. You can set up any file-browsing (or other) app to run with root permissions in the same way.

Mitch is two minutes faster than I am. :pinch:

:shiftyninja:

That's twice now mark. (Posts 11 & 12) :rofl:

Link to comment
Share on other sites

That one didn't count. :p Happened in the same minute, and there was a database sort error that gave your post the earlier slot. :whistle:

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.