Create custom live cd from existing installation?

superboy2k6

Member
Joined
Oct 23, 2019
Messages
32
Reaction score
9
Credits
0
Hi, so I wanted to create a live cd of my VM's Arch Linux installation and make it bootable. It should be the exact replica of what installation I have. I went ahead and checked this forum: https://bbs.archlinux.org/viewtopic.php?id=131036

But I didn't understand one of the following replies:
Yes this can be done with archiso in a "non-traditional" workflow. It not a "newbie" method, just you need to know how archiso works. Basically you build "the medium" manually, but get features from runtime parts (archiso* hooks).
In words (you need at least triple free space than your existing space usage):
1) Install archiso
2) Make an initramfs "archiso.img" from your current install.
3) Make a root-image.fs.sfs from your existing system:
3.a) create an sparse file "root-image.fs" with sufficient space to keep all your existing system (use dd) plus some free space.
3.b) format it with ext2/3/4
3.c) mount it
3.d) rsync all your system except some uneeded files to it, logs, /boot, root-image.fs if is on the same fs, etc etc...) where root-image is mounted
3.e) unmount it
3.f) compress it with squashfs name it as "root-image.fs.sfs"
3.g) place in %TARGET%/arch/%ARCH%/root-image.fs.sfs
4) make an aitab for root-image.fs.sfs
5) Install bootloader to %TARGET%/arch/boot/syslinux/
6) copy your kernel and archiso.img (from point 2) to %TARGET%/arch/boot/%ARCH%
7) make a proper %TARGET%/arch/boot/syslinux/syslinux.cfg with archisolabel=%FSLABEL_OF_TARGET%
8) Optional make an ISO from %TARGET%
Enjoy.

I get that it is done using Archiso but can anyone tell me on detail what to do and if possible with commands?
 

Members online


Top