I intend to create a dualboot persistent usb. I'd like to try creating a USB where I can boot macOS High Sierra and WIndows 10. From what I understand of LVM, I can create 2 VG, 1 APFS and 1 NTFS. This would allow me to boot into Windows10 on a PC and Windows10/macOS on a Mac. I know workarounds involve using 2 USB, or using bootcamp, but I'd like to give it a try. rEFInd would be able to give me the options I need, with individual /boot files intheir own VG.
Rather than using GUI, I'm using this opportunity to learn about the basics. These are the steps I have taken.
Step 1: I wiped my USB with
sudo dd if=/dev/zero of=/dev/sdb bs=4k && sync
Step 2: Add GPT.
sudo gdisk /dev/sdb o # Create new empty GPT
Step 3: Create EFI partition
n # new partition 1 # 1st partition <enter> # suggested/default start sector +512M # Internet wisdom on EFI size ef00 # EFI system
Step 4: Create LVM partition
n # new partition 4 # 2nd partition +128M # Internet wisdom on good practice -128M # Internet wisdom to create buffer space 8e00 # LVM file system
printing the end result:
Disk /dev/sdd: 242614272 sectors, 115.7 GiB Logical sector size: 512 bytes Disk identifier (GUID): FE8B1928-7122-4004-9CF6-D5D47C08999E Partition table holds up to 128 entries First usable sector is 34, last usable sector is 242614238 Partitions will be aligned on 2048-sector boundaries Total free space is 526302 sectors (257.0 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 1050623 512.0 MiB EF00 EFI System 2 1312768 242352094 114.9 GiB 8E00 Linux LVM
Here is where I am lost. I don't know how to install Boot loaders into the EFI partition. I have followed Rod Smith's Managing EFI Boot Loaders for Linux:
EFI Boot Loader Installation and The rEFInd Boot Manager:
Installing rEFInd but I got lost at the
/boot/efi part. My Ubuntu Machine does not /boot/efi, but /boot/grub.
Could anyone advise on actual steps to achieve rEFInd on an external USB?