the Multiboot information provides the field "boot_device". The specification says:
After a short research I found that it's 0x00 for first floppy drive, 0x01 for second, 0x80 for first hard drive and 0x81 for the second one. But grub gives me other values, too. For example on my notebook I get 0x9F when booting from the DVD-drive. When doing that with VMware I get the same value. Bochs, qemu and VirtualBox give me 0xE0 in this case. It seems also that it doesn't play a role wether the disk is on the primary or secondary bus.multiboot wrote:The first byte contains the bios drive number as understood by the bios INT 0x13 low-level disk interface: e.g. 0x00 for the first floppy disk or 0x80 for the first hard disk.
My question is: Does anybody know a source for the possible values? Does it even exist or is there no rule/standard?
Perhaps some background for the case that I'm going in the wrong direction
My filesystem needs of course to know on which device the root-fs should be. So that it uses the CD if booting from CD and so on. Currently I simply pass the name for the device (for example cda1 or hdb1) via multiboot-module-parameter. But thats of course not very good because for example the CD-drive may hang on different buses on different machines.
Therefore I'm searching for a way to automatically determine the drive from which my OS booted. I've already read that it should be possible by using BIOS interrupts. But my OS runs in protected mode only ATM and it would be nice to be able to keep that So, is there another way to figure that out?
Thanks!
hrniels