Saturday, October 07, 2006

/dev/sda1 is not a valid block device

This is a common error and one I've had a few times over the years when trying to mount a USB device on various Linux kernels and distributions. Typing that string into your search engine of choice will yield a lot of results and possible solutions. The first recommendation was to check to make sure the usb-storage and uhci modules are loaded (# lsmod); and they were in my case. I even unloaded them and reloaded them (# modprobe -r module_name, # modprobe module_name) and still got the error. The next most common recommendation that I saw was this:
  • # mount -t vfat /dev/sda1 /mnt/usbdevname
That didn't work for me this time. However, I did find a suggestion that did work. Plug in the device and then type:
  • # fdisk -l
(That's a lowercase "L") Now this isn't going to erase your hard drive or the data on your device. It will, however, tell you what disk partitions you have on your system, whether they are mounted or not.

So, if you get the "/dev/sda1 is not a valid block device" error, plug the device in and type "fdisk -l." Then you should see something similar to this, along with information about your hard drive partitions, which I did not copy here:

Disk /dev/sdb: 1027 MB, 1027604480 bytes
16 heads, 32 sectors/track, 3920 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 3920 1003504 e W95 FAT16 (LBA)

Then all you do, based on this example, is edit /etc/fstab and change /dev/sda1 to /dev/sdb1 and keep the options the same across the rest of that line. Then just mount like normally would:
  • # mount /mnt/usbdevice
That did the trick for me. But, try this at your own risk as I can't offer any guarantees!

1 Comments:

At 12:05, Blogger Grzegorz said...

THX! bwsnyder.

I thougth, that I had camera on sda1, but I type fdisk -l and system show me, my camera on sdb1 :)

Now is OK.

Thank you for help.

 

Post a Comment

<< Home