Open tseglevskiy opened 5 years ago
Thanks for your report. This issue tracker is for Fedora CoreOS, and you appear to be talking about CoreOS Container Linux. (The terminology is confusing, we know.) I'll move this issue into coreos/bugs, the tracker for Container Linux.
Hi, guys!
It’s not an issue. It’s a story about adding new generation MacMini (I mean with T2 chip) to a k8s cluster. It requires a few workarounds. I found it and I'm happy. But frankly, I’d like to have more clean way, so you can use it as material for creating or solving of some other issues. :)
So, we have k8s cluster, installed by Terraform, Matchbox and iPXE. Some time ago iPXE stopped to work with built it MacMini’s ethernet adapters, so we bought a box of USB dongles and continue to use the same solution. But Apple made new improvement, and on new generation MacMini iPXE doesn’t work with any adapter, and internal SSD isn’t available.
I took Ubuntu installer on USB stick and booted. It demonstrated that boot from external drive is available. Sure, you need to enable it somewhere in MacMini’s settings, but it’s well known action.
Then I bought 256GB external USB-C SSD drive and installed CoreOS there. Old MacMini can boot from this drive, but new one cannot. Some problem with GRUB, it get frozen. I took GRUB from Ubuntu’s installer (do you remember, it booted?). Interesting, but Ubuntu’s GRUB is a little different: has different command arguments, and looks for config in different place (details are below). I fixed it, and CoreOS started.
Second problem with
/usr
partition. Originally in CoreOS it’s encrypted and mounted through mapper. Somehow using of Ubuntu’s GRUB broke this functionality: I booted it on old MacMini and got the same problem. No ideas, why? So, I recreated EXT4 filesystem on the partition 3, copied content of/usr
there again, and pathed GRUB’s config to mount it without mapper.It’s enough to add T2 MacMini to k8s cluster. Below are scripts and patches.
Patch for original
grub.conf
to adopt it for Ubuntu’s GRUB:Second patch to remove partition mapper:
The full
grub.conf
is here: https://gist.github.com/tseglevskiy/676e0ffedae141f1303f794897da40eaAnd there is the script to install CoreOS to external SSD. I'm using already installed CoreOS for it (as well as Matchbox to get Ignition files and OS images).
Usage is
sudo ./inst.sh aa:bb:cc:dd:ee:ff /dev/sdb