Skip to content

Make an EFI bootable drive of Ubuntu

Newer computers are phasing out legacy boot options, so creating a bootable Ubuntu drive is now something of a nightmare =.=  It’s been a terrible journey, but I’ve got one working so here’s how I went about it.

  1. on a small USB stick create a Ubuntu installer
  2. Set up virtual box to run the installer USB stick from a VM and give it access to your USB drives
    (this is not necessary but will stop you from accidentally overwriting a hard drive)
    https://www.top-password.com/blog/how-to-boot-an-existing-virtualbox-vm-from-usb-drive/
  3. Plug in the USB you want to install Ubuntu on along with the Ubuntu installer USB
  4. Make sure to run the virtual machine in EFI mode, in virtual box this is under system>Enable EFI ( special OSes only)
  5. Start the VM, and choose the USB stick as your install location
  6. install normally – during the process you will need to partition the stick to have one partition to install Ubuntu (make that one really big)  and a second partition for the EFI booter, make that small like 500mb-1G
  7. and then you should have a bootable USB yay!!

 

Now, to try and match it to an existing VM you would

  1. Back it up with Ubuntu backup tool
  2. Transfer the backup files to the USB stick, and restore from there

There will be a lot of messed up stuff that’ll take hours to get back up and running, but this is the only way I’ve found where I can make a virtual box VM portable through EFI =.=  And restoring from a backup will at least save a lot of time vs starting from scratch.

 

And finally after you’ve gotten everything to where you want it, make a backup USB!

  1. Use disk clone in Mini Tool Partition wizard
    https://www.partitionwizard.com/free-partition-manager.html
  2. And if you get a
    EDAC pnd2: Failed to register device with error -22.
    error when trying to run it then one of your partitions were renamed in the process
  3. use “sudo blkid” to see all your partition UUIDs
  4. then edit “nano /etc/fstab” and fix the UUIDs as necessary

 

Sorry this article is a mess – I’ve gone back and forth from so many methods to try and make a bootable EFI drive that my notes are all over the place.  So this is more a general outline of how I made my bootable stick, but it should point you in the right direction.

Fix no wifi on linux mint for old HP laptop

My old HP laptop had a very old wifi card that wasn’t supported out of the box by linux mint, but I was able to install the necessary drivers with the following code

1
2
3
4
5
6
7
sudo apt update
sudo update-pciids
sudo apt install bcmwl-kernel-source 
sudo apt install broadcom-sta-dkms
sudo apt-get install broadcom-sta-dkms
 
"/cygdrive/p/Programs/VirtualBox/VboxManage.exe" clonehd 'F:/Documents/Virtualbox/2019 Mint/2019 Mint.vdi' 'F:/Documents/Virtualbox/2019_Mint.iso' --format RAW

SSH copy files

the first folder is the from directory, then the next is the

1
cp -R /share/Multimedia/Videos/ /share/USBDisk2/Backup-3_2019/Multimedia/

Then, fix the permissions:

1
chmod -R 777 /share/USBDisk2/-Backup-3_2019/

Picking ionic back up

OK, so it’s been a while and you have to pick back up from where you last left off with your ionic app. He’s how to go about that on Mac with Git.

  1. Pull from Git
  2. Run “npm install” to get all the modules
  3. Run “ionic cordova platform add ios”
  4. Run “ionic cordova prepare” to install plugins
  5. Run “ionic cordova resources” to generate splash and icons

If you need to redo your signing, you can follow these steps

  1. Select a development team
    https://stackoverflow.com/questions/39524148/requires-a-development-team-select-a-development-team-in-the-project-editor-cod
  2. If you invalid errors, make sure your system clock has the correct date

Hopefully that did the trick and you’re ready to go, I’ll add any errors and fixes I come across to the end of the article, but here’s how to go about testing.

Emulator testing:

  1. Just run ‘ ionic cordova emulate ios  -l — –buildFlag=”-UseModernBuildSystem=0″ ‘ to start it up in the emulator

Ad hoc Device testing:

  1. Open Xcode
  2. Open the iOS project, probably something like “~/Documents/app/platform/ios/App.xcworkspace”
  3. Login to developer account under Xcode>settings>accounts
  4. Select “Generic iOS Device” as device
  5. Choose Product->Build For->Testing
  6. Product->Archive
  7. Click the “Export…” button and choose Development and choose where to export the IPA
  8. Upload the IPA to diawi.com, then install on device

 

To fix “‘xcodebuild’ requires Xcode” errors

  • Run Xcode from applications directory
  • xcode-select –install # Install Command Line Tools if you haven’t already.
  • sudo xcode-select –switch /Library/Developer/CommandLineTools # Enable command line tools
  • sudo xcode-select -s /Applications/Xcode.app/Contents/Developer