Booting issues.
Quoted 7 lines
I was hoping someone could explain how booting works on HPs in the following ways:
- booting from disk; is it possible to put our boot image onto an existing hpux disk, and boot from that image?
By "boot image" do you mean the bootstrap program or the kernel? I think we could load the (future) kernel from an HPUX disk via HP's ISL, but it would probably have to be in SOM format. Of course, I don't know for sure.
Over the weekend I got a simple bootstrap program up on a clean, non-HPUX disk. It doesn't do much:
It simply prints a message "HPPA/Linux bootstrap version 0.00" and then waits in a spin loop.
It is a small step in that I now understand the
boot process and can actually get the PDC to load and execute a bootstrap code. There is a small assembly stub which sets up a C-friendly runtime environment and then invokes a C subroutine to do I/O, etc.
I wrote a simple utility (like lifinit) which takes the bootstrap object, prepends a LIF header, and then places it on the boot sector.
The next step is to get the simple bootstrap to load a kernel image. Maybe someone can help me understand what to do next. Issues:
1. Should the bootloader be very simple and just load the kernel image from a known place on the disk, such as immediately following the bootstrap code (I believe the i386 version works this
way, correct me if I'm wrong) or should we instead load the kernel from a Linux filesystem. The later
is a bit of a pain as it means we must have a standalone version of a filesystem code in the bootloader (at least open, close, read, seek, stat). The Mklinux works this way -- the boot code is huge...it seems to me to be unnecessarily large and complex for a bootloader.
The first idea is much easier, since we just read from the already open boot device (opened by the PDC) from a fixed location and then branch to the kernel code.
Comments?
2. How are disks "partitioned" on HPs. The bootloader, if it uses the scheme of loading the kernel from a linux filesystem, will have to also "understand" the partition of the disk.
Does anyone know how the partitions are setup (i.e. partition table, or equivalent)? Is the partition scheme imposed by hardware or is this just a software convention?
Thanks for your help, jason.
----------------------------------------------------------------------
To unsubscribe: send e-mail to [email protected] with `unsubscribe' as the subject.
Quoted 8 lines · Jason Eckhardt
Quoted 4 lines
I was hoping someone could explain how booting works on HPs in the following ways:
- booting from disk; is it possible to put our boot image onto an existing hpux disk, and boot from that image?By "boot image" do you mean the bootstrap program or the kernel? I think we could load the (future) kernel from an HPUX disk via HP's ISL, but it would probably have to be in SOM format. Of course, I don't know for sure.
Well, I meant kernel, but that may not have ben what I should have been asking.
What's SOM?
Quoted 10 lines
Over the weekend I got a simple bootstrap program up on a clean, non-HPUX disk. It doesn't do much:
It simply prints a message "HPPA/Linux bootstrap version 0.00" and then waits in a spin loop.
It is a small step in that I now understand the
boot process and can actually get the PDC to load and execute a bootstrap code. There is a small assembly stub which sets up a C-friendly runtime environment and then invokes a C subroutine to do I/O, etc.
I wrote a simple utility (like lifinit) which takes the bootstrap object, prepends a LIF header, and then places it on the boot sector.
That's cool. You might also want to have a look at openbsd's mkboot utility; I know it prepares the LIF header, although the details are a little complex. I'll port it to Linux if you think it will help.
Quoted 12 lines
The next step is to get the simple bootstrap to load a kernel image. Maybe someone can help me understand what to do next. Issues:
1. Should the bootloader be very simple and just load the kernel image from a known place on the disk, such as immediately following the bootstrap code (I believe the i386 version works this
way, correct me if I'm wrong) or should we instead load the kernel from a Linux filesystem. The later
is a bit of a pain as it means we must have a standalone version of a filesystem code in the bootloader (at least open, close, read, seek, stat). The Mklinux works this way -- the boot code is huge...it seems to me to be unnecessarily large and complex for a bootloader.
Quoted 5 lines
The first idea is much easier, since we just read from the already open boot device (opened by the PDC) from a fixed location and then branch to the kernel code.
Comments?
I'd say start with the first, then worry about the second later. Having the boot loader be able to read ext2 would be cool, but large.
Quoted 6 lines
2. How are disks "partitioned" on HPs. The bootloader, if it uses the scheme of loading the kernel from a linux filesystem, will have to also "understand" the partition of the disk.
Does anyone know how the partitions are setup (i.e. partition table, or equivalent)? Is the partition scheme imposed by hardware or is this just a software convention?
I'd much prefer to use the partitioning scheme of HP-UX for Linux disks, particularly because this would let us install Linux on disks that already had HPUX on them. However, just using pc-partitioning might be a quick hack to make it work.
I imagine there's partition read code in either openbsd or mklinux.
- Alex
Signature · 9 lines
Alex deVries <[email protected]> Red Hat Contrib Net maintainer Ottawa, Canada HPPA/Linux Porting Team ---------------------------------------------------------------------- To unsubscribe: send e-mail to [email protected] with `unsubscribe' as the subject.
Quoted 6 lines
2. How are disks "partitioned" on HPs. The bootloader, if it uses the scheme of loading the kernel from a linux filesystem, will have to also "understand" the partition of the disk.
Does anyone know how the partitions are setup (i.e. partition table, or equivalent)? Is the partition scheme imposed by hardware or is this just a software convention?
Software convention. Pre 10.x, people used whole disks, after 10.x we have Logical Volume Manager which lets you put a set of disks into a Volume Group and create Logical Volumes using the space within that Volume Group. You then newfs the Logical Volumes..
/dev/vg01/lvol1/dev/vg01/rlvol1
...
A logical volume might span one disk, or multiple disks, or stripe across all the disks.. and you can extend the filesystems later, and they don't have to be contiguous. Pretty handy -- I've wished Linux had it as I hate PC partition schemes that aren't resizable..
I'm not sure how the root directory logical volume is handled -- I believe it has to be the first volume on the root volume group, and has to be contiguous.
Rich
----------------------------------------------------------------------
To unsubscribe: send e-mail to [email protected] with `unsubscribe' as the subject.
Quoted 7 lines
Software convention. Pre 10.x, people used whole disks, after 10.x we have Logical Volume Manager which lets you put a set of disks into a Volume Group and create Logical Volumes using the space within that Volume Group. You then newfs the Logical Volumes..
/dev/vg01/lvol1/dev/vg01/rlvol1
For older systems (read pre-LVM) fixed partitions (calls "sections") were used which were defined in /etc/disktab and hard-coded in the driver. With the LVM this has changed.
AFAIR only a small boot area (/stand) or for other configurations the root file system is required to be in hfs format and must be contiguous. There should be a pointer towards it somewhere in the LVM data structures. All other file systems can be VxFS.
Quoted 4 lines
A logical volume might span one disk, or multiple disks, or stripe across all the disks.. and you can extend the filesystems later, and they don't have to be contiguous. Pretty handy -- I've wished Linux had it as I hate PC partition schemes that aren't resizable..
It has. http://linux.msede.com/lvm (alpha code)
Quoted 3 lines
I'm not sure how the root directory logical volume is handled -- I believe it has to be the first volume on the root volume group, and has to be contiguous.
Yes.
Michael
--
Michael Marxmeier Marxmeier Software GmbH E-Mail: [email protected] Besenbruckstrasse 9 Voice : +49 202 2431440 42285 Wuppertal, Germany Fax : +49 202 2431420 http://www.msede.com/
----------------------------------------------------------------------
To unsubscribe: send e-mail to [email protected] with `unsubscribe' as the subject.
Quoted 7 lines · Jason Eckhardt
Quoted 5 lines
Quoted 4 lines
I was hoping someone could explain how booting works on HPs in the following ways:
- booting from disk; is it possible to put our boot image onto an existing hpux disk, and boot from that image?
Quoted 8 lines
Quoted 3 lines
By "boot image" do you mean the bootstrap program or the kernel? I think we could load the (future) kernel from an HPUX disk via HP's ISL, but it would probably have to be in SOM format. Of course, I don't know for sure.
Well, I meant kernel, but that may not have ben what I should have been asking.
What's SOM?
Spectrum Object Module. The format of PA-RISC executables. It dates from the early days, when the project to produce the "HP Precision Architecture" was known as the "SPectrum" project.
Quoted 12 lines
Quoted 12 lines
The next step is to get the simple bootstrap to load a kernel image. Maybe someone can help me understand what to do next. Issues:
1. Should the bootloader be very simple and just load the kernel image from a known place on the disk, such as immediately following the bootstrap code (I believe the i386 version works this
way, correct me if I'm wrong) or should we instead load the kernel from a Linux filesystem. The later
is a bit of a pain as it means we must have a standalone version of a filesystem code in the bootloader (at least open, close, read, seek, stat). The Mklinux works this way -- the boot code is huge...it seems to me to be unnecessarily large and complex for a bootloader.
Quoted 8 lines
Quoted 5 lines
The first idea is much easier, since we just read from the already open boot device (opened by the PDC) from a fixed location and then branch to the kernel code.
Comments?
I'd say start with the first, then worry about the second later. Having the boot loader be able to read ext2 would be cool, but large.
HPUX uses the second approach, and if there is a goal to allow Linux and HPUX to reside on the same physical mechanism, you'd need to duplicate that facility in the Linux secondary loader. One could then include both the HPUX and Linux secondary loaders in the LIF volume, and boot wither from the BootROM command line. We call that the BCH or Boot Console Handler.
-Bill
----------------------------------------------------------------------
To unsubscribe: send e-mail to [email protected] with `unsubscribe' as the subject.