Re: mount: /dev/sda1: unknown device
- From: floyd@xxxxxxxxxx (Floyd L. Davidson)
- Date: Mon, 20 Aug 2007 18:44:12 -0800
Allan Adler <ara@xxxxxxxxxxxxxxxxxxxx> wrote:
floyd@xxxxxxxxxx (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@xxxxxxxxxx
.
- Follow-Ups:
- Re: mount: /dev/sda1: unknown device
- From: Allan Adler
- Re: mount: /dev/sda1: unknown device
- References:
- mount: /dev/sda1: unknown device
- From: Allan Adler
- Re: mount: /dev/sda1: unknown device
- From: Sam
- Re: mount: /dev/sda1: unknown device
- From: Allan Adler
- Re: mount: /dev/sda1: unknown device
- From: Floyd L. Davidson
- Re: mount: /dev/sda1: unknown device
- From: Allan Adler
- mount: /dev/sda1: unknown device
- Prev by Date: to be inland or required will consult national dutys to hourly occupy
- Next by Date: Probelm Facing With IRPOLL
- Previous by thread: Re: mount: /dev/sda1: unknown device
- Next by thread: Re: mount: /dev/sda1: unknown device
- Index(es):
Relevant Pages
|