f



mount: /dev/sda1: unknown device

I have been using flash drives with my laptop for some time. I attached
one last night and used it. Then I unmounted it. Then I mounted it again
and got the error message in the subject line. Here is what /etc/fstab
says:
LABEL=/                 /                       ext2    defaults        1 1
LABEL=/boot             /boot                   ext2    defaults        1 2
/dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/pts                devpts  gid=5,mode=620  0 0
/dev/hda6               swap                    swap    defaults        0 0
/dev/sda1               /mnt/flash              auto    noauto,owner    0 0

Here is what ls -l /dev/sda1 shows:
brw-------    1 gleep    root       8,   1 Mar 23  2001 /dev/sda1

I booted with the flash drive inserted. Maybe that is the problem. I'll
try rebooting without it and then try to mount it. Here is what is in
/var/log/messages for bootup:
Aug 17 04:06:28 localhost kernel: hub.c: USB new device connect on bus1/1, assigned device number 2
Aug 17 04:06:28 localhost kernel: usb.c: USB device 2 (vend/prod 0x204/0x6025) is not claimed by any active driver.
Aug 17 04:06:29 localhost kernel: SCSI subsystem driver Revision: 1.00
Aug 17 04:06:29 localhost kernel: Initializing USB Mass Storage driver...
Aug 17 04:06:29 localhost kernel: usb.c: registered new driver usb-storage
Aug 17 04:06:29 localhost kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Aug 17 04:06:29 localhost kernel:   Vendor: ChipsBnk  Model: Flash Disk        Rev: 2.00
Aug 17 04:06:29 localhost kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Aug 17 04:06:29 localhost kernel: USB Mass Storage support registered.
Aug 17 04:06:40 localhost kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Aug 17 04:06:40 localhost kernel: SCSI device sda: 129440 512-byte hdwr sectors (66 MB)
Aug 17 04:06:40 localhost kernel: sda: Write Protect is off
Aug 17 04:06:40 localhost kernel:  sda: sda1
Aug 17 04:06:41 localhost dhcpcd[1200]: timed out waiting for a valid DHCP server response 
Aug 17 04:08:05 localhost kernel: usb.c: USB disconnect on device 2

Can someone read this and make sense of what it is saying?

By the way, this is RedHat 7.2. If anyone wants to waste their time telling
me to upgrade, go for it.
-- 
Ignorantly,
Allan Adler <ara@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
0
ara68 (499)
8/19/2007 1:54:06 PM
comp.os.linux.misc 33599 articles. 1 followers. amosa69 (78) is leader. Post Follow

10 Replies
513 Views

Similar Articles

[PageSpeed] 29

This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--=_mimegpg-commodore.email-scan.com-20911-1187533285-0001
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Allan Adler writes:

> 
> I have been using flash drives with my laptop for some time. I attached
> one last night and used it. Then I unmounted it. Then I mounted it again
> and got the error message in the subject line.

And where exactly did you get it /from/?

> Aug 17 04:06:40 localhost kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
> Aug 17 04:06:40 localhost kernel: SCSI device sda: 129440 512-byte hdwr sectors (66 MB)
> Aug 17 04:06:40 localhost kernel: sda: Write Protect is off
> Aug 17 04:06:40 localhost kernel:  sda: sda1
> Aug 17 04:06:41 localhost dhcpcd[1200]: timed out waiting for a valid DHCP server response 
> Aug 17 04:08:05 localhost kernel: usb.c: USB disconnect on device 2
> 
> Can someone read this and make sense of what it is saying?

It says that there's nothing wrong, apparently.

> By the way, this is RedHat 7.2. If anyone wants to waste their time telling
> me to upgrade, go for it.

Well, you should.


--=_mimegpg-commodore.email-scan.com-20911-1187533285-0001
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBGyFHlx9p3GYHlUOIRAjGyAJ4/IbsuTr5hKntcyaLdb52pzCD8+gCdFYUU
8qJU8QCAZ6BHQJ3FDcAQgUk=
=X+ML
-----END PGP SIGNATURE-----

--=_mimegpg-commodore.email-scan.com-20911-1187533285-0001--
0
sam217 (1634)
8/19/2007 2:21:26 PM
Sam <sam@email-scan.com> writes:

> Allan Adler writes:
> > I have been using flash drives with my laptop for some time. I attached
> > one last night and used it. Then I unmounted it. Then I mounted it again
> > and got the error message in the subject line.
> 
> And where exactly did you get it /from/?

The flash drive or the error message? Someone gave me the flash drive.
 
> > Aug 17 04:06:40 localhost kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
> > Aug 17 04:06:40 localhost kernel: SCSI device sda: 129440 512-byte hdwr sectors (66 MB)
> > Aug 17 04:06:40 localhost kernel: sda: Write Protect is off
> > Aug 17 04:06:40 localhost kernel:  sda: sda1
> > Aug 17 04:06:41 localhost dhcpcd[1200]: timed out waiting for a valid DHCP server response 
> > Aug 17 04:08:05 localhost kernel: usb.c: USB disconnect on device 2
> > 
> > Can someone read this and make sense of what it is saying?
> 
> It says that there's nothing wrong, apparently.

It does say that the USB device got disconnected. It doesn't do that
if I mount the flash drive while  I'm logged in, no matter how long I
leave it plugged in and no matter how little attention I pay to it.

I rebooted with the flash drive unplugged and then plugged it in after
I logged in. It works fine.

Any theories about why it doesn't work if I boot with it plugged in?
-- 
Ignorantly,
Allan Adler <ara@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
0
ara68 (499)
8/20/2007 5:36:23 AM
Allan Adler <ara@nestle.csail.mit.edu> writes:

>Sam <sam@email-scan.com> writes:

>> Allan Adler writes:
>> > I have been using flash drives with my laptop for some time. I attached
>> > one last night and used it. Then I unmounted it. Then I mounted it again
>> > and got the error message in the subject line.

When you unplugged it, the system did not know that you had done so, so
when you plugged it in again, it thought that /dev/sda? was already used. 
Look for /dev/sdb? instead.

>> 
>> And where exactly did you get it /from/?

>The flash drive or the error message? Someone gave me the flash drive.
> 
>> > Aug 17 04:06:40 localhost kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
>> > Aug 17 04:06:40 localhost kernel: SCSI device sda: 129440 512-byte hdwr sectors (66 MB)
>> > Aug 17 04:06:40 localhost kernel: sda: Write Protect is off
>> > Aug 17 04:06:40 localhost kernel:  sda: sda1
>> > Aug 17 04:06:41 localhost dhcpcd[1200]: timed out waiting for a valid DHCP server response 
>> > Aug 17 04:08:05 localhost kernel: usb.c: USB disconnect on device 2
>> > 
>> > Can someone read this and make sense of what it is saying?
>> 
>> It says that there's nothing wrong, apparently.

>It does say that the USB device got disconnected. It doesn't do that
>if I mount the flash drive while  I'm logged in, no matter how long I
>leave it plugged in and no matter how little attention I pay to it.

>I rebooted with the flash drive unplugged and then plugged it in after
>I logged in. It works fine.
0
unruh-spam (2990)
8/20/2007 6:20:21 AM
This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--=_mimegpg-commodore.email-scan.com-28948-1187607732-0002
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Allan Adler writes:

> Sam <sam@email-scan.com> writes:
> 
>> Allan Adler writes:
>> > I have been using flash drives with my laptop for some time. I attached
>> > one last night and used it. Then I unmounted it. Then I mounted it again
>> > and got the error message in the subject line.
>> 
>> And where exactly did you get it /from/?
> 
> The flash drive or the error message? Someone gave me the flash drive.

Obviously the error message.

> I rebooted with the flash drive unplugged and then plugged it in after
> I logged in. It works fine.
> 
> Any theories about why it doesn't work if I boot with it plugged in?

Probably something specific to your machine's BIOS.

--=_mimegpg-commodore.email-scan.com-28948-1187607732-0002
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBGyXS0x9p3GYHlUOIRAt07AJ981o2V8FzHqToYJ1DNSkvwND8qoQCeP+xc
gsRM6mpUBxf4XqklnXWHPSE=
=0UQA
-----END PGP SIGNATURE-----

--=_mimegpg-commodore.email-scan.com-28948-1187607732-0002--
0
sam217 (1634)
8/20/2007 11:02:12 AM
Allan Adler <ara@nestle.csail.mit.edu> wrote:
>
>> > Aug 17 04:06:40 localhost kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
>> > Aug 17 04:06:40 localhost kernel: SCSI device sda: 129440 512-byte hdwr sectors (66 MB)
>> > Aug 17 04:06:40 localhost kernel: sda: Write Protect is off
>> > Aug 17 04:06:40 localhost kernel:  sda: sda1
>> > Aug 17 04:06:41 localhost dhcpcd[1200]: timed out waiting for a valid DHCP server response
>> > Aug 17 04:08:05 localhost kernel: usb.c: USB disconnect on device 2
>> >
>> > Can someone read this and make sense of what it is saying?
>>
>> It says that there's nothing wrong, apparently.
>
>It does say that the USB device got disconnected. It doesn't do that
>if I mount the flash drive while  I'm logged in, no matter how long I
>leave it plugged in and no matter how little attention I pay to it.
>
>I rebooted with the flash drive unplugged and then plugged it in after
>I logged in. It works fine.
>
>Any theories about why it doesn't work if I boot with it plugged in?

I get exactly the same thing on a laptop (actually on
two of them).

If the USB reader is connected and has a card in it
during boot, the system becomes confused and cannot
access the card (I don't remember all the details, as I
learned long ago not to do that).  It can be resurrected
by disconnected the reader from the USB bus, waiting a
few seconds, and plugging it back in.  After that I can
change only the CF card and it is recognized.

You've gotten all sorts of comments that are absolutely
counter to the log messages.  It clearly did get the
disconnect, and it clearly is not coming back at
/dev/sdb rather than /dev/sda, plus the BIOS has
absolutely nothing to do with it, ever.

That said, *every* time I plug in a card reader, to
see which device it is I do

   dmesg | tail -40

Actually, I let a script to it, because the results are
very predictable and easy to analyze.  Note that when
the reader is disconnected a disconnect happens
immediately, and when it is connected a scan is started
instantly.  But it takes 5-10 seconds before the scan is
complete.  A mount command during that time will fail.

And while nothing in your logs indicated that it
happened, it does happen sometimes that the device is
not /dev/sda, and it might be sdb or sdc.

I do a lot of photography with a digital camera, and
developed a rather complex script to completely automate
the process of transfering images from a CF card to
the computer.

-- 
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)              floyd@apaflo.com
0
floyd7 (826)
8/20/2007 11:38:31 AM
floyd@apaflo.com (Floyd L. Davidson) writes:

> If the USB reader is connected and has a card in it
> during boot, the system becomes confused and cannot
> access the card (I don't remember all the details, as I
> learned long ago not to do that).  It can be resurrected
> by disconnected the reader from the USB bus, waiting a
> few seconds, and plugging it back in.  After that I can
> change only the CF card and it is recognized.

To me, the laptop is a black box. I don't know what you mean by
disconnecing the reader from the USB bus or changing cards. My laptop
has a USB port and I just plug in the flash drive.
 
> You've gotten all sorts of comments that are absolutely
> counter to the log messages.  It clearly did get the
> disconnect, and it clearly is not coming back at
> /dev/sdb rather than /dev/sda, plus the BIOS has
> absolutely nothing to do with it, ever.

I'm not the one who mentioned the BIOS. It was Sam. In view of that
confusion, I don't know whether the comments you refer to are mine
or Sam's. It sounds like you are referring to Sam's comment that
all is well.
 
> And while nothing in your logs indicated that it
> happened, it does happen sometimes that the device is
> not /dev/sda, and it might be sdb or sdc.

Is there any way to detect which device it is? You mentioned using dmsg.
Could I find the specific information in, say, /proc?
-- 
Ignorantly,
Allan Adler <ara@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
0
ara68 (499)
8/20/2007 2:51:01 PM
Allan Adler <ara@nestle.csail.mit.edu> wrote:
>floyd@apaflo.com (Floyd L. Davidson) writes:
>
>> If the USB reader is connected and has a card in it
>> during boot, the system becomes confused and cannot
>> access the card (I don't remember all the details, as I
>> learned long ago not to do that).  It can be resurrected
>> by disconnected the reader from the USB bus, waiting a
>> few seconds, and plugging it back in.  After that I can
>> change only the CF card and it is recognized.
>
>To me, the laptop is a black box. I don't know what you mean by
>disconnecing the reader from the USB bus or changing cards. My laptop
>has a USB port and I just plug in the flash drive.

Okay.

You are using a little thingy that plugs into the USB
bus, and what it contains inside can be divided into two
parts: one is some flash memory and the other is a
controller that can read the memory.  Yours is an all in
one device.

I am using something almost identical, except those two
parts are physically two separate thingies.  One is a
"reader" that for example can stay plugged into the USB
bus on a desktop machine.  The other thingy is called a
Compact Flash (CF) card, which plugs into the reader (or
into my cameras, or into a different reader connected to
my laptop).

Same basic stuff, except mine is in two parts while
yours is an all in one part.

Mine is only slightly more complicated by the fact that
one thing happens if I take the CF card out of the
reader but leave the reader plugged into the computer
(which is something you don't have to be concerned
with), and a different result happens if I unplug the
reader entirely (which is what you do every time).

>> You've gotten all sorts of comments that are absolutely
>> counter to the log messages.  It clearly did get the
>> disconnect, and it clearly is not coming back at
>> /dev/sdb rather than /dev/sda, plus the BIOS has
>> absolutely nothing to do with it, ever.
>
>I'm not the one who mentioned the BIOS. It was Sam. In view of that
>confusion, I don't know whether the comments you refer to are mine
>or Sam's. It sounds like you are referring to Sam's comment that
>all is well.

I just didn't want you to be concerned about some of the
obviously illogical statements (regarding your log
files), or in the case of the BIOS comment it was
something that might sound likely and send you off
trying to determine what it all means.  It means
nothing.

>> And while nothing in your logs indicated that it
>> happened, it does happen sometimes that the device is
>> not /dev/sda, and it might be sdb or sdc.
>
>Is there any way to detect which device it is? You mentioned using dmsg.
>Could I find the specific information in, say, /proc?

Well, I've always done it with

  dmesg | tail -40

And looked for the stuff about which scsi device it
mentions.  Another way is "tail -40 /var/log/messages"
which is virtually identical.

However, yes it is possible to figure it out from
/proc/diskstats too.  But it isn't any easier...  If you
connect the device to a USB port and then do "cat
/proc/diskstats" you might get something that is
genuinely obnoxious (or maybe not).  Here's something to
make you nervous about the potential.

   >cat /proc/diskstats | wc -l
   64

It says on my computer there are 64 lines in that file.
I have three disks with lots of partitions on them,
but you will have at least about 20 or lines in that
file...

So, I did this, with a USB card reader plugged in

   >grep sd /proc/diskstats
   8    0 sda 236 195 606 1334 0 0 0 0 0 640 1334
   8    1 sda1 220 220 0 0
   8    2 sda2 185 185 0 0
   8   16 sdb 11 143 161 89 0 0 0 0 0 89 89
   8   17 sdb1 153 153 0 0

So it appears that there are two scsi devices, and sdb is
the last one that was connected.  And that is correct.  If
the device is unplugged those last two lines go away.

But I think that to reliably detect your device, you need
to grep the file before and after and look for the changes.

On the other hand, the last few lines from dmesg look like
this:

  sdb: assuming drive cache: write through
   sdb: sdb1
  sd 40:0:0:0: Attached scsi removable disk sdb
  sd 40:0:0:0: Attached scsi generic sg1 type 0
  usb-storage: device scan complete

Which appears to me to be significantly better, given that
you know it has to have been something just done, and
it tells you that sdb is a "removable disk" so you know
it's the right one  (the other scsi device listed in
/proc/diskstats is a regular hard drive).

-- 
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)              floyd@apaflo.com
0
floyd7 (826)
8/21/2007 2:44:12 AM
Thanks very much for the clarifications and explanations. I don't have
/proc/diskstats but I'll try to work with dmesg.
-- 
Ignorantly,
Allan Adler <ara@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
0
ara68 (499)
8/21/2007 1:32:02 PM
Floyd L. Davidson <floyd@apaflo.com> wrote:
> I get exactly the same thing on a laptop (actually on
> two of them).

Yeah, me too. On both laptops and desktop PCs. I haven't spent a great deal of 
time looking at this yet, so I don't know the cause.

Mark.

-- 
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

0
markhobley (503)
9/9/2007 8:08:33 PM
Allan Adler <ara@nestle.csail.mit.edu> writes:

> I have been using flash drives with my laptop for some time. I attached
> one last night and used it. Then I unmounted it. Then I mounted it again
> and got the error message in the subject line. Here is what /etc/fstab
> says:
> LABEL=/                 /                       ext2    defaults        1 1
> LABEL=/boot             /boot                   ext2    defaults        1 2
> /dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
> none                    /proc                   proc    defaults        0 0
> none                    /dev/pts                devpts  gid=5,mode=620  0 0
> /dev/hda6               swap                    swap    defaults        0 0
> /dev/sda1               /mnt/flash              auto    noauto,owner    0 0
> 
> Here is what ls -l /dev/sda1 shows:
> brw-------    1 gleep    root       8,   1 Mar 23  2001 /dev/sda1
> 
> I booted with the flash drive inserted. Maybe that is the problem.

It is not the problem: it is a symptom of the problem. The problem is
that in the file /etc/sysconfig/network-scripts/ifcfg-eth0
I had the line 
ONBOOT=yes
As soon as I changed yes to no, I no longer had trouble using the flash
drive when I boot with it plugged in. I can mount it and unmount it as
often as I want without no difficulty. I don't ever have to look at
/var/log/messages to do so. The clue was the line in /var/log/messages
that showed that when /mnt/flash failed to mount it was trying to use
eth0, even though I'm not on a network.

Some relevant discussion, and also some nonsense, on this is in the thread
"I have to log in twice".

Anyway, Floyd L. Davidson reported a similar problem. Maybe he can try this
solution and see if it works.
-- 
Ignorantly,
Allan Adler <ara@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
0
ara68 (499)
9/22/2007 12:43:31 AM
Reply: