Chain loading...

"Michael H. Warfield" <[email protected]>
Newsgroups gmane.linux.bbc.general
Message-ID <[email protected]>
Hello all,

	I have a moderately special application that seems ideal for the
LNX-BBC with some minor modifications and I wanted to run it past people
for some opinions.  This could be a useful feature for the BBC if I
can get it to work in general, rather than just a specialized application.

	The situation is with a couple of remotely managed systems.  I
would like to leave a CD in the CD-Rom drive and let the initial boot
take place from it but default to "chain loading" down to the hard drive.
If I'm connected into its "twin", I then want the ability to boot a
CD boot via the serial console (they have cross coupled serial console ports
with ttyS1 on each connected to ttyS0 on the other through a NULL modem
cable).

	This gives me a nice management configuration.  Under normal
operation, the machine can be rebooted and will boot the hard drive just
with the additional delay from the syslinux timeout.  Under adverse
conditions (diagnostics or forensics) someone can reboot the box with
a manager operating from it's console twin and get it into a totally
read only safe boot system to perform maintenance and/or recovery.  And
the blinken CD won't get lost 'cause it never leaves the bloody drive.

	Now...  I see that syslinux on the lnx-bbc is configured to
almost support serial consoles.  I say almost, because it's missing one
minor detail, a LABEL image that has the serial console as the last
console on the APPEND line so the kernel knows to default to that.  (I
learned that one the hard way with grub and lilo and the serial console).
That's easy to fix.  Just adding a "LABEL serial" to match "1" just with
the two console= options reversed, solves that.  It can use those other
images from a serial console, it's just that you loose the kernel messages
after "freeing kernel memory".  I haven't checked out the situation with
inittab in the singularity file yet, but that's a minor nit.

	The next problem is the chain loading itself.  Grub and Lilo both
support chainloading to another device.  You set the root device to the
target device and boot +1 or something similar to get it to boot the boot
sector off the root device.  Syslinux supports chainloading but the chain
target has to be a file on the syslinux file system (the floppy image).
So I would have to copy the master boot record from the hard drive to
the image and burn a custom CD for each harddrive.  Lilo has pointers to
the kernel image and Grub has points to its stage2 image in that boot
sector, so a universal file is impossible.  But a universal file that
immediately chainloaded AGAIN down to the target drive would do the job.  :-)

	For the drive specific case, it appears that I just have to dd the
master boot sector from the hard drive to a file "boot.bs" or "boot.bss"
(I think the former, anyone know the difference - the doco says something
about automatically inserting a DOS master sector for the .bss case)
and then point a "LABEL chainload" with "KERNEL boot.bs" and make it
default to work.

	Anyone got any thoughts on the best way to complete that last hop
where I could assemble a chainloader from the BBC without having to have
one custom to each hard drive?  I'm tempted to try switching to Grub on
the BBC (a message the middle of last year to this list indicated that
someone had done just that) but I'll hold that in reserve as a fallback
if I can't brow beat syslinux into this.

	(Another part of this project is to include some personality
information on those CD images, so, actually, having custom CDs for
these particular machines is not all that bad, in reality.)

	Regards,
	Mike
-- 
 Michael H. Warfield    |  (770) 985-6132   |  [email protected]
  /\/\|=mhw=|\/\/       |  (678) 463-0932   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

_______________________________________________
lnx-bbc mailing list
[email protected]
http://zork.net/mailman/listinfo/lnx-bbc
signature.asc (application/pgp-signature, 307 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iQCVAwUBPmjx0+HJS0bfHdRxAQHC0gQAk8idztYJ5l3IhYJuQuJPmqODhQnc6Mlt
jc1zj2ngDE9j+PKbWczdKjKAvbNCJl8YgcdN1LvbG11nU3BP+lv6dlzb+lhuSMLE
xWmT5CxbErANBASsL0xWGN79yVXaqynKNGCW5//RrrH7QJGVITUX6vcmTx4S45XI
W5kZgucDxg4=
=UUlT
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.