0

I am currently trying to install Ubuntu 16.04.1 on a USB Stick using EFI so I have a portable OS to carry around and I have the ability to plug it into the laptop I use, which only has a EFI setting or no EFI at all (not both). I figured it was the same process as a external hard drive so I followed similar steps. However, it will only working on the computer in which I installed it on. I have tried adding the flag to the EFI partition "ef00" using gdisk, installing over a virtual machine, I have tried everything I could find that I can do.

I don't know else I can do this. Please help. Thanks in advance.

Ookinder
  • 103
  • 5

1 Answers1

1

HP rings a bell

Several HP computers with the same and similar age as your computer do not 'want to' boot via grub, if there is a GUID partition table, when accessed via USB. If there is an MSDOS partition table and the boot partition has a boot flag, it works. (Normally booting via grub should not bother about the partition table or boot flag.) My son and some friends have such computers, and I have tested and verified this behaviour more than once.

You can check the partition table with the following command

sudo parted -ls

Unfortunately dd_text_16.04-UEFI-n-BIOS_2017-05-07_intel-4-pendrive-7.8GB.img.xz has a GUID partition table.

Modell: SanDisk Extreme (scsi)
Disk /dev/sdd: 16,0GB
Sektorstorlek (logisk/fysisk): 512B/512B
Partitionstabell: gpt
Disk Flags: 

Nummer  Början  Slut    Storlek  Filsystem       Namn  Flaggor
 1      1049kB  316MB   315MB    fat32                 startbar, esp
 2      316MB   317MB   1049kB                         bios_grub
 3      317MB   7262MB  6946MB   ext2            root
 4      7262MB  7799MB  537MB    linux-swap(v1)

Test

But I think it will work for you from the following image, dd_Lubuntu_16.04.2_amd64_persist-live_mkusb-12.1.4_7.8GB_msdos-pt.img.xz. It has the correct partition structure to boot also in 'middle-age HP computers'.

Modell: SanDisk Extreme (scsi)
Disk /dev/sdd: 16,0GB
Sektorstorlek (logisk/fysisk): 512B/512B
Partitionstabell: msdos
Disk Flags: 

Nummer  Början  Slut    Storlek  Typ       Filsystem  Flaggor
 3      2097kB  130MB   128MB    primary   fat32      startbar
 4      130MB   1072MB  942MB    primary
 2      1072MB  6443MB  5372MB   extended             lba
 5      1073MB  6443MB  5371MB   logical   ext2
 1      6443MB  7799MB  1356MB   primary   ntfs

In linux you install from compressed image files with mkusb. In Windows you can use Win32 Disk Imager.

Final installation

I remember that you don't want a persistent live system, but if you test it and it works, you can create an MSDOS partition table with the relevant partitions and flags in your USB stick. gparted is a good tool for this purpose.

Then you can install Ubuntu into it with Ubuntu's standard installer. It is easiest, particularly in UEFI mode, if you disconnect (unplug) the internal drive.

Select 'Something else' at the partitioning window of the installer. The target USB stick will be seen as an internal drive, when booted from another USB stick, and the installer will install the EFI boot files into it. (Otherwise the EFI stuff will be written into the internal drive and you have to copy it manually, which is possible but tricky.)

Tweaks

This link describes some tweaks for the installed system.

sudodus
  • 47,684