PDA

View Full Version : [ubuntu] 12.10 new install along Windows 8 fails to boot



randommanaki
December 4th, 2012, 02:26 AM
Hi there everyone,

I am having trouble with a 12.10 Ubuntu install. I have 3 separate HDDs - 2 SSDs and a large HD. I have installed W8 on one of the SSDs, and just installed Ubuntu on the other. The large drive is a shared NTFS space (split into 3 partitions).

The install went fine, where I started a swap space of 1 GB at the beginning of the drive (don't intend to hibernate), and used the rest as ext4. No errors were reported or anything. In the place where it said drive to install boot or something like that (lowest field in partition manager), I chose my Windows 8 SSD because (I assumed) that is where the booting happens right now.

What happened after reboot is that it says "Reboot And Select Proper Boot Device Or Insert Boot Media In Selected Boot Device And Press A Key". I am still able to boot into the live USB drive i created.

This is now the 5th day i've spent on this computer in a row, so I've given up troubleshooting and am going straight to the forums :/ I assume I have to reinstall/repair the bootloader/grub/something?

BTW it was a UEFI boot.

Thank you so much in advance and please let me know what other information you need.

-AK

***********
EDIT: God i'm an idiot, it even says right there you need an EFI partition. Ubuntu boot problem is solved! Now can someone tell me how to boot back into windows? perhaps like a boot menu before loading either OS? (I'd like to default it to W8 unless i say otherwise)

randommanaki
December 4th, 2012, 04:36 AM
Hello again,

I am making no headway with Boot-Repair in my attempt to get back into windows. Here are two of the output files from B-R in the hopes that someone can help me out:

http://paste.ubuntu.com/1409452/
http://paste.ubuntu.com/1409455/

To give some detail:

sda - 240GB SSD - Windows 8
sdb - 3TB HDD - 3 NTFS partitions, ~1TB each (created in W8)
sdc - 64GB SSD - Ubuntu 12.10.

I am currently at a place where Windows Boot Manager shows an error if I try to get into windows, and the GRUB2 loader only shows Ubuntu and Advanced Options for Ubuntu.


Thanks again in advance,
AK

oldfred
December 4th, 2012, 06:29 AM
Have not seen many (any?) multiple drive system with Windows 8 and UEFI. A couple to links to two drive systems below.

But it looks like sda is still BIOS/MBR and is your Windows install.

Everything I have seen is to have all systems UEFI/gpt or all systems BIOS/MBR.

UEFI dual boot two drives
http://ubuntuforums.org/showthread.php?t=2072950
http://ubuntuforums.org/showthread.php?t=2031836

Normally grub2's os-prober finds the other UEFI install but creates a BIOS chain load entry that does not work with UEFI as boot must chain to efi partition not 100MB Windows boot partition in MBR systems.

https://help.ubuntu.com/community/UEFI
https://wiki.archlinux.org/index.php/UEFI

https://wiki.archlinux.org/index.php/GPT

What does sudo update-grub find?

Or can you add a simple chain load entry to sda? I think BIOS (and maybe UEFI) write some info onto drive so it knows which drive is hd0 and other info. If booted in UEFI mode that data may not be there to let Windows boot in BIOS mode from a chain load with a UEFI install.

What partition tools did you use to partition sdb, the 3TB drive? NTFS partitions have to have info in the PBR - partition boot sector on start & size of partition. Script shows an error in PBR on sdb3. Gparted or gdisk seem to work best for gpt partitioning.

With Ubuntu I use gpt partitioning but BIOS boot. But the only Windows I have is XP and I now cannot boot it as in BIOS I have to have AHCI. And installing AHCI drivers in XP is a new install or major effort. I just decided not to boot that old drive anymore. :)

According to the Arch site SSD's should use gpt, but Windows only boots from gpt drives if UEFI.
Older Windows info on gpt - 2008 updated 2011
http://msdn.microsoft.com/en-us/windows/hardware/gg463525.aspx
Microsoft suggested partitions including reserved partition for gpt & UEFI:
http://technet.microsoft.com/en-us/library/dd744301%28WS.10%29.aspx
Windows technical info on gpt and GUIDs
http://msdn.microsoft.com/library/windows/desktop/aa365449
Order on drive is important:
http://en.wikipedia.org/wiki/Microsoft_Reserved_Partition
http://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=efibootmgr.git;a=blob_plain;f=README; hb=HEAD
http://software.intel.com/en-us/articles/efi-shells-and-scripting/
Convert Windows USB flash install to UEFI boot
http://jake.io/b/2011/installing-windows-7-with-uefi-boot-on-an-x220-from-usb/
Install Windows efi to new drive.
http://technet.microsoft.com/en-us/library/hh304353%28v=ws.10%29.aspx

randommanaki
December 4th, 2012, 06:04 PM
Hi there, oldfred, and thanks for all the excellent info!

That is exactly what I was suspecting when I saw that the boot sector of sda didn't say anything about EFI :(

I don't have anything important on these drives yet, so if you can tell me exactly how I should proceed, I can wipe all 3 of my drives and start over - (the 3 partitions on sdb were creating using Windows 8 disk manager, i too saw the error and am confused as to why that is. EFI/BIOS > 2.2TB issue maybe?).

Therefore, given your info, do you think I should install W8 first or Ubuntu? Or use the liveboot to use Gparted to create the proper partitions but install W8 first? I actually wasn't so noobish before UEFI/GPT appeared, so now I feel like I know nothing of how things should be set up hahaha

My thoughts before your post:

1 drive needed an efi partition that would boot. The rest could be whatever.

After your post:

Each of the 3 drives needs to be (or at least should be) GPT partitoned and both OSes installed in EFI mode (this latter is what I thought I did but it seems Windows 8 installed in BIOS mode or something, I can look into that if you are not familiar with W8 ).

Let me know how you think it would be best for me to proceed. Thanks again for the quality post!

oldfred
December 4th, 2012, 07:17 PM
I have not actually installed any Windows since XP 6 years ago. But have followed dual booting with Linux and related Windows issues. My preference is what you are doing in having Windows on one drive & Ubuntu on another. But I want each drive separately bootable so I would still create the Windows install on sda as if none of the other drives existed. I believe the dual boot with two drives, either the chain load to the other efi partition or updates to the efi partition worked.

If (really when) on drive fails then in UEFI(BIOS) you should be able to select the other drive and have a efi enty that would work.

I think you only have to reinstall Windows, then run Boot-Repair or add manual efi boot entries in Ubuntu to chain to Windows efi.

You will have to convert sda to gpt, then Windows only installs in UEFI mode. I think you also have to boot its installer from UEFI in efi mode like Ubuntu not in BIOS mode. In BIOS Windows had a nasty habit with multiple drives of installing its boot files in the drive set to boot from in BIOS. Usually that was ok, but some that installed to one drive found boot files on another. Not sure with UEFI if that is an issue or not?

We have seen a few gpt partition errors with either Windows or Windows third party tools. gpt has a backup partition table at the end of the drive and sometimes the last partition then overlaps the partition table.
Download from repository (or newest version from rodsbooks) gdisk and just list sdb. If ok then no changes required.
GPT fdisk Tutorial -srs5694 in forums
http://ubuntuforums.org/showthread.php?t=1439794
http://www.rodsbooks.com/gdisk/
http://www.rodsbooks.com/gdisk/download.html#obs

sudo gdisk -l /dev/sdb

I have only used gparted to create gpt partitioned drives, but do not have any really large drives. But I use gdisk to review drives.

randommanaki
December 5th, 2012, 03:48 AM
Well, went into my LiveUSB, started GParted, and wiped the two larger drives (windows ssd and 3tb data HDD) and rewrote their partition tables as GPT. repartitioned the big one, and installed windows on the SSD. I was then able to boot into Windows 8. but not ubuntu. I then performed Boot-Repair, and am again able to boot into Ubuntu, but not Windows :(

http://paste.ubuntu.com/1411644/

Am I missing a step? My brain is fried, apologies

oldfred
December 5th, 2012, 05:41 AM
What I was afraid of. Windows on sda saw the efi on sdc and installed its boot files to that drive. So sda would never boot on its own. But it still should work.

I do not see that boot repair fixed it by adding a chain load entry. We can manually add if if necessary, but I think the partition table error on sdb is still confusing things.

Somehow your sdb2 starts after its end? And starts after the start of sdb3.


Partition Start Sector End Sector # of Sectors System
/dev/sdb1 2,048 2,147,485,695 2,147,483,648 Data partition (Windows/Linux)
/dev/sdb2 2,147,485,696 2,010,161,151 -137,324,544 Data partition (Windows/Linux)
/dev/sdb3 2,010,161,152 2,639,306,751 629,145,600 Data partition (Windows/Linux)

/dev/sdb1 overlaps with /dev/sdb3
/dev/sdb2 overlaps with /dev/sdb3
Did gparted do that?

And update your copy of Boot-Repair. Yesterday Yann was making some fixes on UEFI finding Windows. I do not know his versions, so you may have an older copy.

randommanaki
December 5th, 2012, 06:04 AM
Yeah that's what was confusing me as well, I rewrote the partition table for the large drive (sdb) into GPT and repartitioned it using GParted. I saw a reference to problems related to > 2.2TB if not EFI in my old BIOS menu, but now it's in UEFI mode so that shouldn't be a problem?

Regarding boot-repair updating, I just use the two commands listed here https://help.ubuntu.com/community/Boot-Repair under 2nd option: Install boot-repair in Ubuntu. I just assumed that would get the latest version? is that not true?

Thanks again for sticking with this, oldfred!

oldfred
December 5th, 2012, 09:40 PM
Windows requires UEFI to boot from gpt, but Ubuntu does not.

I even used gpt on my 16GB flash drive (just to see if it worked) and as long as I added the bios_grub for use with BIOS it has worked. Once installed I really do not see any difference between gpt(GUID) & MBR(msdos). I have gpt on 2 drives and MBR on 2 drives. But I use BIOS.

What does gdisk say about your sdb drive. It compares backup partition table and may make a fix?

randommanaki
December 5th, 2012, 11:48 PM
I'm at work right now and will update the thread once I get back to my computer with the gdisk information.

However, seeing as I used the Ubuntu 12.10 LiveUSB's GParted, created a GPT partition table on sdb and new partitions, is it possible that another error was made? I would have thought that rewriting the partition table and creating new partitions would be an almost guaranteed fix (of course losing all the data, but that's not an issue for me yet).

Terminology for the rest:
SSD1 - 240GB Intel 520, want to put Windows 8 x64 (default OS) on this
SSD2 - 64 GB Crucial m4, want to put Ubuntu 12.10 x64 on this
HDD - 3 TB Seagate, want to put 2 NTFS, 1 ext4 partitions

Further, I plan on doing this now:

1) Disconnect everything but SSD1, booting Ubuntu LiveUSB, using GParted to wipe the drive and rewrite a GPT partition table. Do not create any partitions.

2) Install W8 - allocate maximum it lets me as W8 NTFS and follow whatever it tells me. (are there any other partitions I should create/any gotchas?)

3) Disconnect *EVERYTHING* but SSD2 (SSD1 not connected), boot LiveUSB, install Ubuntu with a X GB (1 GB?) linux-swap at the beginning, ext4 for the rest of ubuntu (63 GB?). Will wipe/write GPT first.

4) Now, there should be two working, UEFI independently-bootable, GPT OS hard drives. Reconnect SSD1 so that SSD1 & SSD2 only are connected. **FIX THE BOOTING ISSUE that is sure to happen (This is where I will need your help - will a simple Boot-Repair work?)**

5) Connect the HDD as a data drive. Use LiveUSB's GParted to wipe/write GPT table. create the desired partitions. **(One point of note, I just let it choose the maximum amount for the last partition, should I be leaving free space at the end instead for the backup GPT?? I just assumed GParted would take that into account)**

6) Now both OSes will be bootable and both will (I assume) be able to see the extra drive (even if Windows will not recognize the ext4 partitions)


What do you think oldfred?

YannBuntu
December 6th, 2012, 12:45 AM
Hello

Did you use Boot-Repair after reinstalling Windows?
- if no, please delete the /EFI/Boot/bootx64.efi.grb and /EFI/Microsoft/Boot/bootmgfw.efi.grb and /EFI/Microsoft/Boot/bootx64.efi.grb files in sdc1. Then run Boot-Repair's Recommended Repair.
- if yes, then delete the /EFI/Boot/ and /EFI/Microsoft/Boot/ folders, then fix (or reinstall Windows), then run Boot-Repair's Recommended Repair.

oldfred
December 6th, 2012, 01:30 AM
You can try Yann's suggestions to fix things.

Your reinstall plan sound fine. I like 25GB for / (root) and I include /home in my / as I have several data partitions. One left over NTFS still have my Firefox & Thunderbird profiles from when booting XP. But I am aggressive about moving data from /home, so my /home only has my user configuration mostly hidden files and my .wine for Windows version of Picasa. My /home is 2GB of my total install of 9GB in the 25GB root. And .wine is most of the 2GB in /home.

I like to have an operating system on every drive. I followed this logic.

Creating a Dedicated Knoppix Partition for large drives
http://www.troubleshooters.com/linux/knoppix/knoppix_partition.htm
Except I have multiple Ubuntu installs and rotate newest install from drive to drive.

Except now with my 64GB SSD, I have 2 / partitions, current version and next or test version. On my rotating drive I have lots of 25GB / partition for test, older Ubuntus, and my 2 data partitions. I still have a bit of unallocated, but need to houseclean out the old Ubuntu's that are not supported anymore and try some other DE's as I prefer gnome2 or gnome fallback, not Unity.

randommanaki
December 6th, 2012, 03:25 AM
I'm sorry, Yann, I had already started the reinstall process so I was unable to test out your suggested fix :/ FWIW, every time I used Boot-Repair, it warned me about EFI and told me to check the options, so I got scared and never tried the recommended repair. Now that I know it's safe I'll be sure to try that next time.

oldfred, here is the result of gdisk -l /dev/sdb, which, surprisingly, shows no errors, which is not consistent with the B-R logs :/

ubuntu@ubuntu:~$ sudo gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): A74CC04E-090C-439F-98B1-C956780DA3DE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2925 sectors (1.4 MiB)

Number Start (sector) End (sector) Size Code Name
1 2048 2147485695 1024.0 GiB 0700
2 2147485696 5231386623 1.4 TiB 0700
3 5231386624 5860532223 300.0 GiB 0700


At the moment, I am trying the single-disk install method, so don't you two go running away, I'll need you to fix the boot problem caused by reconnecting the two SSDs! hahaha

thanks again, this forum has excellent support. I'll try to report back as quickly as possible with results

** Side note - Windows 8 said it couldn't be installed on the disk last time, but I did it anyway and it booted fine, so that was confusing. indicative of more latent problem? We'll see on this install

oldfred
December 6th, 2012, 05:42 AM
Report from gdisk looks ok. Not sure if then there is an issue in bootinfoscript? Bootinfoscript relies on some of the standard commands like fdisk, parted etc., so it may just be that it is not used to such large drives?

Also rerun BootInfo report and post link. If you want us to review before you run corrections that is fine, but we may not be back immediately.

randommanaki
December 6th, 2012, 07:01 AM
Hahahah no no I was being facetious, this is by far the most timely support i've gotten on any forum!

Current Status:

Using my technique (1 drive at a time, multiple reboots in between just to make sure all filesystems were recognized/good), I am now at a state where

SSD1 boots W8 (and is the first boot option in UEFI, so is default boot).
SSD2 boots ubuntu (have to manually override boot order in UEFI by pressing del immediately on boot)
HDD is successfully recognized by both OSes while each is respectively booted, and gparted shows all partitions in the desired manner.

SO! (fingers crossed) everything looks fine EXCEPT for the lack of Bootloading menu (I'm still not ENTIRELY convinced this isn't the ideal situation as is, Windows will by far be my main OS except for linux environment development)

If either of you or anyone watching this can then take me to that final step, that'd be amazing! I assume it has to do with booting into liveUSB or something and copying the /EFI/ files from SSD2 to SSD1 /EFI location, and it's just that simple, but I am quite unknowledgable here so I'll let you guys run me through that.

Thanks!!

oldfred
December 6th, 2012, 05:58 PM
I believe it is that simple.
But not sure with multiple drives and efi how it works exactly. With my BIOS I choose a drive and then only MBR has control. With an efi partition you can have any number of systems booting directly from one efi partition. So in UEFI menu do you get both a drive choice and then a efi menu choice of all the systems installed in that drive's efi partition?
Grub can chain to Windows and uses UUID so it will find the other efi partition as far as I know. see second link below post #14 for explanation. It may be automatic with boot repair now.

Yann updated Boot-Repair with one or both of these users who had two drives.
UEFI dual boot two drives - HP
http://ubuntuforums.org/showthread.php?t=2072950
UEFI dual boot two drives see #14 on how edit UUID to Windows efi partiton
http://ubuntuforums.org/showthread.php?t=2031836

randommanaki
December 6th, 2012, 10:43 PM
After the successful EFI installations of W8 and Ub12.10, my UEFI now has options for:

UEFI: "SSD1"
ubuntu
P0: "SSD1"
P1: "SSD2"
... etc,

where I assume the "ubuntu" entry is the EFI boot partition on the SSD2 drive (Ub12.10).

Thus, it is not necessarily split up by drive THEN EFI/regular, but rather all the boot options in one list. (Gigabyte GA-Z68XP-UD3P UEFI firmware).

That second link seems to be exactly what I need to do - I'll try it out when I get home today. However, seeing as SSD1 (Windows) is my bigger/better/faster SSD, and the only one "guaranteed" to stay in this box, it'd be nice if something that simple could be done in the reverse way - chain such that SSD1/EFI/ has an entry to call SSD2/EFI ubuntu boot (i don't even mind grub2 being on SSD1 and calling ubuntu on SSD2, but i know nothing about bootloaders :( ).

That said, I think i'm just being super picky and after two weeks of this nonsense, I'll just go ahead with the grub chain back to Windows unless anyone has any ideas.

THANK YOU SO MUCH FOR YOUR HELP! I'll report back with my (hopefully) final status tonight. I've really learned a lot here thanks to you and Yann's bootloader


**super side note (maybe YannBuntu has more experience with this): Grub2 is just a bootloader, right? It can be installed anywhere, right (ie is standalone)? And in UEFI mode, it is no longer MBRs, but rather a unique UUID, then specific file call to boot an OS, right?

Therefore, is there a way to install Grub2 in my SSD1 EFI partition, then configure it to look for the SSD1 EFI file and SSD2 EFI file, rather than (i'm assuming) booting SSD2 (where grub, i think, is now), then chaining back to SSD1?

Or do i have all my concepts messed up? hahaha

YannBuntu
December 6th, 2012, 11:43 PM
You are using UEFI, so MBR is not used.

Your unique ESP is on sdc (the Ubuntu disc), so you don't have choice: your boot scheme is like this:

UEFI firmware --> GRUB EFI file on ESP (sdc1) --> Ubuntu (sdc3)
--> Windows (sda2)

or

UEFI firmware --> Windows EFI file on ESP (sdc1) --> Windows (sda2)


Moving the ESP on sda would not increase speed significantly AFAIK, so better leaving the situation as it is. (except if you want to be able to use Windows when the Ubuntu disc is disconnected)

randommanaki
December 6th, 2012, 11:59 PM
You are using UEFI, so MBR is not used.

Your unique ESP is on sdc (the Ubuntu disc), so you don't have choice: your boot scheme is like this:

[snip]

Moving the ESP on sda would not increase speed significantly AFAIK, so better leaving the situation as it is. (except if you want to be able to use Windows when the Ubuntu disc is disconnected)

Thank you so much for your reply, @YannBuntu!

Actually, there are two comments to be made here:

Boot Situation: I'm not sure how much of the thread you have followed, but my situation is now changed (see edit below for details) - Each drive is independently bootable from the UEFI boot override menu; I reformatted/reinstalled each OS individually with only its drive connected.

Therefore, I (believe) I have two separate, functioning EFI partitions (ESPs?). One on the windows disk, and one on the ubuntu disk.

Again, you're the expert, but I BELIEVE this makes things much simpler? As in install another Grub2 in my Windows disk and have IT call ubuntu's file? This would be preferable for part 2:

Ubuntu Disk Removal: That is, unfortunately, exactly what I want :( I forsee the need to move the ubuntu disk out to a separate physical box in the near (read few months) future, so it'd be nice to avoid breaking Windows if it can easily be helped.

Thanks again!

EDIT: This may not be as clear as I'd like to make it so when I go home I will re-run the boot-info script so you get a clear picture of my situation. However, here is a hopefully better explanation in the interim:


sda: | EFI (vfat) | NTFS (Windows) |
--- GPT, UEFI, 240GB Intel 520 (boots fine when "UEFI: Intel 520..." is
selected in UEFI menu or if i leave it alone - it is first in the boot order)

sdb: | NTFS | NTFS | ext4 |
--- GPT, data disk, 3TB Seagate (all partitions can be seen by both OSes, even
if Windows doesn't recognize the ext4)

sdc: | EFI (vfat) | linux-swap | ext4 (/) |
--- GPT, UEFI, 64GB Crucial m4 (boots fine when "ubuntu" is selected in UEFI
menu. Must be chosen because default boot order loads windows)

the exact partitions are from memory, so I may have missed something (swap may be at the end of the drive, I used automatic ubuntu install), but the general gist is valid

YannBuntu
December 7th, 2012, 12:42 AM
ok, so you have 1 ESP for Windows's disc, and one for Ubuntu's disc, that's perfect!

If i understand well, you want to add an Ubuntu entry inside the Windows EFI bootloader? if yes, i don't know how to do this. Maybe it's the kind of question to ask on a Windows8 forum ;) (please tell us if you find a way, it may be useful for other Ubuntu users)

oldfred
December 7th, 2012, 12:55 AM
I do not know what grub-efi does in the background.

With BIOS, when you install grub to an MBR, it also customizes core.img to know which partition to search to find the rest of grub. Core.img is not shown and is just in the sectors right after the MBR. That space does not exist in gpt partitions and with MBR you have to create bios_grub to have a place for core.img.

In your ubuntu efi partition, are there other files? Bootinfo script is only looking for the .efi files. Not sure then if the grub efi file includes the core.img code to know which UUID to search?

You could always backup both efi partition and experiment with just copying the efi/ubuntu folders into your Windows efi. It may be missing key parts like the core.img we have in BIOS or it may just be all you need?

randommanaki
December 7th, 2012, 05:18 AM
Ok folks, wish me luck! I will be using this thread as a starting point:

http://neosmart.net/forums/showthread.php?t=9580

to install NeoGrub via EasyBCD.


If i don't come back it's because i destroyed the boot partitions and kicked my laptop in frustration, leaving me with 0 computers hahaha

oldfred
December 7th, 2012, 05:31 AM
I thought EasyBCD did not work with UEFI.

EasyBCD does not work with Windows 8
http://neosmart.net/forums/showthread.php?t=11135


Microsoft blocks 3rd party chainloaders from the BCD menu for UEFI machines. We are researching workarounds, none have presented themselves as of yet.

claven123
December 7th, 2012, 06:45 AM
It did not work for me.

D

randommanaki
December 7th, 2012, 06:08 PM
Apologies, I moved over to the computer in question and promptly fell asleep on the keyboard haha


However, with some rest, comes some wisdom - @YannBuntu is correct - it IS perfect. (At least for my situation.) I have the ability to boot to either OS via the UEFI menu rather than a separate bootloader, which leaves two clean EFI partitions and no extra hassle for me. I think that was the ideal case.

*That said*, EasyBCD + NeoGrub did IN FACT work for me. As simple as the tutorials claimed it to be, the Windows 8 EFI graphical bootloading screen now shows up and has a NeoGrub option (which, if configured properly, would probably work as it is just a grub script). Therefore, I am forced to theorize that in my case, EasyBCD+NeoGrub would be successful if I were to care to configure NeoGrub's config file.

However, given my small monologue in the first paragraph, I think I will remove the NG entry and stick with UEFI boot menu for now due to its "pureness" haha. If anybody wants me to write up a small tutorial this weekend, I'd gladly do it, but it's pretty simple in the end. I just had to get a lot of help from here to understand the concepts.

Also, there is no data on any of my drives yet, so if anyone wants me to attempt to properly configure the NG boot option, let me know now haha (I don't know any grub commands, but seems easy tho)