Results 1 to 7 of 7

Thread: Bootpage Flip necessary after monte - why and how does it work?

  1. #1
    Join Date
    Dec 2003
    Posts
    20

    Bootpage Flip necessary after monte - why and how does it work?

    I recently installed a monte 3.1.1b (installed u5 in the kernel2/root2 and set the drive to boot of that, then use the monte to return to original (but killinitrd'd) 3.1.1b) on my HDVR2, and couldn't get the thing to boot (it was stuck in the Welcome screen) until I did a bootpage -f (flip) command on the tivo's drive. Since it wasn't mentioned in the howto's, and only obscurely in a few posts here, and I can't find bootpage's manpage anywhere, I'd like to know exactly what the flip command does, and why was it necessary.

    I assumed upon startup, that only one (bootpage1) was read, and then its commands invoked what happened from thereon out. Note that this drive originally was setup to start from hda4 instead of the present hda7 (i left the 3.1.1b original userland on hda4 instead of moving it up). My guess is that both bootpages need to be identical if switching partitions, and that the use of bootpage1 only corresponds to kernel1 and root1, whereas bootpage2 corresponds to kernel2 and root2..

    But I'd like a more concrete explanation as to what actually happens at boot.
    HDVR2 - 3.1.1b monte (3.1u5 boot), Bash_env hack, Tytools extraction, and USB200m ethernet.

  2. #2
    Join Date
    Aug 2003
    Posts
    1,285
    bootpage performs 2 functions.

    1) Sets the boot flag for a partition.

    2) Writes boot parameters to the boot sector of the drive.

    When discussing the bootpage program, the bootable partition is one less that the root partition. Flipping the bootpage toggles the boot flag between partitions 3 and 6 - which is where the kernel lives.

  3. #3
    Join Date
    Dec 2003
    Posts
    20
    Quote Originally Posted by Sleeper
    bootpage performs 2 functions.

    1) Sets the boot flag for a partition.

    2) Writes boot parameters to the boot sector of the drive.

    When discussing the bootpage program, the bootable partition is one less that the root partition. Flipping the bootpage toggles the boot flag between partitions 3 and 6 - which is where the kernel lives.

    obviously, the kernel is used to boot and the root= refers to the correct kernel's corresponding root partition.

    But please be more specific explaining the startup process. I thought the bootpage app sets the boot sector(s) on a hard drive with the correct strings to get the correct kernel/root partition started. Please give me a fundamental explanation of what occurs in linux at boot time...

    Before I knew about flipping I thought it works like this:
    1) bootpage sets boot string/spec for drive
    2) upon startup, boot string is read from boot sectors, and goes to correct kernel/root for startup (ie hda3/4 or hda6/7) specified in root= command [and also executes monte on tail partition of the drive, which then uses the kernel specified in the root command to chainload the opposite kernel/root partition].

    Are there two bootpages stored on each drive? I thought the root= command took care of it all.
    Please explain this flipping manner more verbosely - i need to catch up my fundamentals on how linux starts up and where the strings written by bootpage fit in ???
    HDVR2 - 3.1.1b monte (3.1u5 boot), Bash_env hack, Tytools extraction, and USB200m ethernet.

  4. #4
    Join Date
    May 2002
    Posts
    314
    The only reason for the root= string is to tell an already loaded kernel where to find its / partition. It is not used to determine where to find the kernel in the first place.

    That's take care of by a separate byte in the boot header.

    That's why when you use "bootpage", you can set or query the bootpartition# and the bootparams separately.

    And by the way, the bootpartition# can be set to only 3 or 6 (or "4"/"7" if you're using the non-native version of bootpage).

  5. #5
    Join Date
    Dec 2003
    Posts
    20
    Quote Originally Posted by MuscleNerd
    The only reason for the root= string is to tell an already loaded kernel where to find its / partition. It is not used to determine where to find the kernel in the first place.

    That's take care of by a separate byte in the boot header.

    That's why when you use "bootpage", you can set or query the bootpartition# and the bootparams separately.

    And by the way, the bootpartition# can be set to only 3 or 6 (or "4"/"7" if you're using the non-native version of bootpage).

    Ah this makes sense... so...
    1) For my situation, the originallly restored 3.1.1b backup (before monte'ing) was set to boot off of hda3's kernel. Bootpage -f command changes it to boot to hda6's kernel (the 31u5 I needed). So before I did the flip, the machine was attempting to boot to the castrated (killinitrd'd) kernel, thus the Forever welcome screen.

    2) bootparams set by Bootpage -P command tell whichever kernel was booted to use whatever root is specified in the root= command.

    To be redundant, bootpage -f changes which kernel is executed, and bootpage -P changes params that are executed -AFTER- that said kernel is executed.


    Thanks
    !!
    HDVR2 - 3.1.1b monte (3.1u5 boot), Bash_env hack, Tytools extraction, and USB200m ethernet.

  6. #6
    Join Date
    Dec 2003
    Posts
    20

    bootpage -b and bootpage -B

    Quote Originally Posted by MuscleNerd
    The only reason for the root= string is to tell an already loaded kernel where to find its / partition. It is not used to determine where to find the kernel in the first place.

    That's take care of by a separate byte in the boot header.

    That's why when you use "bootpage", you can set or query the bootpartition# and the bootparams separately.

    And by the way, the bootpartition# can be set to only 3 or 6 (or "4"/"7" if you're using the non-native version of bootpage).
    Lastly, alternatively I could've done a bootpage -B /dev/hda6 ... instead of a bootpage -f (from bootpartition set to /dev/hda3)...

    Now I see. I overlooked the difference in the -h command in bootpage, completely ignoring the -b/-B commands which correspond to the bootpartition variable --- booting the proper kernel.
    HDVR2 - 3.1.1b monte (3.1u5 boot), Bash_env hack, Tytools extraction, and USB200m ethernet.

  7. #7
    Join Date
    Aug 2003
    Posts
    1,285
    Quote Originally Posted by MuscleNerd
    The only And by the way, the bootpartition# can be set to only 3 or 6 (or "4"/"7" if you're using the non-native version of bootpage).
    MuscleNerd, This is good for most. I have been told that alternate partitions can be used as well. I never tried it though I intend to.

    http://www.dealdatabase.com/forum/sh...ion#post130164

    Sleeper

Posting Permissions

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