Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!grebyn!escom!al From: al@escom.com (Al Donaldson) Newsgroups: comp.os.minix Subject: Re: Minix 1.5 --> up Message-ID: <594@escom.com> Date: 26 Sep 90 15:59:24 GMT References: <10936@life.ai.mit.edu> <3130@bruce.cs.monash.OZ.AU> Organization: ESCOM Corp., Oakton, VA Lines: 86 In article <3130@bruce.cs.monash.OZ.AU>, cechew@bruce.cs.monash.OZ.AU (Earl Chew) writes: > Perhaps it's time for another tutorial... Good job. What the tutorial shows is that hard disk booting is not *necessarily* all that complicated. My main criticism of the Shoelace package is its size -- as I remember, it is larger than FS. I found it hard to "get my head around" the package. Part of the problem was that I needed to make changes to the boot package to support a different file system layout, and Shoelace was so big that I couldn't figure out what needed to be changed. There is an alternative hard disk boot package for MINIX. Glen Overby mailed this package to the beta mailing list earlier this year. Unfortunately, I (and the other members of the beta group) didn't give Glen the positive feedback that his package deserved, so I don't think he ever posted it to comp.os.minix. Glen's package consists of two small programs (40K bytes of source) plus some manual procedures that can be put in tools/Makefile: 1. first stage loader. Glen used the mfdisk program by Motti Bazar to write a new boot sector (saving your existing partition table) on your first hard disk drive. When your machine boots, this code prompts for the number of the boot partition (1-4) and reads in the partition's boot sector. On my system I type "3=" to boot MINIX or "1" to boot DOS. The mfdisk program source is 18K bytes of heavily commented Microsoft assembly and a corresponding .COM file (so you don't have to build it under MASM). I consider it "ugly" that you need to run it under DOS, but you only run the mfdisk program once. (The first stage boot loader that it builds is independent of any operating system -- consider it firmware.) 2. second stage loader. Glen's program is designed to fit in the boot block of a hard disk partition or floppy disk. It looks for a file in the root partition named "boot" and executes that file. The loader source is about 22K bytes of well commented .ASM code and a uuencode'd binary. You only need to worry about assembling this code if you want to make changes to it. One of the changes I made was to make a bootable diskette loader. You can do this by changing a variable and re-assembling, or perhaps by patching the binary. It may sound silly to talk about going back to booting from diskettes, but I've made a bootable miniroot that fits easily on a 1.2 meg diskette and contains everything necessary to do a hard disk installation. 3. manual procedures. I've put these procedures in tools/Makefile so all I have to do when I change FS:MM:kernel is to "make hdboot". The first step you need to do is copy the loader binary to the boot block on your MINIX root file system: dd if=loader of=/dev/hd3 You need to create the file /boot on your root partition. To make life as simple as possible, Glen uses the tools/image file built when you "make image". He uses dd to strip off most of the diskette boot sector: dd if=image of=/boot bs=496 skip=1 That's pretty much it. Unless you need to reassemble the code for some reason, the binaries seem to work "right out of the box." I've run this on a 6 MHz AT, a Zenith TurboSport 386 portable, an AST Research 386, and various other machines. I don't like having to build this under MASM, but them's the breaks. A consultant I work with has converted the loader program to ASLD, but the .ORG bug (I posted this a month ago, but no one had a solution) prevents this from working properly. I'd like to encourage Glen to post his package. However, the last I talked to Glen, he mentioned that he was running Shoelace. :-) I think Glen's package is preferable, if for no other reason than simplicity. As some famous person once said, "Everything should be made as simple as possible, but not simpler." Al Donaldson PS - Please don't contact me for Glen's source. We've made changes to the code in order to support a different file system, and I have no idea if I still have Glen's original mailing.