Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.