LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-27-2009, 09:09 AM   #16
bcbotha
Member
 
Registered: Nov 2008
Location: South Africa
Distribution: Ubuntu, Windows
Posts: 149

Original Poster
Rep: Reputation: 16

thanks guys for all your hard thinking. i managed to get in. i booted up to the select screen chose the item i normally do, pressed 'e' selected root and pressed 'e' then deleted every thing that came after root and typed (hd0,1). and now it boots up fine.
thank you ronlau9 for sticking with me.
 
Old 03-27-2009, 01:23 PM   #17
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,206

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by bcbotha View Post
but then how do i get all my stuff off...can i or will i loose it all?
bcbotha:

You don't need to lose it all.

As I follow this thread it appears that only grub is misconfigured. There are many ways to approach the problem keeping your system safe and usable (as well as your data). But this needs a little reading on your part.

The most practical method at your current linux-familiarity is simply to reinstall Ubuntu on the same drive if no data is endangered; if there is, use the live cd to copy it into safer drivers before reinstalling the system (Note: format the drive again to avoid unnecessary issues later, this means, install ubuntu afresh).

Another way is to boot on live cd, mount your sda2 drive, then chroot into it. Being there you can reinstall grub. Having booted via live cd use the following syntax:

sudo -i <Enter password as required>
mkdir /mnt/mypart
mount /dev/sda2 /mnt/mypart
chroot /mnt/mypart
apt-get install grub {assuming you are online, wait until installed}
Then, if install succeeds, edify your MBR, syntax:
grub-install /dev/sda {do not put an integer after sda}
Finally, reboot:
Ctl+Alt+Del

Just try either of the above simple solutions.

Check back if anything goes wrong. We have a lot of good and wiser people here to help you if my suggestions do not work for you.

Hope this helps.
 
Old 03-27-2009, 01:33 PM   #18
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,206

Rep: Reputation: 229Reputation: 229Reputation: 229
Follow up.

Congratulations. Good that you solved it via Esc, Tab, e.

Reminder:

Editing grub via "e" + "b" does not change the entries on /boot/grub/menu.lst. This means you have to redo same editing each time you boot.

You have to go and edit grub's menu.lst.

And next time avoid using the word "setup (hd0,1)" grub does not understand it. Correct syntax is "root (hd0,1)" followed by "kernel" and "initrd" lines.

Goodluck and have fun using your Ubuntu. Check back as you may find other noobs needing same solution that you made which you may be able to share them your experience.

Welcome and have fun.
 
Old 03-28-2009, 01:10 AM   #19
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,225

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Actually
Code:
        root (hd0,0)
        kernel /xen.gz-2.6.18-128.1.1.el5
        module /vmlinuz-2.6.18-128.1.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
is for the content of (in my case)
/boot/grub/grub.conf

To recover a corrupt grub
1. boot off install media

2. try

Code:
chroot /mnt/sysimage
grub-install /dev/hda
exit
if (2) fails use
Code:
# grub
grub>root (hd0,0)
grub>setup (hd0)
grub>quit
Adjust (2) to use sda if needed. For (3) remember that grub counts disks and partitions from 0 and always uses hd notation (never sd) regardless.
 
  


Reply

Tags
grub, reinstall


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change from grub boot loader to lilo boot loader linuxjamil Linux - Software 1 05-27-2008 01:47 PM
How to change my Grub Loader to Lilo loader in REDHAT LINUX 9.0 skumar.v Linux - Newbie 3 04-04-2008 10:38 AM
GRUB loader tszhim Linux - General 4 02-09-2003 01:00 PM
Help! Grub Loader! djsktbrd Linux - Newbie 5 12-27-2002 01:34 AM


All times are GMT -5. The time now is 11:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration