3 ms·
You're welcome! I definitely think this is an internal pathing issue relative to the ISO -- and I have grappled with this same stuff before many times and gone
by drvdevd 10y ago
You're welcome! I definitely think this is an internal pathing issue relative to the ISO -- and I have grappled with this same stuff before many times and gone mad several times over so I get it :)
I just found a nice reference that I remember using when working with Ubuntu ISOs before at https://help.ubuntu.com/community/LiveCDCustomizationFromScratch https://help.ubuntu.com/community/LiveCDCustomizationFromScr...
It may be outdated and you may have already seen it, but the key point is the section "Install Packages Needed For Live System":
> apt-get install --yes ubuntu-standard casper lupin-casper
> apt-get install --yes discover laptop-detect os-prober
> apt-get install --yes linux-generic
Since they're building the ISO from scratch using debootstrap and a chroot, some scripts in the casper package will probably set up paths, grub, etc, all relative to the current root (the chroot they're working in).
This would also probably explain why using a vmlinuz.efi and initrd.lz from a default 16.04 iso kinda worked for you -- because some paths and versions match up, etc.
Long story short: you should try following that guide to some extent when packing up the custom.iso (unpack, install casper package(s) in a chroot, repack), then find a way to use grub on your ESP to "chainload" [1] the iso from the second partition.
HTH, I'll check back later and see if you had any luck :)
[1] https://wiki.gentoo.org/wiki/GRUB2/Chainloading#ISO_images https://wiki.gentoo.org/wiki/GRUB2/Chainloading#ISO_images
- Bluescreens 10y agoSounds reasonable and looks interesting ^^. Will take a look at it first thing tomorrow ;).
- Bluescreens 10y agoSorry for the late reply, had to work through a few iterations... But it works now ^^. Turns out the issue was not really in the grub and or initrd/vmlinuz... I worked through your LiveCD guide, but did not en up with a working iso in the end :(. However, it did remind me of this guide: https://help.ubuntu.com/community/MakeALiveCD/DVD/BootableFlashFromHarddiskInstall https://help.ubuntu.com/community/MakeALiveCD/DVD/BootableFl... on which distroshare is based. Running through the original guide resulted in a bootable iso. After checking, none of my previous homegrown isos were ever bootable on their own :O!. Apparently the level of black-magic in Unetbootin was greater then I had anticipated. Best part of all, that iso is created on a non-EFI machine, and boots in EFI-mode just fine due to the grub-install --target=x86_64-efi on the bootstick. Everything else is just loaded over the original EFI-modules apparently. So no need to completely revamp all of my old code, just need to take a looksy into the iso generation part (used mkisofs instead of grub-mkrescue in my old scripts because of >4GB fat32 issues). Thanks for all the help and interest man. It really kept me (mostly) sane ;)!
- drvdevd 10y agoNp, I'm just glad you got it working! Like I said I wrestle with the same issues almost every day. I think it pays off in the end though because you come away with a deeper understanding in general and start to see the bugs other ppl don't , so keep hacking. And this whole exchange has made me want to keep a detailed journal of this kind of work because I am doing it and would like to share knowledge more rather than just immediately forget. You should do the same!