You are not logged in.
Pages: 1
i am trying to retrieve the bios boot device used on startup. not what the kernel reports in /proc/sys/kernel/real-root-dev but the actuall bios device. i know on boot when "int 19h" is called, DL holds this info (0x80, 0x81, etc) , but i have no idea if/were i can retrieve this easily. i can code a small asm program to read the cmos data (in 71h) but i think there might be a simpler/native way todo it. any ideas?
thanks.
Offline
Couple of things - first, the int calls will only work on x86 architectures... and no there's not real easy way to do this in native calls.... if you want to do it from user space, you can check out LRMI (http://lrmi.sourceforge.net) - and yes it's active, just not much to update alot - LRMI is actually used by lswhd in some way... it's a C wrapper to the protected "int" calls used for BIOS access....
that's about all I got...
Offline
tnx man.
i know its gonna be x86 only, but thats ok - as long as Arch is i686, its fine with me
i looked at the syslinux MBR sources (thats what im using on my livecd) and saw it does save DL on startup, but doesnt retrieve it to users' use. so i might make a patch to add the DL as a parameter to the command line something like "BIOSBOOTDEV=0x80". the problem is with USB - i didnt understand how it uses the MBR - some docs said it doesnt need to have MBR installed, and i got confused by that - if no MBR is installed, how can i retrieve my lovely DL ? so, im gonna leave this for now until im gonna tackle with the liveusb version, then i'll know some more...
i decided reading the cmos data from cmos area using "in 71h" is REALLY bad cause each bios stores the cmos-data in a diff format and in a diff location... i got crazy with shifting bits to get the info from AMI bios... so MBR hacking will be my best bet.
Offline
Pages: 1