Thursday, August 14, 2008

Mounting External USB Disk on Debian

After plugin USB, see any activity
tail -f /var/log/syslog

if nothing about usb mass storage, check reasons. If "no loadable modules!", your old Kernel does not support USB, you might need to upgrade it (depending upon hardware of machine) in my case it was the Via CPU which is not a
full-blown 686.
Then install the new kernel
apt-get install linux-image-2.6.18-4-486

After that config the lilo or grub in our case it was lilo:
edit /etc/lilo.conf
default=2.6.18

Then restart the machine.

check activity and see syslog (see up command)
Kernal find the disk
Aug 14 20:05:11 neptune kernel: usb-storage: device found at 3
Aug 14 20:05:11 neptune kernel: usb-storage: waiting for device to
settle before scanning
Aug 14 20:05:16 neptune kernel: Vendor: ATA Model: SAMSUNG
HD321KJ Rev: CP10
Aug 14 20:05:16 neptune kernel: Type: Direct-Access
ANSI SCSI revision: 05
Aug 14 20:05:16 neptune kernel: SCSI device sda: 625142448 512-byte hdwr
sectors (320073 MB)
Aug 14 20:05:16 neptune kernel: sda: Write Protect is off
Aug 14 20:05:16 neptune kernel: sda: Mode Sense: 00 00 00 00
Aug 14 20:05:16 neptune kernel: sda: assuming drive cache: write through
Aug 14 20:05:16 neptune kernel: SCSI device sda: 625142448 512-byte hdwr
sectors (320073 MB)
Aug 14 20:05:16 neptune kernel: sda: Write Protect is off
Aug 14 20:05:16 neptune kernel: sda: Mode Sense: 00 00 00 00
Aug 14 20:05:16 neptune kernel: sda: assuming drive cache: write through
Aug 14 20:05:16 neptune kernel: sda: sda1 sda2 sda3 sda4
Aug 14 20:05:16 neptune kernel: sd 1:0:0:0: Attached scsi disk sda
Aug 14 20:05:16 neptune kernel: usb-storage: device scan complete

This means that the device was inserted into the kernel as /dev/sda.

From the bottom of the log, you see that the device has four partitions.
(sda1, sda2, sda3, sda4) If you don't know what filesystems they
contain, you can make mount autodetect by:

mount /dev/sda2 /mnt/media

When you finish your work, unmount this can corrupt the file system.

umont /mnt/media


Thanks Fredrik Gratte, from Owera As

No comments: