[SOLVED] Partition table and partitioning requirements for GRUB2 UEFI installation to USB?
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
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.
Distribution: As of April 2012, OpenSUSE with KDE4
Posts: 5
Rep:
Partition table and partitioning requirements for GRUB2 UEFI installation to USB?
Hey everyone,
I've been battling with an uncooperative Win8.1/Ubuntu dual-boot setup for most of the last three days. I recently purchased a current-generation Sony Vaio laptop (Flip... 15N? Model# SVf15N26CXB, appears to be Best Buy exclusive) and decided to try setting up a dual-boot system. With SecureBoot and FastBoot disabled, I installed Ubuntu Gnome 13.10 in its own set of partitions, and it worked great. Until I picked Windows from the GRUB menu, that is. At that point, every subsequent reboot launched immediately into Windows 8 - no Go, no $200.
Heeding some advice I got from another thread (or the Ubuntu forums... or somewhere...), I assumed that Windows, in its infinite wisdom, had decided to overwrite my bootloader. So I fired up my live-USB again, installed boot-repair, and ran it. Voila! Now I got the boot menu again. And could boot Linux! Then Windows. And no more boot menu. After some swearing, I tried reinstalling grub manually from the command line, which worked great until I booted into Windows again. At which point it (somewhat predictably) FUBARed my GRUB menu.
After two more days hacking at this problem to no avail, I've decided to throw in the towel. I'd like to install GRUB to a USB stick, with just the Linux entry, then change my system boot preference to default to external media if a boot disk is installed. I did this with a floppy once, years ago, when I wanted to install linux on my father's NT workstation (which I did with somewhat dubious authorization) without replacing the bootloader (which I definitely was NOT authorized to do). I'm pretty sure the following command should install GRUB2 to the USB (I forget where my $ESP is off the cuff, but I might have mounted it at /boot in the installation, so I'll use that here):
Additionally, I'm planning on creating a 512Mb FAT32 partition at the beginning of the (now GPT) USB drive in question, as one might do on the hard drive for a shiny, new efi system partition for installation.
So I'm mostly just checking my work, because after three days of headaches, I'm tired and I really don't want to have to hack at this anymore - learning by trial and error be darned (to Heck). Will the above command and partitioning scheme do what I think it will? Am I including any unnecessary steps or omitting any critical ones? Is there a hidden tick box in Windows that says "Stop Skynet from fouling up my computer" that makes this all unnecessary?
I do apologize if this is long, but I wanted to be sure I included all of the necessary information. Thanks for taking the time to read!
~ Sean
Last edited by seangllghr; 04-09-2014 at 11:31 PM.
Reason: Solved - fixing the problem from Windows obviates the need for a workaround.
a very easy method is to install Windoze first, let it think it owns the computer, and THEN install Ubuntu. Gparted ( used during the install process automatically ) will suggest a few things, one of them being dual boot. It will take care of it for you.
I used to do this all the time, (but not with an UEFI drive) - but then got tired of the hassle and simply ran Windoze in VirtualBox.
PS - I have learned tons from things that didn't work, and almost nothing from things that did. If you are patient and figure it out, it will be well worth it. It has taken me sometimes YEARS to get something right, but along the way what I learned is priceless. Perserverence pays.
Last edited by ceyx; 04-09-2014 at 01:07 AM.
Reason: clarity
Distribution: As of April 2012, OpenSUSE with KDE4
Posts: 5
Original Poster
Rep:
In about 90% of cases, I'd agree with you - hence my low post count here. I've been using Linux actively for the better part of the last 9 years. If I came crawling to the forums begging for answers every time I ran into a problem, I'd have spent a lot of time waiting for others to answer my questions without learning anything significant from it (especially in the mid- to late-2000's, when I seemed to run into wireless or graphics problems approximately whenever I waggled my fingers the wrong way). I've been struggling to find pertinent information on UEFI, though, and figured that I might as well just ask. If I had years to tinker, I'd be happy to tinker, but I need the system up-and-running as soon as I can manage.
Regarding the actual issue - Windows came pre-installed on the machine, as it has on every new laptop I've purchased recently (since the M$ tax seems to roughly line up with their hardware subsidies, the cost of a Linux-preinstalled machine has never seemed justified). Unfortunately, at least in UEFI mode, Ubiquity no longer offers an automagic dual-boot configuration (haven't tried in BIOS-MBR, not currently having hardware that actually runs off BIOS-MBR anymore). Since I maintain a separate /home for data persistence, however, that configuration never really worked for me anyway. Furthermore, Windows appears to overwrite the bootloader on EVERY BOOT. Because it's a d**k.
For the record, I realized afterwards that the command listed above still installs GRUB on /dev/sda. I've now tried including the --removable option and specifying /dev/sdb when running the installer, to no appreciable avail. I'm going to keep tinkering, but I've found a bootable USB image of rEFInd that's a serviceable backdoor in case I can't find a proper answer soon. I'll post here if I find anything.
Last edited by seangllghr; 04-09-2014 at 02:13 AM.
Reason: Clarification of the particular Windows quirk that's giving me trouble.
You'll probably find Win8 is simply making itself the default boot target - if you get to the boot menu, you should still see the ubuntu (maybe "Linux" but not likely) entry you can select. Once booted, install efibootmgr (from Intel) so you can adjust the EFI boot entries. You might have to do this each time after booting Win8, I don't know as I refuse to use it, but it'll save re-installing grub all the time.
Last edited by syg00; 04-09-2014 at 02:23 AM.
Reason: typos
Distribution: As of April 2012, OpenSUSE with KDE4
Posts: 5
Original Poster
Rep:
syg00: Pah! Technicalities! You're right, of course. That's exactly what Windows was doing. That only makes it slightly less annoying.
jefro, turns out Windows is happy to make changes without explicit instructions. I went into Windows and changed the default boot target from the command prompt with bcdedit, which apparently convinced it that I really did want to boot to GRUB every time.
For anyone who might stumble on this thread in the future, the "Stop Skynet from fouling up my computer" tick box that I mentioned above is the following command:
Note that this command should be entered from the Windows Command Prompt (which must be run as an administrator), not the newfangled "Windows Power Shell". Don't ask me why. I know even less about Windows than I do about Linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.