1

Topic: Request: automount usb disk

Hello.

Let me please introduce myself first, I'm enjoying gparted since several months now and it is a pleasure to see the improvement the dev & livecd team made to the gparted/libparted tools.

Thanks you all for your great job.

Anyway since rsync is implemented now and has a GUI that can do disk images, do you guys have some plans to incorporate some automount utilty to detect usb disks and makes them available to the live cd environment so we can enjoy the gparted live cd as a disk image / backup utility ala Disk Expert.

It happens that an image of a whole disk has to be saved to the network or an usb disk. And as I tried to do it, I cannot understand how to mount usb disks. I know the mount command very well and I can understand how to mount it myself, but nothing seems available as /dev/sd*.

Am I doing something wrong/have not understand the way it should be done?

2

Re: Request: automount usb disk

What you mean is that you want /dev/sd* created/removed when you add/remove an USB device, so that you can mount them manually?  That sounds like something udev-related to me...

I think automatic mounting isn't a good idea, as that could possibly give trouble with gparted.

3

Re: Request: automount usb disk

janc wrote:

What you mean is that you want /dev/sd* created/removed when you add/remove an USB device, so that you can mount them manually?

Exactly.

janc wrote:

I think automatic mounting isn't a good idea, as that could possibly give trouble with gparted.

Right explicit mounting is much preferable.

Anyway I will need to mount usb disk. How can I achieve this, by creating the device with something like this probably.

mknod /dev/sda  b 8 0
mknod /dev/sda1 b 8 1
mknod /dev/sda2 b 8 2

I know that's not related to gparted but anyway I need to do this. And it would be helpfull if it was somehow made simplier by creating a documentation page per example.

So if you need more informations on USB devices connected to the computer you will need this also.

cat /proc/bus/usb/devices

You can easily replace 'cat' command by 'less' for your convenience and press 'q' when you're done.

4 (edited by leibowitz 2006-07-31 23:19:05)

Re: Request: automount usb disk

More informations found.

First, modprobe ub should make the /dev/ub if they are not created automagically.

In case the ub module is not present in gparted live cd, use mknod.

mknod /dev/uba b 180 0 
mknod /dev/uba1 b 180 1
mknod /dev/uba2 b 180 2

See the link for some reference to the major and minor numbers here.

98 block    User-mode virtual block device
          0 = /dev/ubda        First user-mode block device
         16 = /dev/udbb        Second user-mode block device
            ...
       
        Partitions are handled in the same way as for IDE
        disks (see major number 3) except that the limit on
        partitions is 15.

        This device is used by the user-mode virtual kernel port.

180 block    USB block devices
        0 = /dev/uba        First USB block device
        8 = /dev/ubb        Second USB block device
        16 = /dev/ubc        Thrid USB block device
        ...

I don't know if it will be needed anyway as I didn't tried with gparted livecd yet.

5

Re: Request: automount usb disk

Till now, I tried everything, but none solution works.

modprobe ub reveal that ub is not available and mknod /dev/sda or uba both provides "is not a block devices".

Still searching.

6

Re: Request: automount usb disk

I updated to udev-96 and did some changes to the udev-rules and it works now. It should work in the next release.

I just typed:

mkdir d
mount /dev/sda1 d

and it mounted...

7

Re: Request: automount usb disk

woh! Great.

I will test this with pleasure.

Thanks a lot.

8

Re: Request: automount usb disk

Try http://gparted.sourceforge.net/livecd_t … -04-06.iso