[ previous ] [ next ] [ threads ]
 
 From:  Jim Gifford <jim at giffords dot net>
 To:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall] Problem installing on WRAP
 Date:  Mon, 23 Feb 2004 11:39:12 -0500
You should rm /dev/hdc0 as it is just a waste of disk space.  In linux,
ide disks are hdX and the partitions are hdXy where X is the letter of
the whole device, and y is the partition number.  I've never seen any
device name of the form 'hdc0' in the 12 years I've been using linux.

It looks like the kernel is detecting the CF card as hdc.  But it looks
like the ide-disk driver isn't getting attached to the device.

Here's an example of 'dmesg | grep hd' on my laptop (granted, no compact
flash card, but you'll see what I mean):

Kernel command line: root=/dev/hda4 hdc=scsi
ide_setup: hdc=scsi
    ide0: BM-DMA at 0x1840-0x1847, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x1848-0x184f, BIOS settings: hdc:pio, hdd:pio
hda: IC25N080ATMR04-0, ATA DISK drive
hdc: MATSHITACD-RW CW-8121, ATAPI CD/DVD-ROM drive
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 156301488 sectors (80026 MB) w/7884KiB Cache, CHS=9729/255/63, UDMA(33)
hdc: attached ide-scsi driver.

You can see from this output that hda has the ide-disk driver attached,
and hdc (my cd-rw drive) has the ide-scsi driver attached.  You need to
look at the output of dmesg | grep hd to see what's going on.  There
might be a way to force the kernel to bind the ide-disk driver to hdc.

hope this helps,
jim

On Mon, Feb 23, 2004 at 04:29:44PM -0000, Paul Evans wrote:
> Thanks Jim
> 
> When I do ls -l /dev/hdc0 is comes up:
> 
>     -rw-r--r--    1 root     root    5242880 Feb 23 15:37 /dev/hdc0
> 
> So it looks like you're correct in that it's creating a file. All the other
> hdc* come up:
> 
>    brw-rw----     1   root     disk   22, 0, Feb 13 11:14 /dev/hdc
> ...etc
> 
> The strange thing is I've looked through /var/log/messages and it tells me:
> 
>    kernel: hdc: LEXAR ATA FLASH, CFA DISK drive
> 
> I've no idea whether the CD-IDE adapter is on the primary or secondary bus -
> I've just plugged it into a spare IDE port which is daisychained to the cd
> drive.
> 
> Doing a hdparm -i /dev/hdc    says no such device or address
> 
> Same but for hdc0 says:    HDIO_GET_IDENTITY failed: Inappropriate ioctl for
> device
> 
> Many thanks for all of your help.
> 
> 
> Paul.
> 
> > /dev/hdc0 isn't a normal device name for a hard disk block device under
> > linux.  Most likely, you're creating a normal file /dev/hdc0 that
> > contains the contents.  What does 'ls -l /dev/hdc0' show?
> >
> > The error message about no such device means there is no hardware behind
> > the driver for hdc (ie, nothing at secondary bus, master position).
> >
> > Is your CF-IDE adapter on the primary or secondary bus, master or slave?
> > The first thing you have to do is make sure the CF card is being seen by
> > your linux machine before you can write to it.
> >
> > Try using hdparm -i on the devices /dev/hda, /dev/hdb, /dev/hdc, and
> > /dev/hdd and look for the drive information that matches your CF.  Then
> > use that device name for your dd command.  You can also do
> > 'dmesg | grep hd' and look for your CF media in that output.  If you
> > don't find it this way, it isn't being recognized.
> >
> > You won't need to blank the media, as dd does a direct write to the
> > media.
> >
> > hope this helps,
> > jim
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: m0n0wall dash unsubscribe at lists dot m0n0 dot ch
> > For additional commands, e-mail: m0n0wall dash help at lists dot m0n0 dot ch
> >
> >
>