Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Let me explain what I am trying to do in detail...

I want to install ubuntu 12.04 (or 12.10) on a 320gb usb drive, and set the boot order to boot usb first. That way, if I want 12.04 to boot, I just have to start my machine with the driver inserted, and if I want to boot windows, I start it with it disconnected.

I have done this on previous computers, but this machine is windows 8 uefi, which I have never done before. I do not have a deep understanding of how uefi works, but I want my main machine to remain completely untouched by ubuntu, and I do not know if this is possible with the new uefi setup.

My machine is a fujitsu lifebook AH532 > 2.3ghz intel i3 > 6gb ram

share|improve this question
add comment

1 Answer

Yes, it should be possible, I did this on a Toshiba S855. Left secure boot enabled, and changed the boot order to boot usb first. I'd suggest pre-partitioning using a gpt partition table, make a 300M FAT32 bootable partition for EFI, and your favorite partition scheme for the rest. You must install from the "try" desktop however, because regardless of where you specify putting the bootloader, your hard disk's EFI partition will be the one mounted and used. To correct this wrong behavior, before starting the install have a terminal running, and have command lines you can recall (just for speed) which unmount the hard disks's EFI, and mount the target's EFI. Start the install, immediately after specifying the partitions, check in the terminal, do the umount/mount, and let the install proceed.The the Ubuntu files will be put onto the target. One big problem you avoid doing this is trying to boot Windows through grub -- Windows may not be seen, wrong grub commands will be used, and you need to run boot-repair just to fix all that up. Removable media use the bootloader in /EFI/Boot/bootx64.efi (for x64 architecture), so copy /EFI/ubuntu/shimx64.efi to /EFI/Boot/bootx64.efi (for secure boot, no need to turn it off). Also put a (signed) copy of grubx64.efi into /EFI/Boot/grubx64.efi. Have a copy of grub.cfg in /EFI/ubuntu/grub.cfg, and things should work. I think installs later than 12.04 will use a grub.cfg which pulls in the maintained copy in /boot/grub, but a full grub.cfg file works too -- you would need to update it when kernels get updated. You probably want to take the execute permission off the /etc/grub.d/30_os-prober, since it won't see windows, and kills the timeout on the grub menu when it adds it's stub code to grub.cfg. I'd also suggest backing up the EFI partition files.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.