Hello,

        I am working on the change in the GRUB partition syntax, to
correspond with the BSD-style slice nomenclature. I have only changed the
syntax, i.e.
(hd1,0) is entered as /dev/hd1s1, 
(hd0,2,a) is entered as /dev/hd0s2a,
(hd0,0) is entered as /dev/hd0s0.

But according to BSD style, the slice names are according to the order in
which the IDE drives are found, **including** CDROM drives. Which means
that

------------------------+-----------+---------------+----------------------
DISK NAME               | BSD style | Old GRUB-style|  New GRUB style
------------------------+-----------+---------------+----------------------
IDE 1: HDD,Pri. Master, |           |               |
part. 1                 |/dev/hd0s1 |    (hd0,0)    |      /dev/hd0s0
                        |           |               |(should be /dev/hd0s1)
part. 3, BSD 'a' slice  |/dev/hd0s3a|    (hd0,2,a)  |      /dev/hd0s2a
                        |           |               |(should be /dev/hd0s3a)
------------------------+-----------+---------------+----------------------
IDE 2: CDROM drive,     |/dev/hd1   | Not supported |       ????
Pri Slave               |           |               |(should be /dev/hd1)
------------------------+-----------+---------------+----------------------
IDE 3: HDD, Sec. Slave  |           |               |
part. 1                 |/dev/hd2s1 |    (hd1,0)    |      /dev/hd1s0
                        |           |               |(should be /dev/hd2s1)
part. 4                 |/dev/hd2s4 |    (hd1,3)    |      /dev/hd1s3
                        |           |               |(should be /dev/hd2s4)
------------------------+-----------+---------------+----------------------

All the 'should be' items are due to the fact that there is no checking
for CD-ROM drives connected as IDE drives. If we were to add that, then
the conversion to the BSD-slice syntax would be complete. The change in the 
partition names is very easy, we just have to add 1 to the 
current_partition, so I haven't included it as yet. But 'current_drive' is
problematic. Attached is the patch to the file 'disk_io.c' in the 'diff
-u' format.

Also now for DOS/Win95 partitions, you have to specify /dev/hd0s0, and not
0x80. All root partitions have to be given with a preceeding '/dev/'. All
kernels are specified with a kernel=/filename, without the preceeding
"/dev/....." argument, this simplifies the code to a great extent.

I have tested the patch on my small system: more testing is required.
NOTE: Sometimes I recieved a SIGSEGV after I tried to autocomplete the
kernel=/vm... line, but not always. Please check for glitches.

IDE 1: Pri. Master:
        /dev/hda1       : Win95
        /dev/hda2       : Minix-2.0.0
        /dev/hda3(a)    : FreeBSD 3.0

IDE 2: Pri. Slave: ATAPI CD-ROM drive.
        /dev/hdb

IDE 3: Sec. Master:
        /dev/hdc1       : GNU/Hurd
        /dev/hdc5       : RedHat Linux 5.2
        /dev/hdc6       : Debian Linux 2.1
        /dev/hdc8       : Linux Swap


Thanks,
--------------------
Ashutosh S. Rajekar

Reply via email to