Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Oct 2018 23:40:40 +0200
From:      Polytropon <freebsd@edvax.de>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   FreeBSD boot manager customization for single-disk multiboot (4 x DOS)
Message-ID:  <20181007234040.028639f8.freebsd@edvax.de>

next in thread | raw e-mail | index | archive | help
I'm crossposting to the freebsd-hackers@ list, hope that's okay.
Replies from that list please keep me CC'd as I'm not subscribed
to that list. Thanks in advance!

I have a strange and unique problem to solve and would like to
ask for pointers into the right direction (or at least pointers
into wrong directions _not_ to take).

My IBM Thinkpad 755C died. In fact, the very special PSU exploded.
It provided special voltages (10V=, 20V=) on a special plug (4-pin
semi-rectangular). Its special disk can't be placed into a comparable
laptop as it's not a regular 2.5" unit - it's a little bit taller
and therefore won't fit the usual (P)ATA 2.5" disk bays. There is
some special software on that disk that I need to use from time
to time, and there is no way to use a modern laptop (too fast,
missing required connectors and drives, as well as low-level
control over those resources). The software I have to use is
very special and cannot be replaced by anything else.

I can access (P)ATA laptop disks fine with FreeBSD and a USB
disk adapter, so reading disk content and copying it to somewhere
else is not a problem.

I plan to dedicate a Fujitsu-Siemens Litebook LFL-G (500 MHz AMD
CPU, 128 MB RAM) as a replacement. It will also obtain the functions
formerly provided by a Toshiba T-2130CT laptop whose disk drive,
power supply, battery, case etc. died. But the disk is still there.
The Litebook will get a hard disk of 10 GB (or less, if I still
have one) partitioned as follows:

1st slice: 100 MB MS-DOS 5.0 from the Toshiba T-2130CT

2nd slice: 500 MB MS-DOS 6.22 + NDOS from a different DOS system

3rd slice: 1000 MB "Windows '95" + NDOS hybrid that was on the
           IBM disk in the Thinkpad 755C

4th slice: remaining space: "Windows '98" as it came with that
           laptop (original CD and license key present)

The intended use of "slice" indicates that there will be 4 "DOS
primary partitions" on the disk. Staying with the "drive letters"
from DOS, every OS should see the partition it booted from as C:,
and it would be great if it didn't touch (or maybe even didn't
recognize) any of the other partitions.

I think I could even use a 500 MB disk and strip everything down
to 50 + 100 + 150 + 200 MB as per the layout shown above! That
would also be fully sufficient for the special purposes.

What I'm asking for _now_ is a convenient way to select which OS
to boot. I would not want to use today's GRUB because I don't plan
to use Linux on that particular system. In my opinion, the FreeBSD
boot manager will work nicely, but it will list all 4 systems with
the name "DOS". From what I learned by reading its source, this is
due to auto detection. I don't need that feature, I'd think about
altering the code in order to hard-code 4 names, like this:

	F1 DOS 5
	F2 DOS 6
	F3 Win 95
	F4 Win 98

	Default: F1

So if I needed to boot the system that formerly ran on the Thinkpad
755C, I'd press F3 and it would boot. Sure, I understand that there
is a good chance that I have to reconfigure drivers and such (as
it's a typical thing with "Windows"), but that won't be the big
problem.

I know everything has to fit 512 bytes (and the code of the boot
manager illustrates this requirement very nicely by how the text
for the possible boot options is stored and selected).

Questions:

Would you say this is a possible way to go? Or would you suggest
that I refresh my assembly knowledge and write something myself,
maybe using the existing FreeBSD boot manager as inspiration and
organ donor? ;-)

Or maybe there is something that can be installed and initially
configured from DOS?

Distant past... I know there _were_ multi-boot utilities decades
ago, but I cannot remember any names. There is no luxury required,
no GUI, no boot graphics - just a simple means to select the OS
that should be booted.

Oh, or maybe there is a long-forgotten functionality in the newer
"Windows" versions ('95 and '98 will be finally installed, but
none of then will ever see the Internet, of course), those also
once contained some kind of strange boot manager?

If everything fails, I could still try to use the FreeBSD boot
manager "as is", with the following result predicted:

	F1 DOS
	F2 DOS
	F3 DOS
	F4 DOS

	Default: F1

I'm not sure if it will recognize old-fashioned "Windows '95"
as "DOS" or "Windows"...



Thank you for any inspiration! :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181007234040.028639f8.freebsd>