alldeadhomiez
10-05-2004, 07:17 PM
I have attached the bootpage code I am using. Changes from the old version:
- fixed off-by-one on kernel partitions
- changed some outputs to match TiVo bootpage
- added byteswap auto-detection
- improved (?) command line parsing
- other minor fixups, probably introduced more bugs
This should support a lot more of the original bootpage options than the tridge code.
The original author of this code is unknown. If you know who wrote it, please contact me so I can add them to the credits.
If you maintain a TiVo utilities CD, please replace your bootpage binary with this one. The off-by-one kernel partition numbering on the old version has caused much confusion and grief among novice users.
Quick usage notes:
The boot page (sector 0 of your TiVo "A" drive) contains several interesting settings used by the PROM during the boot process. Three of the most important settings are:
- boot kernel partition: tells the PROM which partition to look in for a bootable kernel image
- alternate kernel partition: during a software upgrade, "bootpage -f" is invoked to flip the boot and alternate partition numbers in the bootpage, after the new kernel image has been written to the alternate partition. The PROM itself does not look at this field.
- boot parameters (kernel command line): this is passed verbatim to the kernel to tell it the root partition (hda4 or hda7), and often is used to pass environment variables or other kernel options ("dsscon=true console=2,115200", "upgradesoftware=false", etc.)
To find your active root partition, run bootpage -p /dev/<DEVICE> (<DEVICE> will vary, depending on where the TiVo drive is set up in your PC):
# bootpage -p /dev/hdc
root=/dev/hda4 dsscon=true console=2,115200
Obviously, the kernel command line uses device names from the perspective of the TiVo kernel, not from the perspective of your PC. Thus you will never see something like "root=/dev/hdcX" in the kernel command line.
To find your active kernel partition, run bootpage -b /dev/<DEVICE>:
# bootpage -b /dev/hdc
3
In this case, your kernel partition is accessible from the PC as /dev/hdc3, so if you wish to replace the kernel (say, with a killhdinitrd'ed kernel) you would do something like:
# dd if=kernel.img of=/dev/hdc3
Note that older versions of the x86 bootpage utility don't always give you the results you expect. If you have any doubts about what version you are running, download the one in this post to be safe.
- fixed off-by-one on kernel partitions
- changed some outputs to match TiVo bootpage
- added byteswap auto-detection
- improved (?) command line parsing
- other minor fixups, probably introduced more bugs
This should support a lot more of the original bootpage options than the tridge code.
The original author of this code is unknown. If you know who wrote it, please contact me so I can add them to the credits.
If you maintain a TiVo utilities CD, please replace your bootpage binary with this one. The off-by-one kernel partition numbering on the old version has caused much confusion and grief among novice users.
Quick usage notes:
The boot page (sector 0 of your TiVo "A" drive) contains several interesting settings used by the PROM during the boot process. Three of the most important settings are:
- boot kernel partition: tells the PROM which partition to look in for a bootable kernel image
- alternate kernel partition: during a software upgrade, "bootpage -f" is invoked to flip the boot and alternate partition numbers in the bootpage, after the new kernel image has been written to the alternate partition. The PROM itself does not look at this field.
- boot parameters (kernel command line): this is passed verbatim to the kernel to tell it the root partition (hda4 or hda7), and often is used to pass environment variables or other kernel options ("dsscon=true console=2,115200", "upgradesoftware=false", etc.)
To find your active root partition, run bootpage -p /dev/<DEVICE> (<DEVICE> will vary, depending on where the TiVo drive is set up in your PC):
# bootpage -p /dev/hdc
root=/dev/hda4 dsscon=true console=2,115200
Obviously, the kernel command line uses device names from the perspective of the TiVo kernel, not from the perspective of your PC. Thus you will never see something like "root=/dev/hdcX" in the kernel command line.
To find your active kernel partition, run bootpage -b /dev/<DEVICE>:
# bootpage -b /dev/hdc
3
In this case, your kernel partition is accessible from the PC as /dev/hdc3, so if you wish to replace the kernel (say, with a killhdinitrd'ed kernel) you would do something like:
# dd if=kernel.img of=/dev/hdc3
Note that older versions of the x86 bootpage utility don't always give you the results you expect. If you have any doubts about what version you are running, download the one in this post to be safe.