Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Dec 2000 15:45:30 -0800
From:      "Bruce A. Mah" <bmah@freebsd.org>
To:        Ken Key <key@network-alchemy.com>
Cc:        bmah@freebsd.org, freebsd-mobile@freebsd.org
Subject:   Re: Continuing ThinkPad saga 
Message-ID:  <200012042345.eB4NjUi71152@bmah-freebsd-0.cisco.com>
In-Reply-To: <200012042134.NAA56830@sodium.cips.nokia.com> 
References:  <200012042134.NAA56830@sodium.cips.nokia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--==_Exmh_-1386759582P
Content-Type: text/plain; charset=us-ascii

Hi Ken--

Let me start off by saying that I succeeded in getting FreeBSD to work
off of a slice with an 0xA6 (OpenBSD) partition type, after mangling the
boot1 and boot2 parts of the boot loader.  So my T20 (BIOS 1.03) is now
successfully dual-booted between Win2K and FreeBSD 4.2-RELEASE.

If memory serves me right, Ken Key wrote:

> Yup, once I got rid of the 0xA5 partition, I could use PM or boot0 to
> boot the Win2K.
> 
> > So I'm real curious to see why two different machines with the same 
> > firmware behave differently.  Is there any chance of finding out what 
> > the partition table for your T20 with BIOS 1.03 is?
> 
> I've got a request for the fdisk output, but I believe it is simply:
> 
> ad0s1 FAT32/Win98
> ad0s2 FreeBSD

Hmmm...OK, thanks.  Hmmm.

> > In another thread, Peter Wemm suggested that maybe we could have our
> > boot1 handle other partition types in addition to our 0xA5.  In my
> > Copious Spare Time, I'm going to see if I can make up boot blocks that
> > do this (doesn't seem too hard to do, although I haven't figured out how
> > to get the boot blocks over to the ThinkPad yet).  Problem is...I'm need
> > to be doing Real Work (TM) for $VBRC today. :-p
> 
> I started down that path but gave up.  I decided that even if I did
> get it to work on a different partition number, trying to support this
> hack on all the FreeBSD laptops (20+) in my organization would kill my
> sysadmin staff during upgrades and installs by newbies who weren't
> aware of the issues.  I cancelled my order and ordered other laptops 
> instead.  

Yeah, nothing like having to support Real Users (TM).  :-)

In my case, my userbase is one (me).  Another T20 user at my company, by
contrast, reported that his T20 (Win2K install, shrunk to fit FreeBSD)
is working perfectly.  However I don't know his BIOS revision.  Go figure.

> If you do try to do this, note that 0xA5 is hardcoded in boot/i386/boot0/
> boot0.s, and boot2/boot1.s.  You'll also need to change DOSPTYP_386BSD
> in both /usr/include/sys/disklabel.h and (I think this is where I
> made my mistake) in i386/include/pc/msdos.h.  I never got it to work,
> but that was because I gave up after deciding the above.

You said you gave up, but I'm posting some notes here anyways...they
might be useful to someone else.  I think this falls into the category
of "gross hack" but at least I got my machine up and running (finally).

OK.  My goal was get a boot loader that can boot FreeBSD from a
partition to a different slice type (ideally, more than one of them).
For this, I didn't touch boot0.  It's unnecessary, as far as I can tell, 
as long as you remember that the names it gives to slices are 
solely determined by the partition type codes, and don't necessarily 
reflect the actual contents of the slice.  There's already precedence 
for this; Win2K on my system lives in an "Windows NT" partition.

boot1 is written entirely in i386 assembler (well on this platform
anyways).  I can understand enough of it to make it boot from another
partition type, but not enough to make it handle multiple partition
types.  (I could write it in 6502 assembler but that's not real useful.)
So I've got a boot1 hacked to boot off a slice with the OpenBSD
partition type.

For boot2, I added a definition of OpenBSD's disk type to <sys/
disklabel.h> and hacked boot2.c to handle multiple boot types (grep-ed
for DOSPTYP_386BSD).  There's two references to DOSPTYP_386BSD...one
deals with finding the compatability slice; we don't want to touch that
one.  The other one checks the slice type; I added a line to permit
booting from a slice with either an OpenBSD or FreeBSD partition type.

And that's all that needs to be changed, as far as I can tell.

Thanks,

Bruce.

PS.  I picked OpenBSD over NetBSD as the partition type to use on my
disk solely because I could remember OpenBSD's partition type code; no
favoritism implied here.




--==_Exmh_-1386759582P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: Exmh version 2.2 06/23/2000

iD8DBQE6LCya2MoxcVugUsMRArQ9AKCN2Tw8un/zFD/fyHA+vcVB+DpH0wCg+w/M
fjJ9fSeudeZ/HqS28Byrl6c=
=N9fd
-----END PGP SIGNATURE-----

--==_Exmh_-1386759582P--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




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