Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Create ISO image of a Linux system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1216

PostPosted: Sat Oct 07, 2023 1:31 pm    Post subject: Create ISO image of a Linux system Reply with quote

Hi everyone, I have a question.

I am coding now from over one year a package manager, and I would like to make a live iso of the generated system .

I don't have any idea how to do that.

How normally Gentoo team do to generate a live cd of a Gentoo system ?
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3151

PostPosted: Sat Oct 07, 2023 2:30 pm    Post subject: Reply with quote

In a nutshell, you need 3 things:

- root file system - this is typically a squashfs. Sqfs is compressed and read-only. Hint: mksquashfs
- in-ram buffer for runtime changes - overlayfs can merge mounted squashfs image with a tmpfs into a writable rootfs. This is how gentoo's liveCD is made, and it appears to be using genkernel's initramfs, so you don't even need to roll your own.
- a way to boot it. Typically done by having a copy of kernel and initramfs outside of squashfs. You can use GRUB now, though back in the days isolinux (provided by syslinux package) was the one and only way to go.

mkisofs will let you put all the pieces together into a bootable iso image. It can create a hybrid image too, one that will boot from either CD or USB. For usb only, you can also manually create a partition table, partition for data and install bootloader just like you would with any other disk.


Use your gentoo experience to fill in the gaps. There are big gaps in what I wrote, but it should be enough to get you started, and you can always ask more questions later.
Back to top
View user's profile Send private message
duane
Apprentice
Apprentice


Joined: 03 Jun 2002
Posts: 193
Location: Oklahoma City

PostPosted: Sun Oct 08, 2023 1:53 am    Post subject: Re: Create ISO image of a Linux system Reply with quote

Fulgurance wrote:
I am coding now from over one year a package manager, and I would like to make a live iso of the generated system .


This is how I'm making my live iso to this day. I use grub-mkrescue on a system installed in chroot.

https://forums.gentoo.org/viewtopic-t-1155565-highlight-.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum