Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2018 19:07:08 +1100
From:      Ian Smith <smithi@exemail.com.au>
To:        Polytropon <freebsd@edvax.de>
Cc:        questions@freebsd.org
Subject:   Re: FreeBSD boot manager customization for single-disk multiboot (4 x DOS)
Message-ID:  <BA22675F-89E3-4E2F-9E98-C230B63A3804@exemail.com.au>
In-Reply-To: <20181015115900.4142cede.freebsd@edvax.de>
References:  <50139023-EF23-4464-8E99-4958CB3A3044@exemail.com.au> <20181015115900.4142cede.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 15 October 2018 8:59:00 pm AEDT, Polytropon <freebsd@edvax=2Ede> wrote:
 > On Mon, 15 Oct 2018 19:28:55 +1100, Ian Smith wrote:
 > > I've read the thread=2E  Manish is trying to help but his DOS
 > > familiarity doesn=E2=80=99t go back far enough=2E  I started at 2 and
 > > used 3=2E3 (with Desqview), later 5=2E0 for years running Fidonet
 > > mailer, BBS, message editor, DOS command space and other tasks
 > > in 6 MiB RAM =2E=2E so had to learn how to really squeeze things
 > > in - as did you, I gather=2E=20
 >=20
 > Correct=2E Started with DOS 3=2E3 (and its "foreign predecessors"
 > called SCP and DCP which aren't known outside former GDR), then
 > DOS 5=2E0 and 6=2E22 (with NDOS as COMMAND=2ECOM replacement), and
 > I even used Novell DOS 7 for a short time (and its UNDELETE
 > program was really great)=2E Oh, and I also know and still _have_
 > Desqview/X (with package, books, and floppies)=2E
 >=20
 >=20
 >=20
 > > Correct, you cannot boot DOS from a non-primary partition=2E
 > > Maybe you could use GRUB, it installs after the MBR on track
 > > 0 side 0 so shouldn't get in the way=2E
 >=20
 > I think an older version of Grub might work - I don't assume
 > today's current version is up to the task on running on such
 > an old system=2E
 >=20
 >=20
 >=20
 > > I dont think you need to install linux to install GRUB?
 >=20
 > The smallest disk that I can use is 20 GB, so it would not
 > be a problem due to space limitation if I installed Linux=2E
 > For "logical space", it could even go into an extended
 > partition, for example like this
 >=20
 > 	Whole disk:				20,000 MB
 >=20
 > 	prim=2E part=2E 1 =3D DOS 5=2E0			    50 MB
 > 	prim=2E part=2E 2 =3D DOS 6=2E22		   500 MB
 > 	prim=2E part=2E 3 =3D data exchange (FAT)	 1,000 MB
 > 	ext=2E part =3D {
 > 		log=2E vol=2E 1 =3D Windows '95	 2,000 MB
 > 		log=2E vol=2E 2 =3D Windows '98	 2,000 MB
 > 		log=2E vol=2E 3 =3D Linux swap	 2,000 MB
 > 		log=2E vol=2E 4 =3D Linux ext2	12,000 MB
 > 	}
 >=20
 > Disk space is not a problem=2E The replacement system does not
 > accept disks bigger than 20 GB, so when I say "smallest disk",
 > this is actually the only (!) disk I can use=2E :-)
 >=20
 >=20
 >=20
 > > That said, I don't use it myself=2E  To add linux to the 4-DOS
 > > mix would need an extended partition, leaving only 3 primaries
 > > for 3 x DOS=2E  Same deal with OS/2, with its great boot manager=2E
 >=20
 > Oh yes, OS/2=2E=2E=2E it wrecked my DOS installation and "shifted"
 > the partitions (3 became 2, 2 became 1, 1 disappeared) when
 > I tried to install it into partition 4=2E Luckily, with the
 > great Norton Disk Editor (run from DOS emergency floppy),
 > a handheld calculator, and pen & paper I could reconstruct
 > the partition table manually and "get my data back" (as it
 > was not overwritten, just not assigned to a partition anymore)=2E
 >=20
 >=20
 >=20
 > > boot0=2Es MBR code is VERY tight with about ZERO free space as
 > > I  recall =2E=2E however there's code there - still was at 9=2Ex I
 > > think - for a 1=C4=B6 (2 sector) version written by the same author
 > > (Robert Nordier IIRC, I don't have a system to hand)=2E  That
 > > should have plenty of room for more lavish labels, and may
 > > in fact include such code?  If you have a spare system you
 > > could assemble that and test=2E
 >=20
 > I haven't done assembly programming for many years=2E I can
 > generally understand how the boot manager works, but I don't
 > think I'm skilled enough for modifying it (and still get a
 > working version that can do what I expect)=2E The detection
 > and labeling magic is quite powerful in there=2E :-)
 >=20
 >=20
 >=20
 > > Of course you'll have a backup MBR (directed more at other readers
 > :)
 >=20
 > Luckily, that is an easy task with dd=2E In DOS, C, you'd use
 > the famous biosdisk() (prototype in dos=2Eh!) to get the 512
 > bytes from the disk and store it to a file=2E
 >=20
 > That reminds me to one of my first exercises in lower-level
 > C programming: Wrote a program that would modify the MBR to
 > change the start address of the 1st active primary partition
 > to the MBR itself, so the system would "boot into a loop"=2E
 > Yes, we did actually consider this both funny and educational
 > at that time=2E=2E=2E :-)
 >=20
 >=20
 >=20
 > > One thing to watch is that esp=2E  earlier versions of DOS may
 > > want to use the first slice explicitly?  I'm not sure, but I'd
 > > start with earliest versions first, and test each as you go=2E=20
 >=20
 > Yes, I think DOS 3=2E3 and before specifically needed that=2E
 > I'll check how DOS 5=2E0 will react=2E From older experience,
 > I seem to remember that DOS 6=2E22 could be booted from a
 > primary partition 2, 3, or 4, and depending on the content
 > of the ramining partitions, "drive letters" would then be
 > re-arranged (as the boot disk would always be C: as assigned
 > by a boot manager)=2E
 >=20
 >=20
 >=20
 > Interestingly, I found out that I could _maybe_ fix the
 > power supply of the IBM Thinkpad 755C=2E Documentation says
 > that it needs 20 V DC (so no 10 V DC as written on the label
 > of the exploded power supply)=2E I think I still have a PSU
 > "brick" that provides 20 V DC, and making a new cable from
 > the remains of the old PSU is not a problem=2E
 >=20
 > 	      /-------\
 > 	+ --- | o   o | --- Signal
 > 	- --- | o   o | --- Ground
 > 	      +-------+
 >=20
 > Documentation suggests that "+" and "-" are the ones that
 > should be used, and _not_ connected to "S" and "G" in any
 > way=2E In case you are curious, this is the relevant documentation
 > that gave me hope to revive the TP 755C that has served me
 > so well for decades:
 >=20
 > http://www=2Ethinkwiki=2Eorg/wiki/Power_Connector#4-Pin_hexagon
 >=20
 > https://www=2Epowerstream=2Ecom/lta-IBM=2Ehtm
 >=20
 > It looks like this one:
 >=20
 > http://www=2Ethinkwiki=2Eorg/w/images/9/9f/ThinkPad755CD=2Ejpg
 >=20
 > But instead of the optical unit, mine has the floppy disk
 > unit installed=2E And as I said, having access to old-fashioned
 > things like parallel ports, serial ports, or floppy drives
 > sadly is _not_ optional in this special case=2E :-)

I'd have replied interspersed in my usual manner, but it's just too tediou=
s on this little phone; please excuse=2E  At least K9 can bottom-post =2E=
=2E trim at will =2E=2E

As mentioned, I have no access to a system currently - except I remembered=
 having ssh access to an ancient but still working 5=2E5-stable (cough) wit=
h src, so I reviewed (from /usr/src):

=2E/usr=2Esbin/boot0cfg/boot0cfg=2Ec

=2E/sys/boot/i386/boot0/boot0=2ES
=2E/sys/boot/i386/boot0/boot0ext=2ES
=2E/sys/boot/i386/boot0/Makefile

You'll note that adding longer labels for more OS types is the significant=
 difference between the two and that boot0cfg(8) -b option can choose betwe=
en (eg) boot0, boot0sio and, while not mentioned explicitly, boot0ext if ac=
cessible=2E=20

Check out the boot0ext code=2E  On 5=2E5 it's not assembled, or at least n=
ot copied into /boot=2E  Not sure if this is still in 10=2Ex and up=2E

Some here and certainly many on hackers@ could advise on having it also bu=
ilt to /boot (or anywhere) for boot0cfg access=2E  I assume you could dd it=
 from a memstick into place, that is if the machine can boot from USB memst=
ick?  Or floppy!?

Now, even then you won't get distinctions like between DOS or windows vers=
ions, have a look at the table in boot0ext=2E  It looks easy enough to chan=
ge the strings if adjusting relative offsets=2E

boot0 doesn't even distinguish between DOS and windows, not at FreeBSD 8=
=2E2 anyway; I have a win98 on one, labeled as DOS (only for BIOS updates i=
n the past)=2E

Are you sure w95 and w98 can boot from an extended partition? XP can - it'=
s an NT or OS/2 filesystem -  but w95/98 is 'DOS 7' so I'd test that assump=
tion unless you're sure=2E

US$67=2E50 is a lot for an external P/S brick=2E  I bought 2 broken thinkp=
ad T23s for AU$60 (~US$45) posted, off ebay years ago, with 2 working 65W P=
/S, 1 good screen, 2 good 60G disks, 2 good keyboards (albeit one GB/UK) an=
d importantly for T23s, 2 working CPU fans :)

I bet you'd find a 755C, broken or not, for 50DM or less with a working P/=
S and maybe other useful spares?

Otherwise you have the plug, so wiring up another P/S brick should be ok w=
ith care=2E  Looks like going for 50W or more would be safest=2E=20

 "it's the options that drive ya crazy"

cheers, Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BA22675F-89E3-4E2F-9E98-C230B63A3804>