1

TL;DR at the end if you don't want to read up on how the problems occurred.

So, it all started when I tried to install windows 10.

My computer ran out of battery, I tried to wipe the HDD, win 8 gave me errors after uninstall, I couldnt fix the problems because the wipe erased boot repair things. I wiped everything on the HDD, and installed ubuntu.

This installed an "ubuntu" option under the boot priority order that would usually boot my ubuntu.

Now, I needed windows for autodesk things, so I tried installing windows 7. My bios wouldnt boot from USB, so I changed some UEFI settings and I could boot. It gave me problems because Windows 7 couldnt install on GBR partitions, and while trying to convert my partition from GBR to MBR, I accidentally erased "ubuntu" from boot priority order, and now I cant boot ubuntu. I can however install another ubuntu from a ubuntu USB, but cant boot windows 7 usb now.

I have some files in the ubuntu partition that I need. I tried "try ubuntu on disk" (LiveUSB) option and I obviously didnt have the permissions to remove my files. If I could remove my files and install ubuntu again i'd be fine, but I don't know how to do that either.

So, TL;DR:

1.) How do I add "ubuntu" to my boot priority order? It wont boot without it.

2.) How can i get permissions to remove my old files on my old ubuntu when i'm on a LiveUSB?

Thank you!

3
  • 1.) I have no idea what a "boot priority order" is (never heard of it), but 2.) sudo nautilus should do the job, if it really is only a permissions problem
    – dadexix86
    Jan 12, 2016 at 12:32
  • Boot priority order is when bios puts the "boot from x" in a priority. you put the boot devices in an order to what you'd want them to be booted in. so, your hard disk would be #1, if you were installing something from usb, you'd change that to #1, and your hdd to #2, if your bios didnt find anything in #1, itd boot from #2. Like this: boot-disk.com/images/screen/boot_priority.gif Jan 12, 2016 at 12:45
  • And yes I used sudo nautilus to get all my files out. Reinstalled ubuntu so I atleast have a working system now. Jan 13, 2016 at 14:44

4 Answers 4

1

Your approach is misguided. If you have to install and use Windows 7 on a Windows 10 machine in legacy boot, then do it and live with its limitations. One of them is that you can't add "BIOS menu entries" for individual operating systems, you only get this functionality with UEFI booting.

Reinstalling GRUB in MBR already has a perfectly answered question: How can I repair grub? (How to get Ubuntu back after installing Windows?)

Converting existing installations from UEFI to legacy or vice versa halfheartedly without even basic knowledge of your bootloader setup is one of the most stupid moves you can make. Be sure to install the right GRUB package for the mode you finally choose to boot in, names of two related packages are grub-efi-amd64 and grub-pc.

1
  • It's a windows 8.1 machine, but the drivers and etc are all available for 7 as well. What would the limitation be? From the UEFI system? Jan 13, 2016 at 14:43
1

I am assuming here that with GBR you actually meant GPT.

Did you created a UEFI compatible Windows USB stick? Like using tools e.g. Rufus which gives an option to make UEFI with GPT partition compatible USB drive. My guess is you created a simple MBR bootable PD which then complained that it can't install windows on GPT partitions.

Both Windows and Ubuntu have reached a point where they quite maturely support both UEFI and GPT partitions. So your GPT to MBR conversion was not required. What is required is that you prepare your USB drive to be UEFI compatible i.e. it should have an 'efi' folder with 'efi' files.(you can use Rufus to create it for both windows and ubuntu).

Now most probably your conversion has left you with a clean slate. That means if you do not have 2 HDDs then you have no data on your hard drive as its not possible to have half HDD as GPT while the other as MBR. Thats why Ubuntu is not in the boot priority list as there is no EFI file left for the motherboard to show you. Now there are two ways to go from here.

  1. Forget about all this UEFI and things and just install Windows and ubuntu again in legacy BIOS mode.
  2. If you still have not copied much data then convert it back to GPT and then remember to boot with UEFI compatible USB drive.

For simplicity you can choose option 1, option 2 is good if you want the latest and greatest or by any chance you want to create more primary partitions which MBR will not allow.

0

Boot your newly installed Ubuntu.

Run GParted.

Write down on paper or into a text file, the numbers of the partitions Windows 7 and Ubuntu, respectively, are residing on.

The directery /etc/grub.d/ contains the script files for the boot process. You have to make new script files for the Windows 7 and the old Ubuntu, respectively.

Make new script files in the directory, with names like 12_custom and 15_custom. You can also edit the file 40_custom. If you want the Windows 7 and the old Ubuntu to appear before the new Ubuntu, the files need to have numbers less than 10_Linux, like 07_custom or 09_custom.

Let's say you want to make Windows 7 the second menu entry, you would put this code into 12_custom:

#!/bin/sh -e
echo "Adding Windows 7 to GRUB 2 menu"
cat << EOF
menuentry "Windows 7" {
set root=(hd0,1)
chainloader (hd0,1)+1
}
EOF

Assuming your Windows is on partition SDA1, which corresponds to (hd0,1) that is, the first hard disk - number 0 is the first disk - and 1 corresponds to partition one, or SDA1.

The script file 15_custom, the next menu entry in the boot order list, should look like this:

#!/bin/sh -e
echo "Adding my custom Linux to GRUB 2"
cat << EOF
menuentry "Ubuntu 15.10" {
set root=(hd0,4)
linux /boot/vmlinuz
initrd /boot/initrd.img
}
EOF

In your case, the Ubuntu may reside on another partition, then change (hd0,4) to reflect the right partition number. In the example above the Ubuntu is on partition SDA4.

Save the two files into /etc/grub.d/ directory, as stated earlier, then make them executable:

chmod +x 12_custom
chmod +x 15_custom

Then run

sudo update-grub

After doing this, the three operating systems should appear, as boot choices, in the next boot up.

I recently installed Kubuntu 15.10, on a computer with Windows 10 and Ubuntu Studio 15.10. After I could only boot to Kubuntu, the steps above worked for me, to get all the three systems into the boot list.

The process is based on these instructions - quite long, but worth reading through:

http://www.dedoimedo.com/computers/grub-2.html

3
  • The thing is, my windows 7 isn't installed yet, and I can't get into my Ubuntu in the first place. So your advice is to reinstall Ubuntu and go through this process? Jan 12, 2016 at 16:15
  • Oh sorry, I misunderstood, didn't read your first post well enough. Since you can boot from a live Ubuntu USB, do that and copy the files you need to save, to another USB drive, or an external hard drive, if you have one. Then, make the XX_custom file for the installed Linux only. You should be able to see where it is in GParted, unless you've have messed up the partition(s) somehow. I'm quite unexperienced in Linux myself, so I don't know how to repair a broken install. You might have to wipe out the HDD again, then install Windows first, and Ubuntu after.
    – theodorn
    Jan 12, 2016 at 20:19
  • Tried to edit my comment, but couldn't, only get five minutes for that. You're probably best off following LiveWireBTs advice below.
    – theodorn
    Jan 12, 2016 at 20:30
0

Some of the other answers here are helpful, but I think you need to back up and read up on the differences between BIOS and EFI. These are two different types of firmware, BIOS being the old type (dominant before 2011) and EFI being the newer variety (shipping on most computers introduced since mid-2011, and some before then). EFI is not BIOS. You presumably do not have a BIOS, although many people, and even computer manufacturers, refer to EFIs as "BIOSes." IMHO, this is the single most confusing aspect of the transition from BIOS to EFI, since it makes people think that EFI is just BIOS with some bits added, but it's not -- EFI is fundamentally different from BIOS. Dragging BIOS assumptions and tricks into the EFI world is like dragging a burning tree into a fireworks factory -- it's a spectacular mistake.

Here's my go-to list of recommended reading on EFI:

I understand that's a long list, and you may not want to read them all, but you should read at least a couple of them before you start poking around again. Which ones to read depends on your specific needs and current understanding.

1
  • I did read from somewhere that UEFI was a different system than BIOS - but not that it was completely different. It was first pushed out with 8, and since my system is an 8.1 system.. you get the deal. I'll read up on them, thank you for the help. Jan 13, 2016 at 14:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .