Author Topic: Hda/hdc Assignment  (Read 3144 times)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Hda/hdc Assignment
« on: November 22, 2006, 10:11:19 am »
Hello,

a question:
Where (in pdaXrom 1.1.0beta3) is the logic which recognizes if the Microdrive is /dev/hda or /dev/hdc after bootup (which depends on if a CF flash card is inserted during boot or not)?

Thanks!
daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #1 on: November 22, 2006, 10:50:21 am »
Darnit!... I could have told you where this is all done... BUT... I'm at work... and I just ssh into my Z... and I installed rc121 just to hack away at it... (booted started wifi interface... thats it)...

Well I just had a clever idea "Let me reboot my Z"

Well the my NIC isn't going to initilize again... so I have no Z access till I get home...  And I sure as hell am not goin to try to talk my wife through configure my wifi card using iwconfig... :-)

Give me a few hours and I will get that answer for you...

Late
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #2 on: November 22, 2006, 03:08:21 pm »
Thanks a lot... no hurry!  
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

wowo123

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #3 on: November 23, 2006, 08:10:11 am »
For me (SL3200) the microdrive is always /dev/hda1 (mounted to /mnt/ide) and the CF-Slot is /dev/hdc1 (mounted to /mnt/cf). To achieve this automatically each time I boot, I use my microdrive with only one large ext3 partition (which allows me also to install programs there in the case I need to. It also holds my swap-file of 128 MB)

Then I had to change the lines in /etc/fstab in the usual way:

/dev/hda1 /mnt/ide auto noauto,owner 0 0
/dev/hdc1 /mnt/cf   auto noauto,owner 0 0

I added another line for using USB-sticks:

/dev/sda1 /mnt/usbstorage auto noauto,owner 0 0  

After next booting all devices are always mounted properly, CF-card inserted or not.

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #4 on: November 23, 2006, 09:27:14 am »
hmm, but wasn't there this issue with the PCMCIA subsystem assigning /dev/hda to the first recognized IDE drive in the two slots, and since the open slot is the first one, /dev/hda is attached to a CF if inserted and to MD if CF is not inserted during boot?

I also have a line for /dev/hda1 to mount on /mnt/cf in my fstab, but OTOH the device names ARE different, depending on presence of CF card during boot.
It seems the fstab entry is simply not used.

InSearchOf, what's your opinion or knowledge about this?
thanks
daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #5 on: November 23, 2006, 11:20:47 am »
Well as wowo123 said.. that mount points are always mounted to where they ar specified in fstab... but I would assume just like on a desktop pc... that there are primary and secondary channels... by hardware these are specific as microdrive being primary/master(hda) and cf being secondary/master(hdc)...

If you are having problems with them not matching up let me know... because I dont know if you experienced this yourself or if you overheard(read) this...

I'm still going to look for where these are assigned... I can't find it... or maybe I over looked it...

Late
« Last Edit: November 23, 2006, 11:21:27 am by InSearchOf »
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #6 on: November 23, 2006, 12:19:04 pm »
Hi,

I just teted it again.
And yes, the CF card is mounted where fstab points to, that's right:
/dev/hda1 is mounted to /mnt/cf in fstab.
And that's correct: IF there is a CF in the slot during boot, it will be /dev/hda.

If there is no CF in the slot, the MD will be /dev/hda. But in that case, /dev/hda1 is NOT mounted to /mnt/cf (and it cannot, because it is a swap partition here   )

BUT OTOH I have a "swapon /dev/hda1" in an rc script, and that works well if no CF is inserted during boot. However, if there is a CF, this command fails.

So there IS a difference here, dependent on if there is a CF inserted during boot.

/etc/mtab shows:

MD is  /dev/hda if NO CF during boot
MD is /dev/hdc if CF during boot.

Is this not the case on your 1.1.0beta3 installations??

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #7 on: November 23, 2006, 04:12:03 pm »
Quote
Hi,

I just teted it again.
And yes, the CF card is mounted where fstab points to, that's right:
/dev/hda1 is mounted to /mnt/cf in fstab.
And that's correct: IF there is a CF in the slot during boot, it will be /dev/hda.

If there is no CF in the slot, the MD will be /dev/hda. But in that case, /dev/hda1 is NOT mounted to /mnt/cf (and it cannot, because it is a swap partition here   )

BUT OTOH I have a "swapon /dev/hda1" in an rc script, and that works well if no CF is inserted during boot. However, if there is a CF, this command fails.

So there IS a difference here, dependent on if there is a CF inserted during boot.

/etc/mtab shows:

MD is  /dev/hda if NO CF during boot
MD is /dev/hdc if CF during boot.

Is this not the case on your 1.1.0beta3 installations??

daniel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=147076\"][{POST_SNAPBACK}][/a][/div]

I will do some research on this... I dont have a 3x00... so I dont run into to this problem...

Late
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Hda/hdc Assignment
« Reply #8 on: November 23, 2006, 04:30:22 pm »
Quote
Hi,

I just teted it again.
And yes, the CF card is mounted where fstab points to, that's right:
/dev/hda1 is mounted to /mnt/cf in fstab.
And that's correct: IF there is a CF in the slot during boot, it will be /dev/hda.

If there is no CF in the slot, the MD will be /dev/hda. But in that case, /dev/hda1 is NOT mounted to /mnt/cf (and it cannot, because it is a swap partition here   )

BUT OTOH I have a "swapon /dev/hda1" in an rc script, and that works well if no CF is inserted during boot. However, if there is a CF, this command fails.

So there IS a difference here, dependent on if there is a CF inserted during boot.

/etc/mtab shows:

MD is  /dev/hda if NO CF during boot
MD is /dev/hdc if CF during boot.

Is this not the case on your 1.1.0beta3 installations??

daniel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=147076\"][{POST_SNAPBACK}][/a][/div]

you are right on.

you can check which is which by interrogating /var/lib/pcmcia/stab at bootup and mount the appropiate device, ie hdc or hda and update fstab accordingly
this is done in rc.rofilesys
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #9 on: November 23, 2006, 05:16:27 pm »
Quote
Quote
Hi,

I just teted it again.
And yes, the CF card is mounted where fstab points to, that's right:
/dev/hda1 is mounted to /mnt/cf in fstab.
And that's correct: IF there is a CF in the slot during boot, it will be /dev/hda.

If there is no CF in the slot, the MD will be /dev/hda. But in that case, /dev/hda1 is NOT mounted to /mnt/cf (and it cannot, because it is a swap partition here   )

BUT OTOH I have a "swapon /dev/hda1" in an rc script, and that works well if no CF is inserted during boot. However, if there is a CF, this command fails.

So there IS a difference here, dependent on if there is a CF inserted during boot.

/etc/mtab shows:

MD is  /dev/hda if NO CF during boot
MD is /dev/hdc if CF during boot.

Is this not the case on your 1.1.0beta3 installations??

daniel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=147076\"][{POST_SNAPBACK}][/a][/div]

you are right on.

you can check which is which by interrogating /var/lib/pcmcia/stab at bootup and mount the appropiate device, ie hdc or hda and update fstab accordingly
this is done in rc.rofilesys
[div align=\"right\"][a href=\"index.php?act=findpost&pid=147101\"][{POST_SNAPBACK}][/a][/div]

Thanks for the clarification... I will check on that tonight... I'm at my brother-in-laws and I'm watchin the Dallas vs. Tampa Bay game (NFL Football for those in in the states)  and right now... The Z is my second priority... :-D

Late
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #10 on: November 23, 2006, 08:42:10 pm »
Quote
MD is  /dev/hda if NO CF during boot
MD is /dev/hdc if CF during boot.
What if you insert CF after boot? Can you guarantee which is which simply by changing the order in which the startup files load drivers?
SL6000-L, RC12

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Hda/hdc Assignment
« Reply #11 on: November 23, 2006, 09:05:29 pm »
Quote
Quote
MD is  /dev/hda if NO CF during boot
MD is /dev/hdc if CF during boot.
What if you insert CF after boot? Can you guarantee which is which simply by changing the order in which the startup files load drivers?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=147119\"][{POST_SNAPBACK}][/a][/div]

if you insert CF after boot, it will be hdc because hda has been assigned to MD

the logic is that the first device on the bus will be given hda, the second will be given hdc. this is done dynamically at boot up and handled by the kernel.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #12 on: November 23, 2006, 09:12:14 pm »
Quote
Quote
Quote
MD is  /dev/hda if NO CF during boot
MD is /dev/hdc if CF during boot.
What if you insert CF after boot? Can you guarantee which is which simply by changing the order in which the startup files load drivers?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=147119\"][{POST_SNAPBACK}][/a][/div]

if you insert CF after boot, it will be hdc because hda has been assigned to MD

the logic is that the first device on the bus will be given hda, the second will be given hdc. this is done dynamically at boot up and handled by the kernel.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=147123\"][{POST_SNAPBACK}][/a][/div]
I guess what I said would have made more sense if they weren't both using the same bus, huh? Sorry...  
SL6000-L, RC12

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #13 on: November 23, 2006, 10:24:56 pm »
Quote
hmm, but wasn't there this issue with the PCMCIA subsystem assigning /dev/hda to the first recognized IDE drive in the two slots, and since the open slot is the first one, /dev/hda is attached to a CF if inserted and to MD if CF is not inserted during boot?
Correct. In a way this behaviour could be useful IFF one can boot from the CF (think of it as on a desktop where you can boot from CD or FDD), but as one cannot boot from CF it's a bloody annoyance.

Quote
I also have a line for /dev/hda1 to mount on /mnt/cf in my fstab, but OTOH the device names ARE different, depending on presence of CF card during boot.
It seems the fstab entry is simply not used.
That's right it doesn't work for me either (C3100 and upto & including beta3). This works for me:

https://www.oesf.org/forums/index.php?showt...=ide\.opts
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Hda/hdc Assignment
« Reply #14 on: November 24, 2006, 03:28:02 am »
Thanks a lot for the info about the stab file, meanie! Now I can automate swap activation correctly!

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0