LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I destroyed by machine! Linux won't boot (https://www.linuxquestions.org/questions/linux-newbie-8/i-destroyed-by-machine-linux-wont-boot-246619/)

spicychicken 10-24-2004 03:48 AM

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.

ugge 10-24-2004 04:35 AM

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.

michaelk 10-24-2004 11:11 AM

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.

spicychicken 10-24-2004 12:06 PM

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

ugge 10-24-2004 01:55 PM

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

spicychicken 10-24-2004 03:33 PM

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.

spicychicken 10-24-2004 05:45 PM

Well, I have decided to start from scratch. So no worries.

Thanks for the help anyway!!

Spicy


All times are GMT -5. The time now is 01:05 PM.