Author Topic: grub repair  (Read 1508 times)

Offline johnbywr

  • New Friend
  • *
  • Posts: 2
grub repair
« on: February 16, 2012, 08:40:50 AM »
Hello everybody

I had a problem trying to load a new linux system that had ( unknown to me) grub2 as the means of booting. Unfortunately the install did not work correctly, and I was left with an unbootable drive.
Which I got to work again using a Win98 startup disk to get a 'C' drive, but no operating system. I then installed PcLinuxOS on the partition previously occupied by Win XP.
What I would like to know, is can I get grub to boot the Suse and previous PcLinuxOS, either from the MBR or from there own partitions?
Also in my browsing the forum, I noticed a comment that the installation of a new system, can be made to boot from that partition and not the MBR. Which I think in my case would be a good idea, but I do not know how.
I have looked at trying to sort it out myself, but to no avail. The Suse and PCLinuxOS will not boot from grub.
Any help would be most appreciated.

This is my menu 1st

cat /boot/grub/menu.lst
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=f34eeaf4-6199-4772-9bee-7f4d193e0700  quiet nokmsboot vmalloc=256M acpi=on resume=UUID=ee3419f4-34a5-4a22-98a1-0405af75a9c2 splash=silent vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=f34eeaf4-6199-4772-9bee-7f4d193e0700  quiet nokmsboot vmalloc=256M acpi=on resume=UUID=ee3419f4-34a5-4a22-98a1-0405af75a9c2
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=f34eeaf4-6199-4772-9bee-7f4d193e0700  quiet nokmsboot failsafe vmalloc=256M acpi=on
initrd (hd0,0)/boot/initrd.img

title openSUSE 11.4 (x86_64)
VERSION = 11.4
CODENAME = Celadon
root (hd0,6)
configfile /boot/grub/menu.lst

title PCLinuxOS (PCLinuxOS)
root (hd0,8)
configfile /boot/grub/menu.lst

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15310
  • ┌∩┐(◕_◕)┌∩┐
Re: grub repair
« Reply #1 on: February 16, 2012, 08:59:34 AM »
Could first try the Redo MBR tool located in

KMenu > More Applications > Configuration >
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline rekabe

  • Full Member
  • ***
  • Posts: 107
  • /Universe/SolarSystem/Earth/Jamaica
Re: grub repair
« Reply #2 on: February 19, 2012, 12:39:35 PM »
Hi menotu,

I am having a similar problem.

I cannot boot into my main desktop machine , I am getting a grub 1.5 error 15.

So I fetched my live cd to redo my MBR only to find that my menu.lst file is missing from my boot folder.

How do I recreate my menu.lst file so I can repair grub?






Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: grub repair
« Reply #3 on: February 19, 2012, 02:25:00 PM »
Hello everybody

I had a problem trying to load a new linux system that had ( unknown to me) grub2 as the means of booting. Unfortunately the install did not work correctly, and I was left with an unbootable drive.
Which I got to work again using a Win98 startup disk to get a 'C' drive, but no operating system. I then installed PcLinuxOS on the partition previously occupied by Win XP.
What I would like to know, is can I get grub to boot the Suse and previous PcLinuxOS, either from the MBR or from there own partitions?
Also in my browsing the forum, I noticed a comment that the installation of a new system, can be made to boot from that partition and not the MBR. Which I think in my case would be a good idea, but I do not know how.
I have looked at trying to sort it out myself, but to no avail. The Suse and PCLinuxOS will not boot from grub.
Any help would be most appreciated.

This is my menu 1st

cat /boot/grub/menu.lst
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=f34eeaf4-6199-4772-9bee-7f4d193e0700  quiet nokmsboot vmalloc=256M acpi=on resume=UUID=ee3419f4-34a5-4a22-98a1-0405af75a9c2 splash=silent vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=f34eeaf4-6199-4772-9bee-7f4d193e0700  quiet nokmsboot vmalloc=256M acpi=on resume=UUID=ee3419f4-34a5-4a22-98a1-0405af75a9c2
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=f34eeaf4-6199-4772-9bee-7f4d193e0700  quiet nokmsboot failsafe vmalloc=256M acpi=on
initrd (hd0,0)/boot/initrd.img

title openSUSE 11.4 (x86_64)
VERSION = 11.4
CODENAME = Celadon
root (hd0,6)
configfile /boot/grub/menu.lst

title PCLinuxOS (PCLinuxOS)
root (hd0,8)
configfile /boot/grub/menu.lst

From the new PCLinuxOS installation. open a terminal, su to root, then;

[root@localhost ~]# grub                            <Enter>


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

grub> find /boot/grub/stage2                                        <Enter>
(hd0,0)
(hd0,6)
(hd0,8)

grub> root (hd0,6)                       <Enter>
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0,6)                       <Enter>
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,6)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,6)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0,6) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.

grub> root (hd0,8)                 <Enter>
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0,8)                <Enter>
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,8)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,8)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0,8) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.

grub> quit                               <Enter>

[root@localhost ~]#

You now have grub installed to each of you other OS / partitions. Edit your boot stanzas for each, in the new PCLinuxOS /boot/grub/menu.lst to read;


title openSUSE 11.4 (x86_64)
root (hd0,6)
chainloader +1

title PCLinuxOS (PCLinuxOS)
root (hd0,8)
chainloader +1


Save the file. You should now be able to boot all three OS from your boot menu.

Reboot, and try each entry.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...