From owner-freebsd-mobile Mon Dec 4 15:45:35 2000 From owner-freebsd-mobile@FreeBSD.ORG Mon Dec 4 15:45:31 2000 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from sj-msg-core-2.cisco.com (sj-msg-core-2.cisco.com [171.69.43.88]) by hub.freebsd.org (Postfix) with ESMTP id 0FE3837B400; Mon, 4 Dec 2000 15:45:31 -0800 (PST) Received: from bmah-freebsd-0.cisco.com (bmah-freebsd-0.cisco.com [171.70.84.42]) by sj-msg-core-2.cisco.com (8.9.3/8.9.1) with ESMTP id PAA14694; Mon, 4 Dec 2000 15:45:31 -0800 (PST) Received: (from bmah@localhost) by bmah-freebsd-0.cisco.com (8.11.1/8.11.1) id eB4NjUi71152; Mon, 4 Dec 2000 15:45:30 -0800 (PST) (envelope-from bmah) Message-Id: <200012042345.eB4NjUi71152@bmah-freebsd-0.cisco.com> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Ken Key Cc: bmah@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Continuing ThinkPad saga In-Reply-To: <200012042134.NAA56830@sodium.cips.nokia.com> References: <200012042134.NAA56830@sodium.cips.nokia.com> Comments: In-reply-to Ken Key message dated "Mon, 04 Dec 2000 13:34:01 -0800." From: "Bruce A. Mah" Reply-To: bmah@freebsd.org X-Face: g~c`.{#4q0"(V*b#g[i~rXgm*w;:nMfz%_RZLma)UgGN&=j`5vXoU^@n5v4:OO)c["!w)nD/!!~e4Sj7LiT'6*wZ83454H""lb{CC%T37O!!'S$S&D}sem7I[A 2V%N&+ X-Image-Url: http://www.employees.org/~bmah/Images/bmah-cisco-small.gif X-Url: http://www.employees.org/~bmah/ Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_-1386759582P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Mon, 04 Dec 2000 15:45:30 -0800 Sender: bmah@cisco.com Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --==_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 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