Find the answer to your Linux question:
Results 1 to 4 of 4
Does anyone know how GRUB's stage 1 boot loader knows which of the stage 1.5 boot loaders to use? There's a different stage 1.5 loader for each file system type, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Location
    South East England
    Posts
    40

    GRUB stage 1.5


    Does anyone know how GRUB's stage 1 boot loader knows which of the stage 1.5 boot loaders to use? There's a different stage 1.5 loader for each file system type, and the boot process has to know which one to run before it can mount the root file system. Does GRUB install the correct 1.5 stage when GRUB itself is installed, or does stage 1 do some kind of polling till if finds a set of 1.5 file drivers that work and then use them?

    If this is the wrong forum to be posting this in please let me know.

    Thanks.

  2. #2
    Linux User
    Join Date
    Dec 2007
    Location
    Idaho USA
    Posts
    362
    When GRUB is installed the correct stage1.5 starting absolute sector # is inbeded into stage 1. I think the sector # is stored in GRUB stage 1 at bite offset 42hex.

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Location
    South East England
    Posts
    40
    Sorry for not replying earlier ... just realised my email notification not working for some reason ... don't know why.

    Thanks for the info.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763

    Smile

    Here is manual of grub ..it was really interesting to read .
    GNU GRUB Manual 0.97

    Some hints (I may be wrong on these -- just learning about them)

    stage 1 will be stored in MBR - stage1 is the content of MBR and it has size 512 bytes which just points to stage1.5. stage 1.5 which will load stage 2 which contains the config. file

    you can verify this with
    hexdump /boot/grub/stage1
    MBR ends with footer aa55

    Master boot record - Wikipedia, the free encyclopedia


    # file /boot/grub/stage1
    /boot/grub/stage1: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, code offset 0x48
    # file /boot/grub/stage2
    /boot/grub/stage2: GRand Unified Bootloader stage2 version 3.2, installed partition 65535, identifier 0x0, GRUB version 0.97, configuration file (hd3,0)/boot/grub/grub.conf
    If you found - interesting or useful info..do share

    EDIT:
    I found a good link:
    Inside the Linux boot process
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •