Author Topic: Reinstalling grub (SOLVED)  (Read 2465 times)

Offline agmcclard

  • Jr. Member
  • **
  • Posts: 10
Reinstalling grub (SOLVED)
« on: March 10, 2011, 04:19:53 PM »
I did a stupid thing and now unable to boot Pclinuxos.  I installed another linux distro to try out after repartitioning my hdd to give it a little space.  The other distro's grub overwrote Pclinux's grub (which I knew it would) and now I cannot boot into my Pclinux.  I tried to pull up the menu.1st file on the other distro but even as root it showed nothing there but I know it is present cause I can see it when I go to /boot/grub I just cannot modify it.  I have a sata hdd and a fully updated PClinuxos that I do not want to lose.  If I can, I would like to remove the other distro but I need to get grub reinstalled to Pclinux parition before I can remove it.  I am running the Pclinux cd to post this.  I was hoping to be able to do this via the live cd.

The other distro uses grub legacy also and I know how to chainload but at this point could care less.  Pclinux has been the only OS on this laptop and will remain so after I get this solved.  Not worth losing my Pclinux and I know I should have backed up (my bad).  Any help would be appreciated.

Thanks,
Angela
« Last Edit: March 10, 2011, 05:14:53 PM by agmcclard »

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Reinstalling grub
« Reply #1 on: March 10, 2011, 04:24:54 PM »
i am not sure but in this case you should be able to load the livecd and form it search in the kmenu a tool called redo mbr that should be on more applications/configuration/redo mbr

if you have your normal mbr with the pclinux menu(the blue bull adn all that stuff from your original grub) i don't know what to do there
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Reinstalling grub
« Reply #2 on: March 10, 2011, 04:28:24 PM »
Open a terminal and type in
grub

You get a grub prompt and then enter the following

find   /boot/grub/menu.lst


take note of the report you get.
Hopefully you will be able to determine from that which of the returned locations is the PCLOS one.

Then type the following

root   (hdx,y)    #  where the (hdx,y) is the PCLOS partition reported from the last command

setup  (hdx)      #  again where (hdx) is the boot drive


You should get back a report which ends with "Success"

Quit the Console.

Reboot and extract the live CD and hopefully you will boot into PCLOS.

regards.
« Last Edit: April 20, 2011, 12:58:24 PM by Just19 »

Offline agmcclard

  • Jr. Member
  • **
  • Posts: 10
Re: Reinstalling grub
« Reply #3 on: March 10, 2011, 05:10:18 PM »
Just 19,

Thanks so much that worked like a charm and I learned something new.   ;) You are my Hero!  What was I thinking!!!

Angela

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
[ SOLVED ] Reinstalling grub
« Reply #4 on: March 10, 2011, 05:58:34 PM »
Just 19,

Thanks so much that worked like a charm and I learned something new.   ;) You are my Hero!  What was I thinking!!!

Angela

You're welcome .......  glad it worked out for you.   ;)

Have fun!  ;D



regards.

Offline davey

  • Hero Member
  • *****
  • Posts: 919
Re: Reinstalling grub (SOLVED)
« Reply #5 on: March 12, 2011, 04:09:10 PM »
Saved my butt, too. Thanks. I tried installing PCLOS enlightenment and everything went blooey. Now to try and figure out what happened. Got Error 22, whatever that is, when Grub tried to work. Anyway, all is well again, minus E17.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Reinstalling grub (SOLVED)
« Reply #6 on: March 12, 2011, 05:08:58 PM »
In Konqueror location bar put

info:grub

Go to the Troubleshooting section that displays, and look at Stage 2 error codes to get an explanation of any Grub error you encounter.

Quote
22 : No such partition
      This error is returned if a partition is requested in the device
      part of a device- or full file name which isn't on the selected
      disk.



regards

Online Crow

  • Hero Member
  • *****
  • Posts: 8754
  • OBJECTS IN MIRROR... ARE LOSING
Re: Reinstalling grub (SOLVED)
« Reply #7 on: October 07, 2011, 01:27:15 PM »
Thank you Was_Just19 I messed my grub installing in another partition and didn't remember (from the last time  :-[ ) how to fix it.

The only thing: before using "find   /boot/grub/menu.lst" I had to use "su - root password"

Thank you again  :)
I shall pass this way but once;
any good therefore that I can do,
or any kindness that I can show
let me not defer nor neglect it,
for I shall not pass this way again.

Linux User #330412

Offline nkuruza

  • New Friend
  • *
  • Posts: 5
Re: Reinstalling grub (SOLVED)
« Reply #8 on: October 14, 2011, 03:26:05 AM »
Hi,
I have a similar problem as the owner of this post, I tried to follow you instructions but I get errors. the first one after executing 'grub' command is that when I type 'find /boot/grub/menu.lst' I get 'Error 15 : File not found'. And when I try to continue typing 'root (hd0,0)' I get 'Error 21:Selected disk does not exist'. And when I type 'setup (hd0)' I get 'Error 12: invalid device reequested' I am really confused right now I don't know what to do anymore.

Online Crow

  • Hero Member
  • *****
  • Posts: 8754
  • OBJECTS IN MIRROR... ARE LOSING
Re: Reinstalling grub (SOLVED)
« Reply #9 on: October 14, 2011, 05:30:08 AM »
That was happened to me, I used "su - root password"  before those instructions.

Good luck
I shall pass this way but once;
any good therefore that I can do,
or any kindness that I can show
let me not defer nor neglect it,
for I shall not pass this way again.

Linux User #330412

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: Reinstalling grub (SOLVED)
« Reply #10 on: October 14, 2011, 09:31:59 PM »
Hi nkuruza

If I read your post right you mispelled menu.lst

the .lst part is lowercase L not 1 (one)

Give that a try.

But, rereading your OP, i think an easier method would be;
From livecd,
menu>more applications>configuration>redo mbr

redo mbr should find your pclos install & give you options to boot it & the diostro that messed you up.
Hang in there.  ;D
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho