I’ve been struggling to make a bootable iso. I did Linux from scratch and I wanted to boot it in virtual box. I found a sparse amount of info about mkisofs/genisofimage but I couldn’t actually get a successful boot after following a few tutorials.
I have to imagine there are more modern tools for something like this but I didn’t have any luck googling.
Sorry to hijack but it sounds like you might have an answer I need. I just want a way to put together an iso with a bootloader that works in virtual machines. (I’m good with 32bit grub but I’d work with uefi too).
Would you be fine with some tooling that enables one to make their own custom iso from an existing distro? This path still allows for a substantial amount of freedom, though it’s not a blank slate by any stretch of the imagination. But it makes up for it with how relatively easy and painless it can be.
Or would you instead like to get into the nitty-gritty of things and want all the freedom you’d want? This increased freedom does come with a substantial cost in convenience and labour.
Going to try the penguins-eggs method you posted. I would love to be able to turn a virtual box environment into an installable medium to make my own version of debian with all my gnome tweaks.
I would also love a solution that doesn’t require booting into the OS first. So that I can take a root dir and turn it into a bootable iso. I tried a bunch of old tutorials for making a boot.iso and linking it into mkisofs with -b but it never worked.
I am willing to learn/use any free tooling. Not picky at all.
Going to try the penguins-eggs method you posted. I would love to be able to turn a virtual box environment into an installable medium to make my own version of debian with all my gnome tweaks.
Good choice! The “penguins-eggs method” should fit the bill ;) !
I would also love a solution that doesn’t require booting into the OS first. So that I can take a root dir and turn it into a bootable iso.
Few questions :P :
If I understood you correctly, you mean that all of the files that will make up the bootable iso are contained -presumably under FHS- within a root dir of another distro? Or did you mean it as a partition? Or did you mean any tool that can build your iso from within another system based on (declarative) instructions?
Are we still talking about Debian with all your GNOME tweaks?
Is Debian a hard requirement? Or would you be open to say something like Fedora?
Is Live USB a hard requirement?
Might seem random, but what’s your stance on declarative distros?
I tried a bunch of old tutorials for making a boot.iso and linking it into mkisofs with -b but it never worked.
Small nitpick; I generally recommend using xorriso over mkisofs, the latter is only packaged in most distros as part of xorriso anyways*. While genisoimage does ‘provide’ mksisofs as well, genisoimage is unmaintained and should therefore not be used.
As for xorriso I have a LFS dir that very much resembles a Linux root dir (without a DE or any distro specific software) and I can chroot into it mounting /dev, /sys, /run, /proc from my host system.
I would like to compress that LFS dir into an iso combined with a boot loader.
That LFS dir is on a separate partition and does have a boot loader installed on that partition’s hard drive. But I’d rather boot it in a virtual machine and I didn’t want to give the vm raw hard drive access.
I hope that helps but I’m happy to answer more questions.
Booting into a live CD isn’t a hard requirement because I can probably just use eggs
after I get it to boot in a vm.
Edit: also thanks for the insight about xorriso I had real trouble finding much info about the differences between the three.
Edit 2: I’m going to run LFS on the exact same hardware it compiled on so I can probably use grub installed on my host system.
That said I did try using grub-mkimage on my host system and when passing that iso into mkisofs -b I still couldn’t get a boot. (No bootable medium found.)
Thanks for answering! Now I’ve got a better picture of what you’re trying to achieve. However, unfortunately, I’ve yet to dabble into LFS. So I’m afraid that I might not be that helpful 😭. Wish you the best of luck though!
The official manual page for xorriso is probably the best place to start. Unfortunately it mostly glosses over how it’s compatible with mkisofs and doesn’t further delve too much into what mkisofs does and thus how to engage with the -b flag. Fortunately, that information can be found on the related manual page for xorrisofs.
Please feel free to notify me if I can be of further help :blush: !
I’ve been struggling to make a bootable iso. I did Linux from scratch and I wanted to boot it in virtual box. I found a sparse amount of info about mkisofs/genisofimage but I couldn’t actually get a successful boot after following a few tutorials.
I have to imagine there are more modern tools for something like this but I didn’t have any luck googling.
Sorry to hijack but it sounds like you might have an answer I need. I just want a way to put together an iso with a bootloader that works in virtual machines. (I’m good with 32bit grub but I’d work with uefi too).
Would you be fine with some tooling that enables one to make their own custom iso from an existing distro? This path still allows for a substantial amount of freedom, though it’s not a blank slate by any stretch of the imagination. But it makes up for it with how relatively easy and painless it can be.
Or would you instead like to get into the nitty-gritty of things and want all the freedom you’d want? This increased freedom does come with a substantial cost in convenience and labour.
Pick your poison :P . I’ll be waiting ;) .
Going to try the penguins-eggs method you posted. I would love to be able to turn a virtual box environment into an installable medium to make my own version of debian with all my gnome tweaks.
I would also love a solution that doesn’t require booting into the OS first. So that I can take a root dir and turn it into a bootable iso. I tried a bunch of old tutorials for making a boot.iso and linking it into mkisofs with -b but it never worked.
I am willing to learn/use any free tooling. Not picky at all.
Good choice! The “penguins-eggs method” should fit the bill ;) !
Few questions :P :
Small nitpick; I generally recommend using
xorriso
overmkisofs
, the latter is only packaged in most distros as part ofxorriso
anyways*. Whilegenisoimage
does ‘provide’mksisofs
as well,genisoimage
is unmaintained and should therefore not be used.So eggs is great for Debian with my Gnome stuff.
As for xorriso I have a LFS dir that very much resembles a Linux root dir (without a DE or any distro specific software) and I can chroot into it mounting /dev, /sys, /run, /proc from my host system.
I would like to compress that LFS dir into an iso combined with a boot loader.
That LFS dir is on a separate partition and does have a boot loader installed on that partition’s hard drive. But I’d rather boot it in a virtual machine and I didn’t want to give the vm raw hard drive access.
I hope that helps but I’m happy to answer more questions.
Booting into a live CD isn’t a hard requirement because I can probably just use eggs after I get it to boot in a vm.
Edit: also thanks for the insight about xorriso I had real trouble finding much info about the differences between the three.
Edit 2: I’m going to run LFS on the exact same hardware it compiled on so I can probably use grub installed on my host system.
That said I did try using grub-mkimage on my host system and when passing that iso into mkisofs -b I still couldn’t get a boot. (No bootable medium found.)
Thanks for answering! Now I’ve got a better picture of what you’re trying to achieve. However, unfortunately, I’ve yet to dabble into LFS. So I’m afraid that I might not be that helpful 😭. Wish you the best of luck though!
Alright thanks. Well if you know of any good resources for xorriso particularly with the -b (boot) flag I’d like to read them.
Google has been mostly serving me 15 year old SO posts that aren’t relevant to modern Linux anymore.
The official manual page for
xorriso
is probably the best place to start. Unfortunately it mostly glosses over how it’s compatible withmkisofs
and doesn’t further delve too much into whatmkisofs
does and thus how to engage with the-b
flag. Fortunately, that information can be found on the related manual page forxorrisofs
.Please feel free to notify me if I can be of further help :blush: !
Thanks. I see the word boot is referenced 200 times on the related manual page. So I suspect a thorough read through of that page will help me.