Mount USB HDD to a certain /media/folder after boot

SYNass IT Ubuntu / Linux i-ubux at synass.net
Tue May 27 00:54:01 UTC 2008


Hi David
Thanks for your feedback and the explanations.
More quoted in your text below:


On Mon, 2008-05-26 at 06:50 -0700, David Vincent wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> SYNass IT Ubuntu / Linux wrote:
> > Well one question I can bring up here:
> > In our recent discussion was a difference of
> >
> > /dev/sdb5 or /dev/sdb6 against
> > /media/sdb5 or /media/sdb6 !?
> >
> > fstab shows "media" others, i.e. GParted, are showing "sdbx !!??
> > How can I get this circle closing correctly ?
> 
> let's see if i can get this right.
> 
> every drive is represented in /dev as a /dev/sd**.  the "s" means scsi
> and yes, even if you have ide drives it uses the s, they changed to that
> a while ago, someone else could tell you why.  the "d" stands for disk,
> the next character represents the order the drives are detected by linux
> so if you have a sda and a sdb, a is the first drive and b is the second
> (for example on an ide channel the a would be the master and the b would
> be the slave).  then you get a number to represent the partition on the
> disk - sda1 and sda2 for example.

Well & OK, this I already understood ! ;-)


> once a removable drive is automounted by ubuntu it is mounted in the
> /media folder on a new folder named after the disklabel if you've
> labeled your disks or the device name like cdrom0 or floppy0.  labeling
> your disks is a good idea if you use automounting otherwise for your usb
> devices ubuntu will use names like "disk" and "disk1" which aren't very
> descriptive ... 

Absolutely correct and that's why I label them with unique
identification ! ;-)

> ... and as i have written before, if you mount them in a
> different order those names will swap around and then things get
> confusing (if you plug them in in a different order then the /dev/sd**
> will change).  removable drives include cds, dvds, usb disks, floppies,
> and more.
> 
> so in fstab you should tell it which /dev/sd** device you want to mount
> in /media/foldername - if you want to go the route i suggested and it
> seems you don't  :)  but, as i have said before in fstab you should
> really use the UUID not the /dev/sd** designation because when we're
> talking about usb devices, that designation can change and then you'd
> get a disk mounted on the wrong spot and create a real problem for yourself.

It's not "don't or won't !! ;-))

I am in the process of learning how to setup my Linux environment.
I believe to know what I want but currently I lack of fond experience
and knowledge 
to reach it accordingly.

You are correct: UUID's are unique like my (unique) Disk Labels.
Hence I have to learn and recognize what the system really needs and 
how the system controls it !?

I need to understand how it works and have to learn it accordingly.
 

There is, especially with these more and more USB devices connected,
another problem:
The easy and dynamic exchange of i.e. USB sticks used on and off in
these USB hubs !!!

I am using a Hama Traveldrive 1000 & 1, USB 2.0 Multi-/Dual-Card Reader
http://www.hama.de/portal/articleId*127948/action*2563

Like this all USB media units (external HDD or the sticks) are plugged
on when needed and removed after things are done ! The system has to get
along with this and it works only if I do/did it properly.


> but in your case svobi, comment out or remove anything in your fstab
> which points to those drives - you don't need it.

This has been done yesterday already after Derek suggested it. ;-)
Exactly this has brought the two icons (LD142ext3 & LD142ntfs) visible
under Places/Computer. ;-))

 
>   go here:
> 
>  https://help.ubuntu.com/community/RenameUSBDrive
> 
> and relabel your drives, sounds like you have a funky character in there
> which the gutsy gibbon doesn't like and isn't displaying.  ld142ext3 is
> an ext3 filesystem and should be fine if you relabel it (ie no data
> destroyed) using the methods from that link.  you should also run fsck
> on that drive to be sure it is ok.

Thanks again ! 
I will give a try / some tries this weekend ;-))


> hope that is clear and not too inaccurate.

I appreciate every feedback on learning to get my problem solved and
only hope: 
I do not get an unsolvable disaster ! ;-D

Once again thanks for all your efforts.
Cheers, svobi





More information about the ubuntu-users mailing list