Brian Vagnoni on 29 Nov 2007 03:30:57 -0000 |
What to do: Remember that for grub (hd0,1) means hda (primary controller master), second partition. Now we need to tell grub where are the grub files: A sample menu.lst file is this: timeout=5 splashimage=(hd0,1)/boot/grub/splash.xpm.gz title Red Hat Linux (2.4.18-14) root (hd0,1) kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ hdc=ide-scsi initrd /boot/initrd-2.4.18-14.img title Red Hat Linux (2.4.18-openmosix3) root (hd0,1) kernel /boot/vmlinuz-2.4.18-openmosix3 ro root=/dev/hda2 hdc=ide-scsi initrd /boot/initrd-2.4.18-openmosix3.img title WindowsME rootnoverify (hd0,0) chainloader +1 or To repair it: Now you need to repair the ext3 filesystem because now it's
bigger than before and the journal file must be created again First, check the filesystem: fsck.ext3 /dev/hda2 Now, create again the journaling ext3 file: tune2fs -j /dev/hda2 Now mount the root filesystem on /mnt/sysimage and run grub cd /mnt/sysimage cd sbin grub Once started, GRUB will show the command line interface. First, set the GRUB's root device1 to the boot directory, like this: grub> root (hd0,1) If you are not sure which partition actually holds these files, use the command find, like this: grub> find /boot/grub/stage1 This will search for the file name /boot/grub/stage1 and show the devices which contain the file. Note added by: John Neuhaus If you are using a separate /boot partition, as the official documentation says: "... if you have the partition /boot and you install GRUB images into the directory /boot/grub, GRUB recognizes that the images lies under the directory /grub but not /boot/grub" Then if 'find /boot/grub/stage1' does not find the file, try 'find /grub/stage1' Once you've set the root device correctly, run the command setup: grub> setup (hd0) This command will install GRUB on the MBR in the first drive. and or to make a grub boot floppy When you need to reinstall GRUB you can boot with your distro CD and enter in rescue mode, but you can avoid this and reinstall GRUB faster by just making a GRUB boot floppy disk. You can create this disk right now and it will help you in the future, when problems knock your door. You will need to know where are the files stage1 and stage2,
in Red Hat they are on: /usr/share/grub/i386-redhat/ Once located, enter into the directory, put a floppy disk on
the drive (do not mount it) and type:
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|