FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 12-13-2007, 10:41 PM
J Taylor
 
Default USB storage devices and /etc/fstab

I have multiple USB storages devices that are assigned to different /dev/sd*
files. My problem is that a given device does not always have the same file
name and I have to manually edit /etc/fstab to mount them. Is there a way
around this?

Thanks

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-14-2007, 12:27 AM
"Mikkel L. Ellertson"
 
Default USB storage devices and /etc/fstab

J Taylor wrote:
> I have multiple USB storages devices that are assigned to different /dev/sd*
> files. My problem is that a given device does not always have the same file
> name and I have to manually edit /etc/fstab to mount them. Is there a way
> around this?
>
> Thanks
>
One way is to let HAL mount them. For this to work, you will need to
remove the entries in /etc/fstab. If you do want to have entries in
/etc/fstab for them, use partition labels instead of device names.

LABEL=/backup /backup ext3 defaults 1 2

You can use e2label to label ext2/3 partitions. You can check the
list archives or ask here on how to label other types of partitions.

Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-14-2007, 12:38 AM
Rick Stevens
 
Default USB storage devices and /etc/fstab

On Thu, 2007-12-13 at 17:41 -0600, J Taylor wrote:
> I have multiple USB storages devices that are assigned to different /dev/sd*
> files. My problem is that a given device does not always have the same file
> name and I have to manually edit /etc/fstab to mount them. Is there a way
> around this?

The easiest way is to label the filesystems and edit your /etc/fstab to
use the labels instead of the device names. Find one of your devices
(assume it's at /dev/sda1):

# e2label /dev/sda1 bugaboo

Then put a line such as:

LABEL=/bugaboo /bugaboo ext3 noauto,user,rw 1 2

in /etc/fstab. That device should always mount at /bugaboo. Note
that the hotplug system will mount it at /media/bugaboo if you plug it
in later.

----------------------------------------------------------------------
- Rick Stevens, Principal Engineer rstevens@internap.com -
- CDN Systems, Internap, Inc. http://www.internap.com -
- -
- The trouble with troubleshooting is that trouble sometimes -
- shoots back. -
----------------------------------------------------------------------

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-14-2007, 04:23 AM
John Summerfield
 
Default USB storage devices and /etc/fstab

Rick Stevens wrote:

On Thu, 2007-12-13 at 17:41 -0600, J Taylor wrote:
I have multiple USB storages devices that are assigned to different /dev/sd*
files. My problem is that a given device does not always have the same file
name and I have to manually edit /etc/fstab to mount them. Is there a way
around this?


The easiest way is to label the filesystems and edit your /etc/fstab to
use the labels instead of the device names. Find one of your devices
(assume it's at /dev/sda1):

# e2label /dev/sda1 bugaboo

Then put a line such as:

LABEL=/bugaboo /bugaboo ext3 noauto,user,rw 1 2

in /etc/fstab. That device should always mount at /bugaboo. Note
that the hotplug system will mount it at /media/bugaboo if you plug it
in later.


Dunno about you chaps, but mine are mostly FAT filesystems, and they're
staying that way for maximum portability.


What then?


--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-14-2007, 05:43 AM
Dave Lehman
 
Default USB storage devices and /etc/fstab

> >> name and I have to manually edit /etc/fstab to mount them. Is there a way
> >> around this?
> >
> > The easiest way is to label the filesystems and edit your /etc/fstab to
> > use the labels instead of the device names. Find one of your devices
> Dunno about you chaps, but mine are mostly FAT filesystems, and they're
> staying that way for maximum portability.
>
> What then?

Use dosfslabel from the dosfstools package.


Dave

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-14-2007, 04:31 PM
Robin Laing
 
Default USB storage devices and /etc/fstab

Dave Lehman wrote:
name and I have to manually edit /etc/fstab to mount them. Is there a way
around this?

The easiest way is to label the filesystems and edit your /etc/fstab to
use the labels instead of the device names. Find one of your devices
Dunno about you chaps, but mine are mostly FAT filesystems, and they're
staying that way for maximum portability.


What then?


Use dosfslabel from the dosfstools package.


Dave



For most of my sticks, I check the partition table, reformat them as
vfat with a label. I can then grab a stick and know what it is. As we
have dozens of the same sticks at work, mine is automatically identified
by having my name on it.


On linux these mount as "/media/{label}"

--
Robin Laing

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-14-2007, 07:04 PM
"Aldo Foot"
 
Default USB storage devices and /etc/fstab

On Dec 13, 2007 5:38 PM, Rick Stevens <rstevens@internap.com> wrote:


On Thu, 2007-12-13 at 17:41 -0600, J Taylor wrote:
> I have multiple USB storages devices that are assigned to different /dev/sd*
> files. *My problem is that a given device does not always have the same file

> name and I have to manually edit /etc/fstab to mount them. *Is there a way
> around this?

The easiest way is to label the filesystems and edit your /etc/fstab to
use the labels instead of the device names. *Find one of your devices

(assume it's at /dev/sda1):

* * * *# e2label /dev/sda1 bugaboo

Then put a line such as:

LABEL=/bugaboo * */bugaboo * * * *ext3 * *noauto,user,rw * * * *1 2

in /etc/fstab. *That device should always mount at /bugaboo. *Note

that the hotplug system will mount it at /media/bugaboo if you plug it
in later.


I did* what's suggested with two partitions in my slave drive. But the partitions
won't mount.* When I boot the system an error occurs halting the boot process:

* "fcsk.ext3: Unable to resolve 'LABEL=/stor1"

Here's my fstab.
$ cat /etc/fstab
LABEL=/1********* /********** ext3*** defaults*** 1 1
LABEL=/stor1*** /stor1*** ext3*** defaults*** 1 2

LABEL=/stor2*** /stor2*** ext3*** defaults*** 1 2

The devices seems to be properly labeled
# e2label /dev/sdb1
stor1
# e2label /dev/sdb2
stor2

The OS install process labeled root as "/1", does that have anything to do

with the problem?

why does it not work as expected?

~af



--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-14-2007, 07:53 PM
Dave Lehman
 
Default USB storage devices and /etc/fstab

Your device has the label "stor1" and you are trying to mount a device
whose label is "/stor1". The leading slash should be in both places or
neither.

> "fcsk.ext3: Unable to resolve 'LABEL=/stor1"
>
> Here's my fstab.
> $ cat /etc/fstab
> LABEL=/1 / ext3 defaults 1 1
> LABEL=/stor1 /stor1 ext3 defaults 1 2
> LABEL=/stor2 /stor2 ext3 defaults 1 2
>
> The devices seems to be properly labeled
> # e2label /dev/sdb1
> stor1
> # e2label /dev/sdb2
> stor2
>
> The OS install process labeled root as "/1", does that have anything
> to do
> with the problem?
>
> why does it not work as expected?
>
> ~af
>
>
>
> --
> fedora-list mailing list
> fedora-list@redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-14-2007, 09:53 PM
"Aldo Foot"
 
Default USB storage devices and /etc/fstab

> * "fcsk.ext3: Unable to resolve 'LABEL=/stor1"
>
> Here's my fstab.
> $ cat /etc/fstab
> LABEL=/1 * * * * */ * * * * * ext3 * *defaults * *1 1
> LABEL=/stor1 * */stor1 * *ext3 * *defaults * *1 2

> LABEL=/stor2 * */stor2 * *ext3 * *defaults * *1 2
>
> The devices seems to be properly labeled
> # e2label /dev/sdb1
> stor1
> # e2label /dev/sdb2
> stor2
>
> The OS install process labeled root as "/1", does that have anything

> to do
> with the problem?
>
> why does it not work as expected?
>
> ~af
>

On Dec 14, 2007 12:53 PM, Dave Lehman <
dlehman@redhat.com> wrote:

Your device has the label "stor1" and you are trying to mount a device

whose label is "/stor1". The leading slash should be in both places or
neither.

*Ah! I missed the obvious.
The fstab line should read

**** LABEL=stor1*** /stor1*** ext3*** defaults*** 1 2
It works now.

Friendly reminder: let's not do Top Posting. Let's reply at the bottom of the email.

thanks Dave!
~af


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-31-2007, 03:21 PM
J Taylor
 
Default USB storage devices and /etc/fstab

I am still trying to get this to work. The e2label seems to work but I cannot
mount the device, and the system will not boot with the specified /etc/fstab.

# /sbin/e2label /dev/sdb5 usbdisk2

/etc/fstab:
LABEL=/usbdisk2 /usbdisk2 ext2 noauto,user,rw 1 2
#/dev/sdb5 /media/usbdisk2 ext2 user,suid,dev,exec,noauto 0 0

# mount /usbdisk2
mount: special device LABEL=/usbdisk2 does not exist

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 03:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org