# [Updated] mount: /dev/sda1 is not a block device

## Fenster

Running Gentoo 2005.a on the 2.6.11-gentoo-r5 kernel. I've enabled USB hotplugging, following the HOWTO in the Wiki, emerged the hotplugging tools and added the following to /etc/fstab:

```
/dev/sda1      /mnt/flash   vfat      user,noauto,umask=077   0 0
```

However, when I try to mount any form of USB pendrive (I've tried three so far), I get the below message:

```
mark@fenster mark $ mount /dev/sda1

mount: /dev/sda1 is not a block device
```

Its not a case that it can't read the filesystem-I have a small Windows 2000 partition on this laptop as well and Gentoo can mount it without qualm. dmesg reports the following at bootup:

```
  Vendor: Apple     Model: iPod              Rev: 2.70

  Type:   Direct-Access                      ANSI SCSI revision: 04

SCSI device sda: 2032640 512-byte hdwr sectors (1041 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

SCSI device sda: 2032640 512-byte hdwr sectors (1041 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

 sda: sda1

Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

usb-storage: device scan complete
```

So its detected, at the least (iPod Shuffle). However, if I later try to mount it, I get the "not a block device message." A grep of /dev/sda shows the below:

```
mark@fenster mark $ ls /dev | grep sda

sda

sda1

sda10

sda11

sda12

sda13

sda14

sda15

sda2

sda3

sda4

sda5

sda6

sda7

sda8

sda9
```

fdisk -l picks it up okay:

```
fenster root # fdisk -l

Disk /dev/hda: 40.0 GB, 40007761920 bytes

255 heads, 63 sectors/track, 4864 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1   *           1         639     5132736    b  W95 FAT32

/dev/hda2             640         660      168682+  83  Linux

/dev/hda3             661         735      602437+  83  Linux

/dev/hda4             736        4864    33166192+  83  Linux

Disk /dev/sda: 1040 MB, 1040711680 bytes

128 heads, 40 sectors/track, 397 cylinders

Units = cylinders of 5120 * 512 = 2621440 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1         397     1016300    b  W95 FAT32
```

I tried creating a udev rule for it, but it made no difference:

```
BUS="usb", SYSFS{serial}="000A2700101B423A", KERNEL="sd?1", NAME="%k", SYMLINK="sda1"
```

And lastly, I pulled the following from /var/log/messages:

```
Apr 14 01:45:50 fenster usb 1-3: USB disconnect, address 3

Apr 14 01:45:59 fenster usb 1-3: new high speed USB device using ehci_hcd and address 4

Apr 14 01:45:59 fenster usb 1-3: configuration #1 chosen from 2 choices

Apr 14 01:45:59 fenster scsi1 : SCSI emulation for USB Mass Storage devices

Apr 14 01:45:59 fenster usb-storage: device found at 4

Apr 14 01:45:59 fenster usb-storage: waiting for device to settle before scanning

Apr 14 01:45:59 fenster usb.agent[6925]: Keeping default configuration with /sys//devices/pci0000:00/0000:00:13.2/usb1/1-3

Apr 14 01:46:04 fenster Vendor: Apple     Model: iPod              Rev: 2.70

Apr 14 01:46:04 fenster Type:   Direct-Access                      ANSI SCSI revision: 04

Apr 14 01:46:04 fenster SCSI device sda: 2032640 512-byte hdwr sectors (1041 MB)

Apr 14 01:46:04 fenster sda: assuming Write Enabled

Apr 14 01:46:04 fenster sda: assuming drive cache: write through

Apr 14 01:46:04 fenster SCSI device sda: 2032640 512-byte hdwr sectors (1041 MB)

Apr 14 01:46:04 fenster sda: assuming Write Enabled

Apr 14 01:46:04 fenster sda: assuming drive cache: write through

Apr 14 01:46:04 fenster sda: sda1

Apr 14 01:46:04 fenster Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0

Apr 14 01:46:04 fenster Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0,  type 0

Apr 14 01:46:04 fenster usb-storage: device scan complete

Apr 14 01:46:04 fenster scsi.agent[6976]: disk at /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.0/host1/target1:0:0/1:0:0:0
```

Its all seems to say its okay and usable, but I'm still getting stuck on this.Last edited by Fenster on Fri May 06, 2005 12:40 am; edited 2 times in total

----------

## Frodg

It appears to be finding sda but then not attaching it to sda1 as I would expect.

It looks like it is attaching it to scsi1 ????

Would that be right?> Can you mount it at /dev/scsi1 ? (strange)

----------

## fredgt

Depending on the what kernel version you are using and it's configuration it could be that it's no longer running with the SCSI emulation but directly from usb. Have you checked for a device file like "/dev/ub/a/part1"?

----------

## yoyo

Try to mount "/dev/sda" instead of "/dev/sda1".

----------

## Fenster

```
fenster root # less /etc/mtab

fenster root # ls /dev | grep ub

ptyub

ttyub

fenster root # ls /dev | grep scsi

fenster root # mount /dev/sda1

mount: /dev/sda1 is not a block device

fenster root # mount /dev/sda

mount: can't find /dev/sda in /etc/fstab or /etc/mtab
```

Its only at sda1 that I even get the block error message.

I chanced upon this thread and tried mounting the modules mentioned in it. All returned "FATAL: Module XXX not found."

----------

## yoyo

 *Fenster wrote:*   

> 
> 
> ```
> fenster root # mount /dev/sda
> 
> ...

 You have to modify your "/etc/fstab" BEFORE trying to mount "/dev/sda" or use at least the main command-line method :

```
mount -t vfat /dev/sda /mnt/flash
```

----------

## toralf

```

mount /mnt/flash

```

instead of

```

mount /dev/sda1

```

!

----------

## Fenster

 *yoyo wrote:*   

>  *Fenster wrote:*   
> 
> ```
> fenster root # mount /dev/sda
> 
> ...

 

Its already been edited for a while, sorry that I forgot to mention that:

```
/dev/sda1               /mnt/flash              vfat    user,noauto,umask=077    0 0
```

EDIT: lol, sorry, I see what you mean now. Late night.

I changed /etc/stab to point at /dev/sda, but I got returned:

```
wrong fs type, bad option, bad superblock on /dev/sda, or too many mounted file systems
```

----------

## Fenster

Bump

----------

## TerranAce007

By chance, do you have the 'low performance usb block driver' enabled in the kernel config? If so, this conflicts with the 'usb-storage' module and was casuing my external DVD+RW to not work until I recompiled without it. This was in 2.6.9 and 2.6.10. Haven't compiled a 2.6.11 kernel yet.

Also, what is your USB config like? 1.1 or 2.0? Is it built-in or modular? I found that compiling USB support as modules woks better, since my laptop will freeze when booting if I have usb built-in and there is any USB device plugged in.

My external DVD+RW drive is usually assigned as /dev/scd0 on my laptop, but my desktop would see it as something different in Fedora and Debian. I don't know how the naming scheme works, but you can make a udev rule and have it always be /dev/usbstick, or /dev/bob if you're a real nerd  :Wink: 

----------

## Fenster

I just noticed that modules "usb.storage" failed to load during boot-up. What is the best way of logging and monitoring boot processes? 

Terran: I tried recompiling the USB components as modules, nothing worked then. Trying to load them with modprobe just netted me fatal module errors. As far as udev goes, see my original post: I had a udev rule written for it, but this seems to be a module problem.

----------

## Fenster

Bump. I've had no joy on this at all today.

----------

## Fenster

Bump. Something of an update. 

mount reported that /dev/sda1 wasn't a valid block device, even when a pen drive wasn't plugged in, after I accidently mounted it with it unplugged a few days ago.

usb.storage and scsi-storage both fail to load during boot up, but nothing then later shows in /var/log/messages. 

A friend suggested that I format it with Windows tools, but that didn't affect anything. I'm starting to be convinced that its not a kernel issue-I tried the 2.10 kenel and had the same messages.

----------

## Fenster

Bump. I've tried everything.

New kernels, different kernel configurations, differning approaches to mount it, and so on. I've USB storage, SCSI disk and VFAT support all compiled as modules right now. It still reports the same.

----------

## TerranAce007

Are you sure that the usb key is not the problem? Could it be broken? You said you have a windows partition, but did you try it under winblows?

Also, I would try getting the latest Knoppix, boot up from the Knoppix CD, and then try it. That should help you to figure out if it is just a problem if your Gentoo setup, or linux in general.

----------

## Fenster

 *TerranAce007 wrote:*   

> Are you sure that the usb key is not the problem? Could it be broken? You said you have a windows partition, but did you try it under winblows?
> 
> Also, I would try getting the latest Knoppix, boot up from the Knoppix CD, and then try it. That should help you to figure out if it is just a problem if your Gentoo setup, or linux in general.

 

I've tried three USB keys in total. I dual between Windows XP and Fedora 3 on my desktop-they work perfectly in each. I dual with Windows 2k on my laptop and it works perfectly in 2k.

----------

## TerranAce007

Well, if it works under Fedora on the desktop, then you know it works in Linux. Now, whether it is a gentoo problem or a hardware problem is still hard to tell though, because your laptop has different hardware than the desktop. I still suggest trying it with Knoppix on the laptop and that might give you some extra information.

----------

## Cotton

i have the exact same problem with my external ieee1394/usb2 160gb maxtor drive:

```
  Vendor: I0MEGA    Model: UMni512MB*IOM2H4  Rev: 2.00

  Type:   Direct-Access                      ANSI SCSI revision: 02

SCSI device sda: 1024000 512-byte hdwr sectors (524 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

  Vendor: Maxtor    Model: 5000DV v01.00.00  Rev: 0100

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sda: 1024000 512-byte hdwr sectors (524 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

 sda: unknown partition table

Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

usb-storage: device scan complete
```

the iomega usb flash drive is working fine, and works fine in windows.  the external maxtor is reiser4, and i get the same results on firewire or usb, so both are on usb until i figured this thing out.

after struggling with it for a bit, i emerged udev, hal, rebooted and the usb drive worked fine, and it even put 

```
/dev/hdc                /media/cdrecorder       auto    exec,user,noauto,managed 0 0

/dev/sda                /media/COTTON           vfat    noatime,sync,exec,user,noauto,managed 0 0
```

into my /etc/fstab, but udev never picked up the big maxtor, on usb or firewire.  

fdisk sees the partition and drive fine, as well:

```
Command (m for help): p

Disk /dev/sdb: 163.9 GB, 163927556096 bytes

4 heads, 17 sectors/track, 4708397 cylinders

Units = cylinders of 68 * 512 = 34816 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1     4708397   160085489+  83  Linux

Command (m for help):
```

now it even segfaults trying to mount:

```
techpimps root # mount -t reiser4 /dev/sdb1 /media/maxtor/

Segmentation fault
```

my external maxtor was working fine on both usb or firewire until my recent reinstall.  how do i tell what udev/hal is doing w/ my drives?  any other ideas?  what have we missed?

----------

## Cotton

here's the dmesg backtrace from the segfault... is there a reiser4 tool to check the drive before mounting it?

```
usb 2-2: new full speed USB device using ohci_hcd and address 2

scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

  Vendor: Maxtor    Model: 5000DV v01.00.00  Rev: 0100

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sda: 320171008 512-byte hdwr sectors (163928 MB)

sda: assuming drive cache: write through

SCSI device sda: 320171008 512-byte hdwr sectors (163928 MB)

sda: assuming drive cache: write through

 sda: sda1

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

usb-storage: device scan complete

sda: Current: sense key=0x0

    ASC=0x0 ASCQ=0x0

reiser4[mount(9494)]: bnode_check_adler32 (fs/reiser4/plugin/space/bitmap.c:509)[vpf-263]:

WARNING: Checksum for the bitmap block 486 is incorrect

Unable to handle kernel NULL pointer dereference at virtual address 00000000

 printing eip:

c0192da0

*pde = 00000000

Oops: 0000 [#1]

PREEMPT

Modules linked in:

CPU:    0

EIP:    0060:[<c0192da0>]    Not tainted VLI

EFLAGS: 00010287   (2.6.11-gentoo-r6)

EIP is at znodes_tree_done+0x20/0x1b0

eax: 00000000   ebx: 00002000   ecx: 00000000   edx: ddc5a814

esi: 00000000   edi: ddc5a838   ebp: 00000000   esp: d252fd90

ds: 007b   es: 007b   ss: 0068

Process mount (pid: 9494, threadinfo=d252e000 task=d3a86530)

Stack: d2aefe00 00000000 ddc5a814 d2aefe00 00000000 c019b582 ddc5a814 ddc5a814

       d2aefe00 c01b6e35 ddc5a814 0000000b c05bf7c0 c01b714e d2aefe00 0000000c

       fffffffb d252fdec c01b71ca d2aefe00 0000000b 00000000 00000000 4b1b5d0b

Call Trace:

 [<c019b582>] done_tree+0x22/0xa0

 [<c01b6e35>] _done_formatted_fake+0x25/0x40

 [<c01b714e>] done_super+0x1e/0x30

 [<c01b71ca>] reiser4_fill_super+0x6a/0xa0

 [<c015beae>] sb_set_blocksize+0x2e/0x60

 [<c015b84b>] get_sb_bdev+0xfb/0x140

 [<c01b1aaf>] reiser4_get_sb+0x2f/0x40

 [<c01b7160>] reiser4_fill_super+0x0/0xa0

 [<c015baa7>] do_kern_mount+0x57/0xe0

 [<c017246c>] do_new_mount+0x9c/0xe0

 [<c0172b27>] do_mount+0x147/0x1a0

 [<c0172983>] copy_mount_options+0x63/0xc0

 [<c0172f0f>] sys_mount+0x9f/0x100

 [<c010325b>] syscall_call+0x7/0xb

Code: ae fa ff 83 c4 08 c3 8d 74 26 00 55 31 c0 57 56 31 f6 53 83 ec 04 8b 7c 24 18 83 c7 24 8b 5f  04 39 de 73 13 8b 54 24 18 8b 4a 24 <8b> 34 81 85 f6 75 05 40 39 d8 72 f4 31 c0 89 f2 85 f6 74 0b  8b

 <6>usb 2-2: USB disconnect, address 2
```

any ideas?

----------

## Pithlit

Check this thread. The way I see it you need to use a valid codepage for VFAT default (i.e. one that is compiled within the NLS section). But as you can read in that thread... I really have no clue  :Embarassed:  .

----------

## Fenster

Update: Well this is still bugging me, but I think I might've made some headway in the matter.. With usb-storage and vfat support now modular (and a change of kernel config in general), I can now load the the modules:

```
fenster ~ # modprobe usb-storage

fenster ~ # modprobe vfat
```

Trying to mount /dev/sdaX reports the same as always, except for /dev/sda:

```
fenster ~ # mount -t vfat /dev/sda /mnt/flash

mount: wrong fs type, bad option, bad superblock on /dev/sda,

       or too many mounted file systems
```

So that's something, I hope.

With verbose debugging turned on, I'm getting a lot more feedback from dmesg. Amongst the spam there is this:

```
FAT: bogus number of reserved sectors

VFS: Can't find a valid FAT filesystem on dev sda.
```

fdisk -l /dev/sda reports the device as being at /dev/sda1 however...

```
fenster ~ # fdisk -l /dev/sda

Disk /dev/sda: 1040 MB, 1040711680 bytes

128 heads, 40 sectors/track, 397 cylinders

Units = cylinders of 5120 * 512 = 2621440 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1         397     1016300    b  W95 FAT32
```

If anyone wants my full dmeg, PM me. Its a hell of a lot of spam.

----------

## KingPunk

its ok dude, im here with you..

i just reinstalled gentoo for the 1st time in ages.. and well, im like, lets use udev i guess.

welcome to udev hell  :Evil or Very Mad: 

i have the same problem that you have, except my dmesg doesn't even tell me its sda or anything..

```

uhci_hcd 0000:00:07.2: wakeup_hc

hub 1-0:1.0: state 5 ports 2 chg 0000 evt 0004

uhci_hcd 0000:00:07.2: port 2 portsc 0093,00

hub 1-0:1.0: port 2, status 0101, change 0001, 12 Mb/s

hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x101

usb 1-2: new full speed USB device using uhci_hcd and address 8

usb 1-2: new device strings: Mfr=1, Product=2, SerialNumber=3

usb 1-2: default language 0x0409

usb 1-2: Product: iPod

usb 1-2: Manufacturer: Apple

usb 1-2: SerialNumber: 000000C477AC

usb 1-2: hotplug

usb 1-2: adding 1-2:1.0 (config #1, interface 0)

usb 1-2:1.0: hotplug

ub 1-2:1.0: usb_probe_interface

ub 1-2:1.0: usb_probe_interface - got id

ub: cmd #0 cmd status (-104)

```

i added this udev rule to hopefully make it work, and it was a no go too:

```
 BUS="scsi", SYSFS{model}="iPod            ", KERNEL="sd*", NAME="%k", SYMLINK="ipod"
```

i got the udev rule idea from: http://gentoo-wiki.com/HOWTO_Using_an_iPod_With_Gentoo_Linux

using the infamous Google Search  :Wink: 

im at a loss for ideas. i have everything in my kernel correctly as it has always been. (the only thing that has changed, is devfs in my kernel,

so modules/etc isn't the problem)

what gives?

thanks for your support ahead of time,

-KingPunk

----------

## nc

I had some trouble with my key, then noticed that I didn't have scsi disk support as a module:

So I updated my kernel config, then installed the new modules, and the usb key worked like a charm. Hope it helps you.

```
CONFIG_SCSI=m

CONFIG_BLK_DEV_SD=m 

```

nc

----------

