Troubles mounting USB !

Hi,

I am new to Debian Linux & for that matter to Linux configurations. I have installed debian (CD provided by the vendor) on a laptop drive connected to the vendor SBC. The CD contains the modified kernel for the specific hardware. Now I need to install additional packages in order to build a development platform. I am trying to mount USB flash on to the system by following the following free instructions from oldsite.debianhelp.org:
- modprobe usb-storage
- edit /etc/modules to add usb-storage & vfat to its end; save changes
- connect the USB flash
- verified /dev/sda1 exists
- mkdir /media/usb0
- chgrp cdrom /media/usb0
- chmod a+rw /media/usb0
- edit /etc/fstab to add '/dev/sda1 /media/usb0 vfat rw,user,users,noauto,noatime,noauto 1 2'; save changes
- mount /media/usb0

This command results in the following error:
"mount: wrong fs type, bad option, bad superblock on /dev/sda1
missing code page or other error
In some cases useful info in found in syslog - try
dmesg | tail or so"

- when I tyrp dmesg | tail at the terminal I get the following:
"Buffer I/O error on device sda1, logical block 508378384..........
..............
VFS: Can't find ext3 filesystem on dev sda1"

Also I have the GNOME desktop utility, when I try running the GNOME-Search-Tool, it gives me the following error message:
"Details: Failed to execute child process "gnome-search-tool" (No such file or directory)"

This error didn't occur before I tried mounting the USB.

Can some please help me with this problem. Also I need to know the other packages that I need to install & where to find them.

Thanks,
Kranti

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Troubles mounting USB !

1. You also need to load the 'vfat' module:
modprobe vfat

2. The USB sticks may appear as 'sda1' or simply 'sda' depending on how it was formatted. Of course if something else is named 'sda' that won't work - you'll need to find out what name your USB gizmo got. You can do that by trial and error (look at the 'sd*' and 'hd*' devices in /dev).

usb_mounting_problem

reply to Kranti
to find out your attached media, plug in your usb flash before booting the system, debian will see it and will place it in /dev something like sda*,
1 - list them in /dev by entering :

user@debian:~$ ls -l /dev | grep sd (to just limit the listing to sd* devices)
( to see them all: ls -l /dev | less and use spacebar or enter to see the next line/next screenfull of txt, that way you'll see all your drives, partitions: hda1,hda2... hdb1, or hdc1... etc..).
when using less you can interrupt and go back to the prompt by entering q for quit.

eniz@debian4:~$ ls -l /dev | grep sd
brw-rw---- 1 root floppy 8, 0 2007-11-18 08:44 sda
brw-rw---- 1 root floppy 8, 1 2007-11-18 08:44 sda1

the device sda is the block device, drive that you can't read the contents from, you have to mount it in its own dir to be able to rwx to it.

debian identifies sda as floppy, but no problem.

2- you must make a dir in which you'll mount your usb drives,
for this you must be root: enter su and root password:

debian4:/home/eniz# mkdir 777 /media/usb
(777 is setting rwx permissions to owner/group/others)

3 - you now have to enter that new device-drive into the /etc/fstab file (still logged as root you'll have to edit the file) it is recommended that you copy the file to your dir and edit the copy before you move or copy it back to its original directory (/etc) (copy option is better, so you will keep the file in your dir as well)
so now, you cp it from /etc to your home dir:

debian4:/home/eniz# cp /etc/fstab fstab1
change the permissions on the file so you can edit it using the gui as user not root (easier than using the terminal with editor vi)
to change the permissions:

chmod 662 fstab1

then you open fstab1 from your home folder within the window and you'll see something similar to:

# /etc/fstab: static file system information.
#
#
proc /proc proc defaults
0 0
/dev/hdc1 / ext3 user_xattr,errors=remount-ro 0 1
/dev/hdc8 /Datahdc8 ext3 user_xattr 0 2
/dev/hdc10 /Storagehdc10 ext3 user_xattr 0 2
/dev/hda1 /boot ext3 defaults 0 2
/dev/hdc9 /usr ext3 defaults 0 2
/dev/hda3 none swap sw 0 0
/dev/hdc5 none swap sw 0 0
/dev/hdd /media/cdrom udf,iso9660,users,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/sda1 /media/usb0 auto rw,user,noauto 0 0
/dev/sdb1 /media/usb1 auto rw,user,noauto 0 0

the last 2 lines are the ones you want to add to your fstab1 file (of course you should name the /dev/sda* relevant to your own system, as well as the /media/usb* you've just created, I have 2 usb drives, so I created a usb0 and 1 dirs for them)

once you have modified this fstab1 file, you save and need to cp it back to /etc/fstab to replace the original fstab.
still logged in as root:

cp -i fstab1 /etc/fstab (the -i is for interactive, the system is going to ask you: if you want to overwrite fstab? y n ? you say y) When booting/or when you plug the usb flash in, this new fstab file will tell your system to mount your flash pen to /media/

Each time you plug in your usb flash it should open its contents in its own window on your desktop, you should also see the drive in your filesystem when browsing 'my computer'.

I am also a beginner, and this is one of the few things I know. I sort out one thing at a time... when I've got the time, since I'm still working all day on a pc running xp. I also have installed 4 linux systems on 2 drives, I find that it helps by checking up how 1 system is seeing the system, and comparing with the others.

I don't know which debian version you've got, I am running the last : etch. You should need to run the kernel 2.6. or at least 2.4.
you can see your kernel version by taking a look at :

eniz@debian4:~$ ls -l /boot
total 24752
-rw-r--r-- 1 root root 64915 2007-05-04 01:29 config-2.6.18-4-amd64
-rw-r--r-- 1 root root 64792 2007-10-02 21:32 config-2.6.18-5-amd64
drwxr-xr-x 2 root root 4096 2007-11-15 08:03 grub
-rw-r--r-- 1 root root 5041503 2007-10-28 20:00 initrd.img-2.6.18-4-amd64
-rw-r--r-- 1 root root 5042015 2007-10-28 20:00 initrd.img-2.6.18-5-amd64

There is a command to check the kernel version, which I've forgotten.

USB mounting still not working!

Hi kbsolo,

Thanks for the response!

I followed all the steps you have mentioned in your reply.
When i type ls -l /dev | grep sd, I noticed that there one sda & one sda1 both listed as root hal.

Then rebooted the system & typed mount /dev/sda1 /media/usbflash in the terminal (usbflash is my mount ppoint dir simply because there already exists usb0 through usb7 & a usb too).
I still get tye same error. I did notice that when I rebooted the system, while Debian was loading, I saw the
"Buffer I/O error on device sda1, logical block 508378384....
VFS: Can't find ext3 filesystem on dev sda1....."
appear at the prompt. Maybe it has something to do with the fact that I had done "chgrp cdrom /media/usbflash earlier"....I donot understand the problem yet.

Kindly help!!!

Thanks,
Kranti

Still trouble mounting USB

Hi pinniped,

Thanks for the response!

I loaded the vfat module too but the error persists. And yes my USB flash appears sda1 when I so a ls -l /dev | grep sd onto a terminal.

Any more ideas????

Thanks,
Kranti

Syndicate content