[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fstab entries for two different pendrives?



On Saturday 26 August 2006 11:56, Rodolfo Medina wrote:

>> I have the following problem:
>> yesterday I bought a new 256 MB pendrive, that wants to be mounted
>> as `/dev/sda' whereas the other one I have wants `/dev/sda1'.
>> Now, if in /etc/fstab I put the sda entry first, then can't mount sda1;
>> and vice versa, if I put sda1 first then I can't mount sda.


Florian Kulzer <florian@molphys.leidenuniv.nl> writes:

> If you install the "pmount" package and add your user to the "plugdev"
> group then you will not need fstab entries for pluggable devices anymore.
> (You should then just comment these entries out or remove them
> entirely.) Devices will be mounted at the correct mount point
> automatically. Even better, if you use the "pmount-hal" command then the
> devices will be mounted by their volume label so that you can address
> each medium unambiguously and independent of the order in which you
> attached them. This is also fully integrated in e.g. KDE and Gnome.


Alan Chandler <alan@chandlerfamily.org.uk> writes:

> Use udev to recognise the pendrive from its manufactures name, and create a 
> symlink (or actual device) called /dev/flash.  Mount that in /etc/fstab
>
> [...]
>



Rodolfo:

>> Thanks to Florian and Alan.
>> I forgot to say that my kernel is the 2.4, so udev is not for me - is it?


Alan:

> Why not upgrade?



Because, very likely I should re-learn and re-do all I can do with Debian,
re-write many howtos and packages installations.
Hard long work.


Rodolfo:

>> Then I'll turn on Florian's suggestion, unless there's some other remedy
>> that avoid installing special packages like pmount.
>> fstab alone should be sufficient to mount any device.
>> I'd like to understand *why* it can't manage two sd* devices together,
>> or what's the proper way to make it do.



Alan:

> The problem is (and one of the reasons udev was invented) is that either you 
> dynamically allocate device ids as they are hotplugged, or you have to 
> pre-allocate a device for every possible device (not really realistic).
>
> Once you have dynamic allocation of devices, the order of plugging them in 
> matters, and that prevents you knowing which is going to be sda and which is 
> going to be sdb.



I see, thanks.
Maybe the problem might be worked out if I could change the old pen's
device into sda as well?
I noticed that my old pendrive can only be mounted as /dev/sda1,
whereas the new one indifferently with /dev/sda or /dev/sdb.
If both pendrives had the same device then I could put just one entry
in fstab and the plugging order would not be very important.
I do want to use both, but one at a time.
Is there a way one can change /dev/sda1 into /dev/sda or /dev/sdb
for the first pendrive?

Cheers,
Rodolfo



Reply to: