USB flash mount -- Could not stat /dev/sdb2 --- No such file

Hello,

I’m trying to install **** Small Linux on an usb flash drive, following directions: Alternative II: Using GRUB as boot loader, here Installing to a USB Flash Drive - DSL Wiki

I create the partitions fine, and then I cannot mount it, though it still appears to be recognized,

# /sbin/mke2fs -j /dev/sdb2
mke2fs 1.40.8 (13-Mar-2008)
Could not stat /dev/sdb2 --- No such file or directory

sfdisk took about 7 minutes to display output:

# sudo /sbin/sfdisk -l /dev/sdb

Disk /dev/sdb: 65015 cylinders, 2 heads, 63 sectors/track
Units = cylinders of 64512 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+  64949   64950-   4091818+   b  W95 FAT32
/dev/sdb2   *  64950   65014      65       4095   83  Linux
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
# cat /proc/partitions
major minor  #blocks  name

   8     0  156290904 sda
   8     1    1935832 sda1
   8     2   10008463 sda2
   8     3  144344025 sda3
   7     0      51102 loop0
   8    16    4096000 sdb
   8    17    4091818 sdb1
   8    18       4095 sdb2
# sudo tail -10 /var/log/messages
Dec 16 03:33:42 linux-1g5x kernel: Buffer I/O error on device sdb2, logical block 171
Dec 16 03:33:42 linux-1g5x kernel: Buffer I/O error on device sdb2, logical block 172
Dec 16 03:33:42 linux-1g5x kernel: Buffer I/O error on device sdb2, logical block 173
Dec 16 03:33:42 linux-1g5x kernel: Buffer I/O error on device sdb2, logical block 174
Dec 16 03:33:42 linux-1g5x kernel: Buffer I/O error on device sdb2, logical block 175
Dec 16 03:33:42 linux-1g5x kernel: Buffer I/O error on device sdb2, logical block 176
Dec 16 03:33:42 linux-1g5x kernel: Buffer I/O error on device sdb2, logical block 177
Dec 16 03:33:42 linux-1g5x kernel: Buffer I/O error on device sdb2, logical block 178

not sure if all of that is relevant or not.
I tried to google around for these errors, but just seemed to find folks who made different mistakes (e.g. doing something like “fdisk /dev/sdb1” instead of “fdisk /dev/sdb”, others appeared unresolved.

any thoughts?
Thanks for reading.

Do it via the one-click install instead. If you boot the DSL Live CD and click on its desktop, there’s an option (I think under System > Tools or something like that) to install DSL to a USB key. It launches a script that does everything automatically, the only thing you must provide is the device designation of your USB media (such as /dev/sda1 or the like).
It worked for me.

Do it via the one-click install instead…

Thanks for the suggestion; if I get some blank cd’s before I figure out this problem, I’ll give it a try. I would still like to know why the second partition on the USB key cannot be detected during mounts and the like…
What causes this behaviour?

I never bothered to get that deep into it. All I know is it’s a script; it’s supposed to work most of the time, but that’s not the case, I’m afraid. When I tried to run it to install a frugal installation to my USB xD Memory Card, it just never completed – the majority of the files got copied over OK, but Grub bailed out on me every single time. So i tried the “USB-HDD Pendrive Install” (what I stated in my previous post is wrong; it’s actually located in Apps>Tools) and it worked the very first time – including Grub.:wink:
Oh, yes, another thing: during my unsuccessful installs I found out that mounting the pendrive prior to running the install scripts interferes heavily with the scripts themselves, although I can’t recall in what manner exactly.

JosipBroz stated that having a mounted pendrive while running the scripts will interfere with the scripts themselves. Although I am not running a script I am working with a pendrive (usb storage device) and am trying to format the 2nd partition with ext2. The result is the same as the OP…

“Could not stat /dev/sdb2 — No such file or directory.”

It turned out to be that the volume was mounted. After running the “sudo umount /dev/sdb” command and then ran a command to format the 2nd partition, it successfully completed without incident.

I can tell you that when working in fdisk and finally writing the changes to the device, my volume was auto-mounted. I had to unmount it once again to format the partitions.

After running the “sudo umount /dev/sdb” command and then ran a command to format the 2nd partition, it successfully completed without incident.

Thanks for the reply.
I tried again:

$ umount -l /dev/sdb
umount: /dev/sdb: not mounted

$ mke2fs -j /dev/sdb2
mke2fs 1.40.8 (13-Mar-2008)
Could not stat /dev/sdb2 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

I have some other problem apparently…
I’ll try the one-click method with dsl cd. Any other thoughts as to why this happens are more than welcome.