Help - Search - Members - Calendar
Full Version: Hda/hdc Assignment
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
daniel3000
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
InSearchOf
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
daniel3000
Thanks a lot... no hurry! biggrin.gif
wowo123
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
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
InSearchOf
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
daniel3000
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 tongue.gif )

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
InSearchOf
QUOTE(daniel3000 @ Nov 23 2006, 12:19 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  tongue.gif )

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
*


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

Late
Meanie
QUOTE(daniel3000 @ Nov 24 2006, 03:19 AM)
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  tongue.gif )

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
*


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
InSearchOf
QUOTE(Meanie @ Nov 23 2006, 04:30 PM)
QUOTE(daniel3000 @ Nov 24 2006, 03:19 AM)
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  tongue.gif )

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
*


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
*



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
karlto
QUOTE(daniel3000 @ Nov 24 2006, 06:19 AM)
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?
Meanie
QUOTE(karlto @ Nov 24 2006, 11:42 AM)
QUOTE(daniel3000 @ Nov 24 2006, 06:19 AM)
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?
*



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.
karlto
QUOTE(Meanie @ Nov 24 2006, 03:05 PM)
QUOTE(karlto @ Nov 24 2006, 11:42 AM)
QUOTE(daniel3000 @ Nov 24 2006, 06:19 AM)
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?
*



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.
*


I guess what I said would have made more sense if they weren't both using the same bus, huh? Sorry... biggrin.gif
desertrat
QUOTE(daniel3000 @ Nov 23 2006, 02:27 PM)
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:

http://www.oesf.org/forums/index.php?showt...=ide\.opts
daniel3000
Thanks a lot for the info about the stab file, meanie! Now I can automate swap activation correctly!

daniel
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.