To boot first partition (Win98)

 

rootnoverify (hd0,0)

chainloader +1

boot

 

To boot Linux

 

root (hd0,4)

kernel /vmlinuz-2..4.20-9 ro root=LABEL=/ hdc=ide-scsi

initrd /initrd-2.4.20-9.img

 

Can use /vmlinuz as it’s a symlink.

 

Hide / unhide

 

unhide (hd0,0)

hide (hd0,2)

 

The Saturday saga after losing bootability

 

In the end I changed the partitions back in w98 and had a look at the

grub.conf. Once I had it was easy !!

 

[root@localhost grub]# cat /etc/grub.conf (see end for latest)

[root@localhost grub]#

 

If you look at the root, you'll see it is labelled. Quick research showed that there is a command to "label" disks with a string (parted). When it comes to mount time, Linux searches the disks for the label and mounts that. Bit like Veritas VM :-)

 

Anyway changed the partitions. From the Grub prompt (the menu of course had moved partition so the MBR details were now wrong) I managed to boot using the Grub.conf commands, although swap failed as if you look it is

a device path. Corrected that.

 

Looked through the man page for Grub and at the grub prompt used the "install" command to correct where it should look for the menu stuff. You can actually run grub from within Linux, but there is a warning in

the docs about it's limitations being an "emulated" program.

 

Now when it booted I didn't get the menu or Grub, just a flashing cursor top left, but while I was thinking about what to do, it started into Windows. Then I realised having "install"ed the correct values, the

grub.conf for splashimage etc needed changing.

 

Rebooted, and assumed that I was in the menu, just working blind.

 

Pressed "c", then typed in the 3 Grub lines (which luckily I had written

down).

 

Back into Linux, corrected grub.conf and all back to life.

 

If the root wasn't labeled, I could have used the device path, but I suspect I would have needed to know the mountpoint for the /boot and a parameter in the grub string to set it.

 

In the end I didn't need the "single" parameter.

 

At one point when Linux was up, I made a Grub boot floppy:

 

     # mke2fs /dev/fd0

     # mount -t ext2 /dev/fd0 /mnt

     # grub-install --root-directory=/mnt '(fd0)'

     # umount /mnt

 

After all this, had both Win98’s running and Linux.

 

Foolishly decided to then refresh the second Win98 partition from Ghost, but rather than booting the Ghost floppy, did what I had done before, namely run Ghost from the partition I was replacing without thinking of the consequences.

 

To allow it to run, it creates a new mini partition (see partition table at end of doc), and reboots (3 times according to the popup). It failed to reboot and then the system wouldn’t boot.  Managed to boot Linux then delete the partition using fdisk and mark the first Win98 partition as active/boot. Note: It was some time before I realised it was the new partition that was causing the problems.

Grub was also broken, probably due to partitions being renumbered with the additional partitions, and Win98 reporting that C: was an invalid type (Ghost had made its mini partition the active/bootable one).

 

Partition after Ghost boot from Win98.

Disk /dev/hda: 10.2 GB, 10240274432 bytes

255 heads, 63 sectors/track, 1244 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot    Start       End    Blocks   Id  System

/dev/hda1             1       575   4618656    b  Win95 FAT32

/dev/hda2           844      1244   3221032+   f  Win95 Ext'd (LBA)

/dev/hda3           576       843   2152678+  1b  Hidden Win95 FAT32

/dev/hda4   *        78        78      8032+   4  FAT16 <32M

/dev/hda5           844       856    104391   83  Linux

/dev/hda6           857      1163   2465946   83  Linux

/dev/hda7          1164      1244    650601   82  Linux swap

 

Partition table entries are not in disk order

 

Command (m for help):

 

 

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE:  You have a /boot partition.  This means that

#          all kernel and initrd paths are relative to /boot/, eg.

#          root (hd0,5)

#          kernel /vmlinuz-version ro root=/dev/hda7

#          initrd /initrd-version.img

#boot=/dev/hda

default=1

timeout=10

splashimage=(hd0,4)/grub/splash.xpm.gz

title Red Hat Linux (2.4.20-9)

      root (hd0,4)

      kernel /vmlinuz-2.4.20-9 ro root=LABEL=/ hdc=ide-scsi

      initrd /initrd-2.4.20-9.img

#title Red Hat Linux (2.4.20-8)

#     root (hd0,4)

#     kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi

#     initrd /initrd-2.4.20-8.img

title Win98 (Keep Clean)

      unhide (hd0,0)

      hide (hd0,2)

      rootnoverify (hd0,0)

      chainloader +1

title Win98 Try anything - Mesh etc

      hide (hd0,0)

      unhide (hd0,2)

      rootnoverify (hd0,2)

      chainloader +1