[Techtalk] Mounting USB devices

Wim De Smet kromagg at gmail.com
Sun Jan 9 04:28:12 EST 2005


On Sat, 8 Jan 2005 17:00:51 +0100, Marleen Garcia <d.lineate at skynet.be> wrote:
> On Saturday 08 January 2005 09:06, you wrote:
> 
> > > > >         #cp -R sdc sdc1
> > > > >         #cp -R sdd sdd1
> > > > >         ...
> > > >
> > > > That's not right
> > >
> > > Yes it is.
> >
> > I hate to argue, but sdc and sdc1 are not the same device.[1]  The
> > one is minor number 32, the other is minor number 33.  One refers
> > to a whole disk, the other refers to the first partition on a disk
> > with a partition table.  If your 'cp' command actually made it
> > work, the correct solution would have been to just use '/dev/sdc'
> > in your /etc/fstab file to begin with.  Then there would be no
> > need to do anything in /dev.
> >
> > Your solution is a bit like saying "cat /etc/shadow gave me
> > 'permission denied', so I fixed it with 'cp -p /etc/passwd
> > /etc/shadow'".
> >
> > [1] *Functionally* they can be the same in a few cases involving
> >     non-MS-DOS-format partition tables.  That isn't the case for
> > you.
> 
> No, don't argue. Maybe I didn't explain this the right way...
> 
> - Mandrake's hardware detection discoveres a number of *sdx1* usb
> devices, and lists them.
> 
> - They can't be mounted, mount complains of non-existing devices.
> 
> - Looking into /dev these devices *indeed* don't exist.
> 
> - Creating them, they can be mounted.
> 
> It's not more complicated than that.
> 
> The *actual* problem is, when booting, /etc/fstab is overwritten, and
> all manually added /dev/ files disappear. Some process in Mandrake
> is doing this, and I can't figure out which one.
> 

Well the fact that /dev/ is cleaned after a boot suggests that
mandrake is using either devfs or udev. devfs is deprecated and I
don't know how you would add those devices there (apart from maybe
just doing the mknod's in a startup script), but I do know udev has a
scheme where you can add rules to add specific devices. I presume the
first thing you should do is find out which of the two it is and
configure it.

Now as for harddrake etc. I remember from my mandrake time that these
did overwrite such typical files as /etc/fstab. I'm not sure but I
think you can just plain disable harddrake (I think I did that way
back when). Another fix might be editing the harddrake config but
you'd probably have to dig a way through the mandrake docs to find
where and how you do that. Also it could be that it's not harddrake,
but an automount daemon or something similar messing with your fstab.
Maybe check if nothing like that is running, and its config. I don't
think hotplug or discover would do this (IIRC they only load modules)
but you might want to check.

Needless to say, autodetecting of hardware is what put me off off
mandrake in the first place. I generally prefer debian because I'm
allowed to do it myself, but I guess most people wouldn't know what to
do and most of the information is scattered about a bit. Many of the
current approaches to hardware autodetection are however broken and
the moment you try to change something manually, they break even
harder (a big no-no with anything automatic). Let's just hope it gets
better in the future. ;-)

greets,
Wim


More information about the Techtalk mailing list