Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Accidentally deleted GRUB

    I suppose since this is about GRUB and booting and stuff it would go under installation.

    I kinda feel like the biggest noob in the universe for doing this, but I was trying to resize my windows XP partition to be smaller then add that space to linux (Fedora Core 4) through partitionmagic. The actual linux partition came up as type 8e, which I googled and found to be lvm. There was another ext3 partition that I thought I just created and realized I didn't know how to add to lvm, so I deleted it. Turned out that was the partition that had GRUB on it (oops), because now GRUB doesn't work. Which, obviously, causes problems. Is there any way to reinstall GRUB so that it can boot both FC4 and XP again? I still have my FC4 install discs and a rescue disc, but I don't have the slightest cluewhere any of my XP discs are.

  2. #2
    If it was your /boot partition that you deleted that stores the grub files, then you are invited to join the "time for reinstallation" game. It could be possible to repair that, but it would me more of a hassle than reinstalling as it will be a very complex procedure. If it is only grub that got killed on the masterbootrecord, then try reinstalling it. Boot the Fedora rescue cd, then type

    chroot /mnt/sysimage
    and then launch
    /sbin/grub-install /dev/hda

    if hda is your primary harddisk, otherwise replace hda with hdb, hdc, hdd or whatever you have.

    PS: We all do mistakes from time to time, many of us do even more drastic mistakes than you. So... you are in good company.
    Windows free since 2002 | computing since 1984

  3. #3
    Yeah, I can't get that to work and the /boot folder is empty...

    Fortunately, backing up everything important that I had on linux shouldn't be a problem. However, since I don't have an XP rescue disk handy to backup that, if I just leave the ntfs partition containing XP there, get rid of the one with fedora on it, then install again, GRUB should be able to boot into windows again, right?

  4. $spacer_open
  5. #4
    Okay, maybe it'll be more of a problem then I thought. Can't find my USB stick (curse being unorganized). Anyway, if I make a new relatively small ext3 partition via the rescue disc, then copy all my important data on linux onto that, then get rid of the partition that I installed fedora on, then install fedora again, I should be able to use the partition with my data on it fine once fedora is installed, correct?

    Or, better yet, I've wanted to install slackware for some time now, but I believe the default boot loader for that is LILO, which I don't know the first thing about. Would I be able to boot windows if I left the ntfs partition there and use the ext3 partition with the data I'm saving if I used slackware and LILO?

  6. #5
    You should be able to create a partition, move the files to it and then use the data on that partition. However you will have to keep in mind that - as you will have to perform the task as root - all file permissions will be changed once you copy the files. Thus you will have to adjust the permission settings again later, but that ain't problematic. What you need to take care about is that you don't trash your other partitions while creating the new partition (I don't know if you want to make it from the command line or with a graphical tool). It will not be very easy for newcomers to linux, but it is possible, especially with some online help. A freenode IRC channel is very useful for that. Anyway, you just need to take a bit of extra care on what you plan to do and what you type. Take time and read carefully the manuals.

    BTW: If your personal files are stored on a separate /home partition, you can simlpy reinstall the system and use the existing /home partition again. A no-brainer task and the best way for making sure everything survives a crash or other "accident". And if you want to use Slackware, this is also helpful, as you simply have to launch a chown command later in order to change the uid from the 500 to 1000 range (FC, Mandriva and others use 500 + for users, debian, Slackware and others use 1000 +).

    I had Slackwares (10.0-10.2) lilo installed over a grub and it worked on my boxes, so chances are that it will work okay on your box, too. You can also create a Slackware bootdisk (always a good decision!) that you can boot in case lilo screws up your MBR. If you want to use Slack, remember though that all configuration needs to be done by changing the config files manually.

    No matter what bootloader you use: Both will detect Windows automatically and set up the bootloader accordingly.
    Windows free since 2002 | computing since 1984

  7. #6
    Making the partition and copying the data seems to have worked, though for whatever reason my hard drive is /dev/sda even though its a normal IDE drive not a SCSI. I don't have time now to reinstall linux because I have to leave for the weekend (going camping), but, hopefully, it should work. Thanks a ton for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts