Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
devfs and zip drive entry
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Kibab
n00b
n00b


Joined: 12 Jun 2002
Posts: 52

PostPosted: Tue Jul 30, 2002 7:41 pm    Post subject: devfs and zip drive entry Reply with quote

I can't seem to find my zip drive entry with devfs. It's on the second controller as a slave so it's normally listed as /dev/hdd. Then I usually use /dev/hdd4 to mount vfat partitions and /dev/hdd1 for linux native partitions.

However, I can't figure out where it should be.

Code:

$ dmesg | grep hd
Kernel command line: root=/dev/hdg2 acpi=no-idle devfs=mount
    ide0: BM-DMA at 0xc000-0xc007, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xc008-0xc00f, BIOS settings: hdc:DMA, hdd:pio
    ide2: BM-DMA at 0xdc00-0xdc07, BIOS settings: hde:pio, hdf:pio
    ide3: BM-DMA at 0xdc08-0xdc0f, BIOS settings: hdg:pio, hdh:pio
hda: CR-48X8TE, ATAPI CD/DVD-ROM drive
hdc: FX4830T, ATAPI CD/DVD-ROM drive
hdd: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
hde: IC35L040AVER07-0, ATA DISK drive
hdg: IC35L040AVER07-0, ATA DISK drive
hde: 80418240 sectors (41174 MB) w/1916KiB Cache, CHS=79780/16/63, UDMA(100)
hdg: 80418240 sectors (41174 MB) w/1916KiB Cache, CHS=79780/16/63, UDMA(100)
hda: ATAPI 40X CD-ROM CD-R/RW drive, 8192kB Cache, DMA
hdc: ATAPI 48X CD-ROM drive, 128kB Cache, UDMA(33)
hdd: No disk in drive
hdd: 98304kB, 32/64/96 CHS, 4096 kBps, 512 sector size, 2941 rpm


It's recognized as hdd on bootup?

In /dev I have:
Code:

$ ls -l /dev/hd* | cut -c65-200
/dev/hda -> ide/host0/bus0/target0/lun0/cd
/dev/hdc -> ide/host0/bus1/target0/lun0/cd
/dev/hde -> ide/host2/bus0/target0/lun0/disc
/dev/hde1 -> ide/host2/bus0/target0/lun0/part1
/dev/hde2 -> ide/host2/bus0/target0/lun0/part2
/dev/hde5 -> ide/host2/bus0/target0/lun0/part5
/dev/hde6 -> ide/host2/bus0/target0/lun0/part6
/dev/hde7 -> ide/host2/bus0/target0/lun0/part7
/dev/hde8 -> ide/host2/bus0/target0/lun0/part8
/dev/hde9 -> ide/host2/bus0/target0/lun0/part9
/dev/hdg -> ide/host2/bus1/target0/lun0/disc
/dev/hdg1 -> ide/host2/bus1/target0/lun0/part1
/dev/hdg2 -> ide/host2/bus1/target0/lun0/part2
/dev/hdg4 -> ide/host2/bus1/target0/lun0/part4
/dev/hdg5 -> ide/host2/bus1/target0/lun0/part5
/dev/hdg6 -> ide/host2/bus1/target0/lun0/part6
/dev/hdg7 -> ide/host2/bus1/target0/lun0/part7
/dev/hdg8 -> ide/host2/bus1/target0/lun0/part8
/dev/hdg9 -> ide/host2/bus1/target0/lun0/part9


Judging by the looks of things, I would guess that it would be at: ide/host0/bus1/target1/lun0/{something} but there are no entries at this point.

Any ideas? Anyone else have a zip drive that they can access?

Thanks.

--Kibab
Back to top
View user's profile Send private message
MBCook
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jul 2002
Posts: 136
Location: Insanity, USA

PostPosted: Wed Jul 31, 2002 3:16 pm    Post subject: Reply with quote

That's what it's going to say because there are no partitions there. What happens when you stick a disk in the drive? Do partitions appear under that dev directory? If that didn't work, I would try booting with a disk in the drive just to see if it gets recignised with partitons that way.
_________________
-- Michael

Read an intelligent book like "The New Thought Police" or "The War Against Boys", and learn the TRUTH.
Back to top
View user's profile Send private message
Kibab
n00b
n00b


Joined: 12 Jun 2002
Posts: 52

PostPosted: Wed Jul 31, 2002 3:21 pm    Post subject: devfs and zipdisks Reply with quote

Well, assuming I know where the zip drive is going to show up, /dev/ide/host0/bus1/target1/lun0/*, then nothing shows up when I insert a zipdisk.

I presume it will show up when I boot with a zipdisk in the drive and will try it this afternoon to see for sure.

--Kibab
Back to top
View user's profile Send private message
TomorrowPlusX
Apprentice
Apprentice


Joined: 07 May 2002
Posts: 168
Location: Washington DC, USA

PostPosted: Thu Aug 01, 2002 3:26 pm    Post subject: ATAPI Zip & Devfs Reply with quote

I can't remember which thread I read this on, but it seems the atapi floppy drivers haven't been made devfs friendly yet.

I could be wrong, and would happily be wrong -- because my thinkpad's beautiful superdrive zip 250 (which works fine under normal dev setups) is collecting dust :(
Back to top
View user's profile Send private message
Kibab
n00b
n00b


Joined: 12 Jun 2002
Posts: 52

PostPosted: Thu Aug 01, 2002 3:32 pm    Post subject: devfs friendly Reply with quote

Hmm.... that's strange if it is the case. It is almost no more work to make a driver use devfs versus to not use devfs. Generally you just call devfs_register_{blk,chr}dev(...) instead of register_{blk,chr}dev(...). Although, it might be a little more difficult because of the removable aspect.

Anyone else have any thoughts?

--Kibab
Back to top
View user's profile Send private message
MBCook
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jul 2002
Posts: 136
Location: Insanity, USA

PostPosted: Thu Aug 01, 2002 6:58 pm    Post subject: Reply with quote

I'll check into that, but in the mean time, if you tell the kernel to use the ide-scsi driver for that drive (let's say it's hdd, then at bootup add "hdd=ide-scsi" to the kernel parameters) and it should work.
_________________
-- Michael

Read an intelligent book like "The New Thought Police" or "The War Against Boys", and learn the TRUTH.
Back to top
View user's profile Send private message
MBCook
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jul 2002
Posts: 136
Location: Insanity, USA

PostPosted: Thu Aug 01, 2002 7:00 pm    Post subject: Reply with quote

You're right, it's not dev-fs aware. Looks like I found me a kernel project.
_________________
-- Michael

Read an intelligent book like "The New Thought Police" or "The War Against Boys", and learn the TRUTH.
Back to top
View user's profile Send private message
MBCook
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jul 2002
Posts: 136
Location: Insanity, USA

PostPosted: Thu Aug 01, 2002 7:01 pm    Post subject: Reply with quote

You're right, it's not dev-fs aware. Looks like I found me a kernel project.
_________________
-- Michael

Read an intelligent book like "The New Thought Police" or "The War Against Boys", and learn the TRUTH.
Back to top
View user's profile Send private message
Kibab
n00b
n00b


Joined: 12 Jun 2002
Posts: 52

PostPosted: Thu Aug 01, 2002 7:24 pm    Post subject: zip drivers not devfs aware Reply with quote

I'll try it as a scsi-drive. That will be an easy workaround if that is the case.

If you are going to work on the zip driver as a kernel project, let me know how it goes or if you need a hand. I would do it myself if I weren't already busy with many other projects.

--Kibab
Back to top
View user's profile Send private message
Kibab
n00b
n00b


Joined: 12 Jun 2002
Posts: 52

PostPosted: Thu Aug 01, 2002 7:29 pm    Post subject: devfs Reply with quote

Oh... I almost forgot, I have a friend who uses devfs with his zip drive with the ide drivers and it works fine. His drive shows up as hdf4. He is using a Redhat/Mandrake kernel, I don't remember which, so it may have been patched with something to provide that support, but I do know that it's possible. Anyone else have their zip drive working under devfs?

--Kibab
Back to top
View user's profile Send private message
MBCook
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jul 2002
Posts: 136
Location: Insanity, USA

PostPosted: Thu Aug 01, 2002 8:24 pm    Post subject: Reply with quote

God i'm an idiot. I've been looking at the code. the ide-floppy doesn't ever touch devfs, because the main ide driver does this for it. This means that it IS devfs aware. So much for a kernel project ;). It should work, I'll go test mine. BTW, all zip disks (that aren't formatted differently by users) store data on partition 4, because that's the default partition number for macs for some odd reason. BRB, running downstairs to check things.

-- RUNS --

-- LOOKS --

-- TESTS --

-- RUNS --

Well, while I know the kernel knows it's there, it doesn't appear in /dev. Oh well. Sorry 'bout the double post too. Did you every try booting with a disk in the drive?
_________________
-- Michael

Read an intelligent book like "The New Thought Police" or "The War Against Boys", and learn the TRUTH.
Back to top
View user's profile Send private message
MBCook
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jul 2002
Posts: 136
Location: Insanity, USA

PostPosted: Thu Aug 01, 2002 8:36 pm    Post subject: Reply with quote

I'm an idiot and should stop posting.

Now that that's out of the way, check it out. I went googling for the ide-floppy guy and found his page on it. It says that DevFS support isn't there because it will require touching some kernel subsystems. But if you want to give it a try, there are two patches you must apply (in order):

The first
And the second

His page says that they apply succesfully to .14 and .16, but doesn't say anything about anything newer. I guess you'll have to use scsi emulation (ide-scsi). Oh well.
_________________
-- Michael

Read an intelligent book like "The New Thought Police" or "The War Against Boys", and learn the TRUTH.
Back to top
View user's profile Send private message
smtanner
Tux's lil' helper
Tux's lil' helper


Joined: 12 May 2002
Posts: 106
Location: Colorado

PostPosted: Fri Aug 02, 2002 3:31 am    Post subject: Reply with quote

I got my zip drive working by using scsi emulation. When I insert a zip disk, /dev/scsi/host0/bus0/target0/lun0/part4 magically appears. Use this device in fstab and everything works. The link /dev/sda4 which should point to the above part4 is not created unless I have the zip disk in during boot but it is not needed anyway.
Back to top
View user's profile Send private message
wilbertnl
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2002
Posts: 89
Location: Tulsa, OK, USA

PostPosted: Fri Aug 02, 2002 3:45 am    Post subject: edit your devfs.conf Reply with quote

I added the following lines to my /etc/devfs.conf.

# Create /dev/discs/hde
LOOKUP ^hde$ CFUNCTION GLOBAL mksymlink discs/disc1/disc hde
REGISTER ^ide/host2/bus0/target0/lun0/zip$ CFUNCTION GLOBAL mksymlink $devname hde
UNREGISTER ^ide/host2/bus0/target0/lun0/zip$ CFUNCTION GLOBAL unlink $devname hde

# Create /dev/discs/hde1
LOOKUP ^hde1$ CFUNCTION GLOBAL mksymlink ide/host2/bus0/target0/lun0/part1 hde1
REGISTER ^ide/host2/bus0/target0/lun0/part1$ CFUNCTION GLOBAL mksymlink $devname hde1
UNREGISTER ^ide/host2/bus0/target0/lun0/part1$ CFUNCTION GLOBAL unlink $devname hde1

# Create /dev/discs/hde4
LOOKUP ^hde4$ CFUNCTION GLOBAL mksymlink ide/host2/bus0/target0/lun0/part4 hde4
REGISTER ^ide/host2/bus0/target0/lun0/part4$ CFUNCTION GLOBAL mksymlink $devname hde4
UNREGISTER ^ide/host2/bus0/target0/lun0/part4$ CFUNCTION GLOBAL unlink $devname hde4
_________________
Wilbert van Bakel
Strive for excellence, not perfection
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum