0

I have windows XP and Ubuntu 14.04 dual boot. I have both OS on a single partitioned hard drive. The thing that happened is I had a third partition I added for increased linux storage because I wasn't using the "Drive D" partition anymore for windows so I changed it to a linux partition. I was having issues with the extra linux partition so I unmounted it and both my linux partitions disappeared from the UI on the ubuntu disk manager program. But Ubuntu was still running so I rebooted thinking it was a glitch then I was greeted with grub rescue>. Luckily we have a second computer in the house I tried just about every solution for grub rescue I could find. But I don't know what I'm doing and I couldn't get anything to work. Then I saw several people mention boot-repair. I downloaded that to a flash drive and used it. Now windows XP is working again but I don't even get the option to load Ubuntu it just does a normal windows boot up. Here is the link from boot-repair. I still have my USB iso from when I originally installed Ubuntu and I have the boot-repair USB iso as well. I looked at the advanced options on boot-repair just to look. The two Grub tabs in advanced options aren't even select-able they're visible but I'm unable to click on them. I've noticed from windows XP that my hard drive is still partitioned. I can't see any other drives except my external drive but I've only got access to 100 gigs of my 500 gig hard drive. Which I'm guessing means my linux partitions still exist I just can't see or access them. I'm a noob to linux clearly so please make solutions simple to understand.

Edit: I caved and tried reinstalling Ubuntu but still no Grub loader menu to choose Ubuntu for bootup. I erased the old partition and tried installing to a new one but it didn't seem to work. I'd still like to keep windows XP but use the rest of my hardrive for Ubuntu.

Haze33E
  • 15
  • Can you give the output of sudo lsblk -o name,mountpoint,label,size,uuid,fstype? – L. D. James Sep 07 '16 at 18:04
  • I did not think you could unmount your working system, but Linux lets you do things you should not. Partition then most likely is corrupted and needs fsck. Boot-Repair also moved boot flag back to sda1, which is where it should be. Grub does not use boot flag. http://askubuntu.com/questions/642504/ubuntu-14-04-is-not-booting-normaly-after-a-manual-hard-boot/642789#642789 – oldfred Sep 07 '16 at 19:38
  • Updated my issue which has changed – Haze33E Sep 08 '16 at 04:51

2 Answers2

0

In situations with a broken or wrong bootloader I use the super grub2 disk. It detects bootable operating systems and can boot one of your choice. Choose your ubuntu system. After booting in ubuntu, you can repair your boot loader. Normally this is done with

sudo update-grub
sudo grub-install /dev/sda

(Assuming your first and main harddisk is /dev/sda, normally it is)

mviereck
  • 219
0

Boot-repair could find only one operating-system installed on your computer and this is Windows XP. Boot-repair installed the windows-bootloader in the mbr of sda, so you are able to boot into windows now.

Your Ubuntu-installation is gone, it seems you had Ubuntu installed on sda2.The boot-sector of this partition appears damaged.

You have to reinstall Ubuntu.

You have two hard-drives in your system, sda and sdb. Windows is installed on the first drive (sda). If you reinstall Ubuntu I suggest that you install Ubuntu to the second drive (sdb). The Installer will ask you where to install Grub, then your answer is sdb.

After installation you need to change the boot-order in your BIOS to boot from your second drive first (this is the 1TB-drive).If you boot to your second drive first you will get the Grub-menu. If you boot to the first drive (500GB-drive) you will boot to Windows directly.

If your 1TB-drive is an external drive plugged into an USB-port, then you should not install Ubuntu on this drive, in this case you should install Ubuntu on the second partition of the first drive (sda2).Install Grub to sda. Changing the boot-order is not needed in this case.

mook765
  • 15,925
  • The 1TB is my external drive and yes it's a USB like I said I originally I had Ubuntu installed on a partition I only have the one internal hard drive. – Haze33E Sep 08 '16 at 02:55
  • Your internal drive has two partitions. On first partition Win XP installed. Install Ubuntu to second partition of your internal drive. Installer will ask where to install Grub, answer sda. – mook765 Sep 08 '16 at 03:01
  • I had 3 partitions one for windows XP one for Ubuntu and I converted the windows "drive D" partition into a partition for linux. When I unmounted the "drive D" partition it created this whole mess even though it wasn't the partition which had Ubuntu installed. – Haze33E Sep 08 '16 at 03:36
  • Boot-repair shows only two partitions on your internal drive. lsblk shows same. Your internal drive is sda and has two partitions, sda1 and sda2. – mook765 Sep 08 '16 at 04:18
  • Guess when I unmounted the other partition some glitch deleted the partition with Ubuntu. Anyway I tried deleting the partition and installing Ubuntu to a fresh new partition but I didn't get the Grub loader it still went to windows XP. I'd like to keep windows XP on my computer still and just use the rest of the space for Ubuntu. – Haze33E Sep 08 '16 at 04:46
  • You have to install Grub to sda. Run boot-repair again, that will do it. – mook765 Sep 08 '16 at 08:57
  • Thanks I got my new install working it really sucks I couldn't fix the old install. – Haze33E Sep 08 '16 at 10:13