I have solved my original problem, and have new ones. I apologize for the length, but as far as I can tell from searching I have gotten further than anyone has published before, so I assume that this will be interesting. I DO have a system with 2 Linux and 7 Windows 2000 systems bootable. They are not QUITE independent though, and I need help breaking them apart. Please read on and send any wild ideas you have!

First a correction: My partition layout should have been:

Partition layout:
  (hd0,0) 128MB FAT32 for Grub
  (hd0,1) 12GB FAT32 for Win2K
  (hd0,2) 12GB FAT32 for Win2K
  (hd0,3) ... Partitions for Linux

I discovered on www.geocities.com/thestarman3 and Microsoft NT Workstation Resource Kit Chapter 17 "Disk and File System Basics" that the 32 bit word starting at offset 0x1C of the partition boot record (LSB first) contains the number of "Hidden Sectors" before the filesystem holding ntldr, boot.ini, and ntdetect.com. Starman notes this in two places, in one he seems to be saying it is relative to the physical drive, in another the enclosed volume. For a Primary partition this would be the same, but for a logical partition the "Enclosing Volume" is an extended partition, and this number would always be 63 sectors. It appears to be relative to the physical volume, so it is unique and increasing for every partition. To be clear, for a logical partition it is relative to the physical drive, NOT the enclosing extended partition.

I solved my problem by setting this word to 63 in every Win2K partition, and putting a copy of boot.ini, ntldr, and ntdetect.com on my boot partition ( Grub (hd0,0), Linux hda1, etc.). I changed this word in (hd0,1) which is my master working partition with the following Linux command (booted gentoo live):

echo baaa | tr 'ab' '\0\077 | dd of=/dev/hda2 bs=1 seek=28 count=4

I made a bunch of logical partitions for Win2K and DD'ed the working image in ( Grub: (hd0,2) ) on to each of them. The logical partitions had to be made 1 cylinder bigger that the original primary since logical partitions are a nesting of extended's, each with a pseudo-primary (if you will) inside resulting in loss of a track. Specifically, my (hd0,1) is 1567 cylinders, my logicals or extended's or whatever are 1568. I added sections to menu.lst for each of them. They all boot fine (two primaries and a bunch of logicals).

It then occurred to me that as long as I had to have the NT boot loader stuff in (hd0,0) that there was no sense in using grub to boot them. So I ripped the entries out of menu.lst and added entries in boot.ini. They still boot fine. The resulting menu.lst and boot.ini are below.

Note that these still depend on (hd0,1)'s partition boot record, which is dumb. I believe (but have not tried) that I could simply chainload from a file in (hd0,1) created by dd'ing the Win2K partition boot record to a file in (hd0,1), and not have any booting dependence on (hd0,1).

SO MUCH FOR THE HAPPY PART! I have two Linux and 7 Win2K systems bootable on one system.

BUT:

Win2K ignores "hiddenness". Further, no matter which Win2K system I boot, it puts its paging file on the earliest Primary partition, calling it "C:".

I can move the paging file to the boot partition (e, f, g, etc.), but:

[1] I cannot remove the drive letter from the first primary (C:) because it says it is using it. For what, I don't know. This bothers me, since this is NOT the system I want to run! [2] I cannot rename the boot partition from E, F, etc. to "C:" or anything else - it cannot be changed from its place in the long ennumeration of ALL partitions.

I also cannot eliminate the paging file. What Windows needs a paging file for with 512MB of memory I don't know.

www.boot-us.com has a boot loader that hides partitions from Win2K by changing the partition type "and other partition boot record changes", but I have already been through a large pile of boot managers... I want something sane and understandable, not "magic, and I like grub (Except for the poorly-defined "install" command :-) ).

I suppose that I could break down and dedicate the first Primary 2K partition to just being the residual slave of whatever one I boot, but I don't like things I don't understand, and I don't understand what the other 6 systems are doing with this partition. Further the idea was to make independent systems, immune from one child goofing up another's system (or mine - unfortunately I have stuff I have to run on an MS system).

If only the grub "parttype" command worked in menu.lst perhaps I could fiddle the partition types to hide and unhide at boot time. But it doesn't, and boot-us suggests that other fiddling to the partition boot record is needed.

I don't know anything about Grub2, but it might be nice to have:

[1]   Partition hiding that works with Win2K/XP partitions
[2] UNIX dd to copy stuff around with if, of, skip, seek, count, and bs. I spend alot of time booting a Linux CD just so I can DD something. Source to be the grub root file system or a device, destination to be at least a device, grub root FS would be gravy but I realize much much more comples (to write). One option would be to be able to write, but only to an existing file, up to its existing size. Or even one block (for an mbr or parition boot record). This would give a building block for elaborate schemes to get around MS. Of course a mini-Linux system under Grub would be nice too, oh, and be sure it runs KDE! ;-).

Any and all comments, thoughts, or suggestions are eagerly welcomed. I seem to be at an impass.

--Ray

------
My menu.lst:

default 1
timeout 10

title Win2K Systems
# password --md5 $1$4zCJO1$NIEcy2xPROh5DlxtHtBR90
hide (hd0,0)
hide (hd0,1)
hide (hd0,2)
root (hd0,0)
chainloader (hd0,1)+1
makeactive
pause Ready to boot!  Press any key to proceed...
boot

# Experimental Linux on hda5 (hd0,4)
# Assumes:
#    Second logical partition (hda6 or (hd0,5) is swap
#
title Experimental Linux on hda5 (hd0,4)
password --md5 $1$4zCJO1$NIEcy2xPROh5DlxtHtBR90
root   (hd0,4)
pause Ready to boot!  Press any key to proceed...
kernel (hd0,4)/vmlinuz root=/dev/hda5
boot

# Experimental Linux on hda7 (hd0,6)
# Assumes:
#    Second logical partition (hda6 or (hd0,5) is swap
#
title Experimental Linux on hda7 (hd0,6)
password --md5 $1$4zCJO1$NIEcy2xPROh5DlxtHtBR90
root   (hd0,6)
pause Ready to boot!  Press any key to proceed...
kernel (hd0,6)/vmlinuz root=/dev/hda7
boot

My boot.ini:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINNT="MS Win2K Pro MS-ARCPart 2 / (hda2) Dad-2" /fastdetect multi(0)disk(0)rdisk(0)partition(3)\WINNT="MS Win2K Pro MS-ARCPart 3 / (hda3) Dad-3" /fastdetect multi(0)disk(0)rdisk(0)partition(7)\WINNT="MS Win2K Pro MS-ARCPart 7 / (hda8) Child1" /fastdetect multi(0)disk(0)rdisk(0)partition(8)\WINNT="MS Win2K Pro MS-ARCPart 8 / (hda9) Child2" /fastdetect multi(0)disk(0)rdisk(0)partition(9)\WINNT="MS Win2K Pro MS-ARCPart 9 / (hda10) Child3" /fastdetect multi(0)disk(0)rdisk(0)partition(10)\WINNT="MS Win2K Pro MS-ARCPart 10 / (hda10) Child4" /fastdetect multi(0)disk(0)rdisk(0)partition(11)\WINNT="MS Win2K Pro MS-ARCPart 11 / (hda11) Chile5" /fastdetect



_______________________________________________
Bug-grub mailing list
Bug-grub@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-grub




_______________________________________________
Bug-grub mailing list
Bug-grub@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to