Page 1 of 1

communicating boot device to kernel

Posted: Fri Jun 03, 2005 1:57 am
by distantvoices
does somebody know if grub knows/is able to communicate the device it has booted from to the kernel?

if yes, is that a specific field in the multiboot structure?

I am asking because I don't want to be stuck with having the cdrom drive always require to be master on the secondary ide controller. What if it's slave on the primary one, eh?

Thanks in advance for shedding some light on this issue!
edit: silly me, shoulda google ere posting.

Code: Select all

/* The Multiboot information.  */
typedef struct multiboot_info
{
   unsigned long flags;
   unsigned long mem_lower;
   unsigned long mem_upper;
   unsigned long boot_device;  ---> that's the one I need, eh?
   unsigned long cmdline;
   unsigned long mods_count;
   unsigned long mods_addr;
   union
   {
      aout_symbol_table_t aout_sym;
      elf_section_header_table_t elf_sec;
    } u;
    unsigned long mmap_length;
    unsigned long mmap_addr;
} multiboot_info_t;
Hope this is helpful for others too. Now I gonna set off and check out how to interpret the multiboot boot device. *g*