LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 10-24-2004, 04:48 AM   #1
spicychicken
Member
 
Registered: Oct 2004
Distribution: Fedora FC2
Posts: 32

Rep: Reputation: 15
I destroyed by machine! Linux won't boot


Well I think my title is a little extreme, however, I was trying extend the space on my hard drive dedicated to linux and I think I may have accidentally deleted an important partition. Linux was running all fine and dandy, then I shut down and booted with a SystemRestoreCD and ran qtparted. I shrunk my XP partition down and then deleted a small 100 MB partition that didn't seem to be being used (wasn't the swap). Then formated the rest of the space for linux. When I tried to restart, the regular boot screen that lets me choose between windows and linux didn't come up and this text came up instead:

GNU GRUB version 0.94 (640K lower / 259536K 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> _

(note: when I type boot at this command prompt I get, "Error 8: Kernal must be loaded before booting")

I tried to run a reinstall with my fedora cd's (I'm running FC2) and it seemed like it was going to work and reinstall the grub settings, but then it said that no packages were installed so grub settings would not be changed.

The only other thing I can think of to do is to format the entire drive and restart from scratch, but I would really rather not.

Any help would be greatly appreciated.

Thanks...spicy

PS. I have a Knoppix disk and can boot from that.
 
Old 10-24-2004, 05:35 AM   #2
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
It seems that you have deleted the partition used to hold the boot information. This partition is usually mounted as /boot under linux. This partition is used by the boot loader, GRUB, to read the remaining part of the bootloader as well as the configuration.
Unfortunately I don't know how to recover from here. A starter would be to recreate the boot partition and then boot using a rescue cd. From there I would try to reinstall the GRUB loader using grub-install
Be carefull and read the man-page thoroughly before trying this so you don't destroy anything else. Your data should be completely intact provided that the partition shrinking went right.
 
Old 10-24-2004, 12:11 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,243

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
Deleting the unused partition has resulted in grub not looking in the correct partition. grub assigns 0, 1,2 ... on the partitions it finds if you deleted 1 then the linux partition is now 1 instead of 2.

Run your FC install CD and select rescue mode. Your root partition will be mounted in /mnt/sysimage. Change the /mnt/sysimage/etc/grub.conf file to the new root partition
root=/dev/hdax

fdisk -l /dev/hda (that is a small L, change hda to your actual drive)
Will display the how the drive is partitioned.

If you need additional help post your grub.conf file.
 
Old 10-24-2004, 01:06 PM   #4
spicychicken
Member
 
Registered: Oct 2004
Distribution: Fedora FC2
Posts: 32

Original Poster
Rep: Reputation: 15
First off, thanks for helping out!

michaelk,

I booted from rescue and was able to get to the command prompt. I then typed fdisk -l hda to get the partitions.
Then typed
pico /mnt/sysimage/etc/grub.conf
but all I got was an empty file.

Don't know where to go from here.....


ugge,

I tried to run grub-install hda3 to reinstall grub, however I got /sbin/grub: Not found

thanks,
spicy
 
Old 10-24-2004, 02:55 PM   #5
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Ok, forgot an important step when using your rescue cd.
To be able to use your original system you will have to use the command
Code:
chroot /mnt/sysimage/
This will teel linux that your new / (root) is that of folder /mnt/sysimage/
All further reference a relative to this folder.
Now you can reach grub, you might have to specify the full path of grub-install
Code:
/usr/sbin/grub-install
 
Old 10-24-2004, 04:33 PM   #6
spicychicken
Member
 
Registered: Oct 2004
Distribution: Fedora FC2
Posts: 32

Original Poster
Rep: Reputation: 15
ok,

I did the chroot thing and tried to run grub-install

when i run:

grub-install /dev/hda3

(hda3 is the partition that I deleted) I get that it installed correctly, however it doesn't reboot correctly I still get the origional screen with a grub prompt.
 
Old 10-24-2004, 06:45 PM   #7
spicychicken
Member
 
Registered: Oct 2004
Distribution: Fedora FC2
Posts: 32

Original Poster
Rep: Reputation: 15
Well, I have decided to start from scratch. So no worries.

Thanks for the help anyway!!

Spicy
 
  


Reply


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 dual boot a linux machine rwalkerphl Linux - Newbie 1 10-12-2004 11:35 PM
Master Boot Record Destroyed!!! untaka Linux - General 14 06-22-2004 03:18 PM
boot dos machine to linux shamz Linux - Networking 1 12-29-2003 04:11 PM
Want dual boot Linux on XP machine marshouser Linux - Newbie 2 08-13-2003 10:23 PM
destroyed boot disk dias_flac Linux - Hardware 3 07-19-2003 01:55 PM


All times are GMT -5. The time now is 12:09 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration