Live linux distro combined in one EFI file.
Download here https://github.com/zhovner/OneFileLinux/releases
More information in russian https://habrahabr.ru/post/349758/
diskutil mount disk_NUMBER
To find out EFI partition disk number use diskutil list
The command is as follows in my case:
diskutil mount disk0s1
cp ~/Downloads/OneFileLinux.efi /Volumes/EFI
sudo bless --mount /Volumes/EFI --setBoot --nextonly --file /Volumes/EFI/OneFileLinux.efi
This command will boot linux only once. Next reboot will return previous boot sequence.
!!! Note that System Integrity Protection (SIP) prohibits to change boot options.
You can run bless
from Recover Mode console. Press CMD+R while power on and go to "Utilities —> Terminal"
If your motherboard has UEFI Shell, just choose the path to OneFileLinux.efi on ESP.
Otherwise add new boot options to NVRAM and choose it from boot menu.
Example for ThinkPad x220
efibootmgr --disk /dev/sda --part 2 --create --label "One File Linux" --loader /OneFileLinux.efi
Press F12 while power on and choose new boot entry
This project is based on vanilla linux kernel 4.16-rc1
and Alpine Linux Minimal root filesystem https://alpinelinux.org/downloads/
https://git.kernel.org/torvalds/t/linux-4.16-rc1.tar.gz
and extract it to linux-4.16-rc1
This repository contatins linux-4.16-rc1/.config
file with kernel config.
Chroot into root filesystem
chroot ./alpine-minirootfs /bin/ash
Edit what you need. Install packages with apk
packet manager.
Run bulding script
./build.sh