OKUJI Yoshinori writes:
> I'm planning to prepare binary images when releasing 0.5.92.
Good, I will be happy to be a test vehicle for grub 0.5.92.
> I don't know what "hide a partition" means exactly. Is there any
> document or any sample source code?
Here is the output of fdisk listing all of the partition
types,
22 root ~ # fdisk
Using /dev/hda as default device!
Command (m for help): l
0 Empty c Win95 FAT32 (LB 64 Novell Netware a6 OpenBSD
1 DOS 12-bit FAT e Win95 FAT16 (LB 65 Novell Netware a7 NEXTSTEP
2 XENIX root f Win95 Extended 75 PC/IX b7 BSDI fs
3 XENIX usr 11 Hidden DOS FAT1 80 Old MINIX b8 BSDI swap
4 DOS 16-bit <32M 14 Hidden DOS FAT1 81 Linux/MINIX c7 Syrinx
5 Extended 16 Hidden DOS FAT1 82 Linux swap db CP/M
6 DOS 16-bit >=32 17 Hidden OS/2 HPF 83 Linux native e1 DOS access
7 OS/2 HPFS 40 Venix 80286 85 Linux extended e3 DOS R/O
8 AIX 41 PPC PReP Boot 93 Amoeba eb BeOS fs
9 AIX bootable 51 Novell? 94 Amoeba BBT f2 DOS secondary
a OS/2 Boot Manag 52 Microport a5 BSD/386 ff BBT
b Win95 FAT32 63 GNU HURD
as you can see, types 11, 14, 16, and 17 are used to hide types 1
(DOS Fat12), 4 (DOS Fat16<), 6 (DOS Fat16>), and 7 (OS/2 HPFS),
respectively. Note that type 7 is also used by M$ for NTFS
partitions under WinNT.
Currently Win95/98 does not recognize NTFS, and WinNT does not
recognize Fat32, however, this will all change when Win2000 of
various flavors is released, thus probably necessitating hiding of
these partitons too.
So, I think a good starting point for grub would be to add the
following logic to the makeactive command,
1. Unhide the partition that is being made active if it is a
hidden M$ partition type, in addition to setting this partitions's
active flag.
2. Hide all remaining primary partitions on the root drive
that are of types M$ that can be hidden, in addition to resetting
the active flag on every primary partition other than the active
one.
3. The list of M$ partition types that can be hidden is 1, 4,
6, and 7, however, types b, c and e should probably be included
on this list too.
In addition, in order to handle all cases of hiding/unhiding
where the simple scheme presented above is not sufficient, grub
should have some commands to manually hide/unhide a partition, eg,
unhide (hd0,2)
hide (hd0,1)
as well a command to pretty print the partiton table just prior to
booting, eg,
table
boot
will print a nicely formatted screen showing each partition, its
fs type if known, active status, hidden status, size, start and
end sectors, etc.
For installations with many hard drives, the table command
could take an option to print only the partitions on the specified
drives, eg,
table hd0 hd1
> You made a mistake. Commercial software is not evil at all (i.e. gcl
> is commercial, but it is still free software). The reason why I think
> Parition Magic and Power Boot are evil is that they are "proprietary
> software". Do NOT mix up commercial software with proprietary
> software!
Thanks for pointing this out to me. In my mind I had
(mistakenly) equated commercial with proprietary.
HTH,
--
Jeff Sheinberg <[EMAIL PROTECTED]>