On Friday, 31 August 2018 22:10:48 BST Andrew Udvare wrote: > On 8/31/18 2:41 PM, Mick wrote: > > What I have not fathomed yet is how to compile into the mach_kernel the > > vmlinuz and initrd the boot.efi uses to boot linux. :-/ > > (Note that I am making assumptions that the Apple TV 1st gen can be > treated kind of like a Mac.) Right, I'm not sure if it can ... > You probably should try rEFInd to help. You can get rid of it once you > are comfortable. rEFInd can be avoided: > > https://glandium.org/blog/?p=2830 > > This is what I used years back on a MacBook Pro but I was not successful > in getting an EFI stub to boot correctly. The issue was a bug with USB > 2/3 initialisation or something at the time in the kernel, which you > probably won't run into. I had to use the BIOS emulation which you might > have the ability to do. So it was rEFInd -> BIOS emulation (calls it > Windows) -> LILO (GRUB didn't work) and then Linux. Last time I was dual booting into a MacBook Pro a couple of years ago, I think I used CONFIG_EFI_STUB on linux and no boot manager at the time. The MacBook's boot manager listed my gentoo bootx64.efi file which booted into Linux without any drama. > Here is what it looked like (holding C at boot time): > https://i.imgtc.com/jjBY8AF.jpg (OS is macOS, "Windows" CD in the > picture was just Gentoo live CD). Yes, I recall a similar picture with my installation at the time. > Your problem can be made simpler if you have a) no desire to dual-boot > and b) no disk encryption. This would mean you only have your VFAT > partition for EFI and your main partition. Well, this box has a 32bit EFI, for which a special boot.efi[1] binary was developed a long time ago to boot a mach_kernel executable.[2] The mach_kernel is compiled to contain a compressed vmlinuz and initrd image for the Linux OS. The /boot partition is on an 'AppleTV Recovery' (AF04) partition type with an HFS+ fs. At least this is how OSMC and from what I understand older Gentoo installations were booting these devices. However, all this was happening 10 years ago. I don't know if I can bypass all this malarkey and just compile a kernel with an EFI stub and without initrd to boot with. [1] https://www.developerfusion.com/project/24162/atvbootloader/ [2] https://github.com/davilla/atv-bootloader -- Regards, Mick