Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde!uunet!munnari.oz.au!bruce!cechew From: cechew@bruce.OZ (Earl Chew) Newsgroups: comp.os.minix Subject: Re: How to use a hard disk with Minix Message-ID: <1737@bruce.OZ> Date: 5 Dec 89 23:17:15 GMT References: <89337.181547TAR@MAINE.BITNET> Organization: Monash Uni. Computer Science, Australia Lines: 180 From article <89337.181547TAR@MAINE.BITNET>, by TAR@MAINE.BITNET (Thom Rounds): >In article <1727@bruce.OZ>, Earl Chew says: >> >>From article <89334.224050TAR@MAINE.BITNET>, by TAR@MAINE.BITNET (Thom >>Rounds): >>> You don't NEED shoelace to do that. Any fdisk (Minix or MS-DOS) will w >>allo >>> you to select the active partition. The point is, you would have a very >>funny >>> setup if you booted off the hard disk. Minix needs to load the ramdisk, and >>> having THAT on hdisk would just mean duplicate roots. Plus, the bootblock is >>> NOT compatible with Minix data (i.e., it MUST be on a seperate disk). Having >>> a teeny-tiny partition on your hdisk for the bootblok is rather silly, don't >>> you think? >> >>No, you're missing the my point. Booting off the hard disk is *not* a funny >>setup. Requiring a floppy to boot off the hard disk *is* a funny setup. Just >>count how many commercial machines require you to put a floppy in to boot off >>the hard disk! >> > MINIX IS NOT a commercial grade operating system!! That is a very lame >argument, not to mention a cop-out. I think that you're still missing the point. From your original article, your points are: 1. Any fdisk will allow you to select the active partition. This is true. What some people want is to have say two partitions (or more) one of which contains a Dos system + Dos file system and another containing a Minix system + Minix file system. Clearly, the file systems are incompatible. Sometimes the user might want to boot Dos and at other times Minix. Minix does not pay any attention to the *active*ness of a partition, so this attribute is not relevant. Dos may want to know about it. 2. Booting off the hard disk only occurs if you have a funny setup. What can I say? If you think so, then we'll just have to disagree. 2a. MINIX IS NOT a commercial grade operating system!! That is a very lame argument, not to mention a cop-out. I fail to see how this can make the argument *for* booting off the hard disk lame, or in what way it is a cop out. I would have thought that it would have been a cop out to leave things the way they are (ie be passive and do nothing). How can it be a cop out to enhance the system? Whether or not Minix is a commercial grade system or not is not relevant. The question is whether you want to boot off the hard disk or not. 3. Minix needs to load the ram disk and having that on hdisk would just mean duplicate roots. This is true. But having the ram disk image means that your duplicate root is on floppy instead of the hdisk. Furthermore, there are some sites, which have their roots on the hard disk itself so the argument about duplicate roots disappears. (This will be easily accomplished with 1.5.0.) Having a ram disk image requires you to put it somewhere. Putting it on hard disk seems just a good a place as floppy. Some people actually prefer it there since it loads much faster. 4. Plus, the bootblock is NOT compatible with Minix data (i.e., it MUST be on a seperate disk). I think that you're talking about the image obtained by running build, rather than bootblock.s itself. Yes, the boot floppy does not contain a valid file system. Yes, this does mean that it has to be separate. This is the reason it should be discarded. Having non-file systems makes it harder to work out exactly what is one that floppy. Is it a boot floppy? Did I accidentally corrupt it? Did I format it? Perhaps it's a Dos floppy? 5. A teeny-tiny partition on your hdisk for the bootblok is rather silly. I agree. (I think that you mean the image obtained from running build, rather than bootblock.s itself.) >>in the partition table. It has little to do with booting Minix off the hard >>disk. >> > It has everything to do with it. You can't put the bootblock with the root >directory. They are incompatible. The *active*ness of a partition has little to do with booting Minix off the hard disk. The boot floppy image not being a valid Minix file system does have a lot to do with it. > Why not keep it on floppy? The floppy is something you can replace with >something else! Putting root on the hdisk means less space for other stuff, and >that IS very, very ridiculous. 1. Slow 2. Not a file system 3. Slightly harder to maintain 4. Have to fish around for the floppy before I can boot my hard disk. 5. Minix kernel image size about 90kb out of, say, 20Mb hard disk, about 0.5%. > You lost me. Please re-iterate. All Minix file systems look like this: Block 0 1 2-x x-y +-------+-------+------+-----------+ | Boot | Super | Maps | Data Area | | Block | Block | | | +-------+-------+------+-----------+ Let's for the moment assume that this is a floppy disk. Your BIOS will, at boot time, load the code from sector 1, head 0, track 0 into memory and execute it. Your boot floppy looks like this (which you obtained by using build then cp image /dev/fd0): Sector 0 1-x +--------+--------+ | Boot | Kernel | | Sector | Image | +--------+--------+ When this is bootstrapped, the code in sector 0, bootblock.s, loads the kernel image. Returning to the file system, bootlace resides in block 0. When you boot your file system, bootlace will be loaded by the BIOS. Bootlace will load the secondary bootstrap, shoelace, which lives in the file /shoelace in the Data Area. Shoelace will then complete the bootstrap by looking for the kernel image (ie the output from the program build which, in the past, you had copied onto /dev/fd0 but now retain in a file in the Data Area). There is also provision for you to leave out the build phase when compiling your kernel. Just leave the a.out files from the link phase of cc. Shoelace can assemble your kernel from these a.out files `on the fly'. >>WiniBoot resides in the partition table sector (cylinder 0, head 0, sector 1) >>and will prompt you for the partition that you wish to boot. In this way you >>can boot dos or Minix on separate partitions. Partitioned hard disks look like this: +-----------+------+------+------+------+ | Partition | Part | Part | Part | Part | | Boot Code | 1 | 2 | 3 | 4 | +-----------+------+------+------+------+ Each partition is a self-contained logical disk and so may contain a Minix file system as described above. When the BIOS boots the hard disk, it reads the boot code from sector 1, head 0, cylinder 0 and executes it. Usually this is boot code that was inserted by Dos. It scans the partition table to find a suitable Dos partition and boots it. Winiboot is designed to replace this code. Instead of scanning the partition table, it allows you to choose which partition you wish to boot. The partition table itself is unmolested. Both the Dos boot and winiboot then load the code from logical sector 0 of the partition and execute the code. In this way you don't need a boot floppy. The Minix kernel image can live as normal a.out files located anywhere within the file system. This makes it easy to keep backups, inspect images, boot trial systems, etc, since the kernel now lives as normal files. This code will be posted soon. It is currently undergoing some changes to support environment strings. Arguing about whether Minix can or can't be bootstrapped off a hard disk is irrelevant at this stage. At least three sites are bootstrap Minix that way now and there appears to be a fair number of people who would like to. If you prefer to boot Minix using a boot floppy, the option to do so is still open to you. As for Minix living in one partition and Dos in another --- that's the way my system is set up. Press `1' for Dos, `2' for Minix. Earl -- Earl Chew, Dept of Computer Science, Monash University, Australia 3168 ARPA: cechew%bruce.cs.monash.oz.au@uunet.uu.net ACS : cechew@bruce.oz ----------------------------------------------------------------------