Create custom image installation ISO

If none of the more specific forums is the right place to ask

Create custom image installation ISO

Postby half » 2018-12-21 04:46

Hi,

I would like to create an ISO to transfer a custom debian installation to other computers/VMs.

process description
creation:
- create tar.gz from filesystem
- create bootable ISO incl. all tools (scripts) and the filesystem tar.gz

installation:
- boot ISO
- after selecting the GRUB entry an install script will start automatically
- question to confirm the installation
- partitioning of sda
- formating the partitions
- unpack the tar.gz for each file system to the corresponding partition
- install GRUB on target

I already tried "respin", "linux live kit" and "ReAR", but they are not exactly what I want.

Does anybody know a process/script how to do this?

cheers,
half
half
 
Posts: 2
Joined: 2018-12-21 04:30

Re: Create custom image installation ISO

Postby MagicPoulp » 2018-12-21 09:00

"transfer a custom debian installation to other computers/VMs."

Maybe you can join me in my claim that "debian is hard to backup". I created a thread about but no one agreed.
viewtopic.php?f=10&t=139113

Here are a few tools for backup.
https://wiki.debian.org/BackupAndRecovery

Know that when moving partitions around, you need to reconfigure the UUIDs with grubs. And other similar things. As I said, it is hard.

If you don't just want to back up but you want to maintain a Linux distribution on your own, and build it, you should use Yocto that is the reference.
MagicPoulp
 
Posts: 197
Joined: 2018-11-05 21:30

Re: Create custom image installation ISO

Postby llivv » 2018-12-21 09:25

if you are looking to make VM client images the easy way
well easy once you have to process firgured out so it works....
look at vmbootstrap to see if it fits your needs.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage

Re: Create custom image installation ISO

Postby xepan » 2018-12-21 12:22

refractasnapshot:
viewtopic.php?f=3&t=139354
xepan
 
Posts: 89
Joined: 2018-11-28 06:38

Re: Create custom image installation ISO

Postby CwF » 2018-12-21 15:14

It seems this is a combobulated subject.

The question about the tool chain required to essentially create your own installable 'spin', then look into 'simple-cdd' and 'live-image-*?' stuff and learn preseeding and enjoy customizing your iso. I've done that, but don't remember, and prefer to forget!

So, half, you're not asking to back up and then restore, but install to anywhere as is. A great goal and a major PIA to maintain. I doubt you want your image to be frozen in time, so anything you make will need to be remade before you use it again, after that first success. If you geared up for nightlies or weeklies, maybe worth it, but ask yourself how often you will use this and weigh it against the time involved. I say ISO is obsolete. Of course you can use the same toolchain to create an IMG for usb...

The advantage of installable media is you have the chance to run setup and vary the install to be tailored to a machine, its hard disk size, partition layouts, naming, etc. Decide how important these factors are. Backup methods, and refracta limit these choices, and are not equivelant to making a customized installable image.

An alternative tool chain is to maintain your favored image using a vm and imaging tools. If you keep the image small, use compression, and create a separate multi-purpose recovery image as a bootable usb you can accomplish similar results. Such a usb can today be sized to hold multiple imageable images, so from the command line you dd or qemu-image the image file from the usb to the new systems internal disk = boot sectors, grub, the partition layout, the system(s), all in one shot - and reboot. done. There are lots of variables to discuss, but imho the ability to move a tweaked system from box to box is becoming trivial.

The disadvantages of using a *non-installable* image can be overcome with that vm step. The image can be tweaked with anticipated needs before you image, ie names, users, uuic, custom xorg or other hardware specifics, etc. Then after imaging and booted into the new system, you grow partitions and do other minor tweaks you missed in the vm phase. Just one caveat, avoid mounting an image directly in the same running image, encrypted lvm and the same disk uuic's will conflict and error. You can look at the image in a vm or with guestmount, not mount.

If you happen to pass the image around various hardware the image 'learns', and you can incorporate the specifics in the image. Eventually your image is essential a 'live-image with persistence'.
CwF
 
Posts: 400
Joined: 2018-06-20 15:16

Re: Create custom image installation ISO

Postby Bulkley » 2018-12-21 17:08

I agree with CwF; this can be a pain. However, look at this: How can I clone my entire OS to a bootable USB stick?
Bulkley
 
Posts: 5827
Joined: 2006-02-11 18:35

Re: Create custom image installation ISO

Postby llivv » 2018-12-22 00:11

debootstrap
to build && extract a full system tarball that it built. (feature included customize the package list of each tarball using a few options with a list of packages either added to, subtracted from or both adding and subtracting packages to/from the default list of packages.)

a new tool in buster named
vmdb2
vmdb2 will be a successor of vmdebootstrap. It will create disk images for virtual machines and real hardware, with partitioning, and a boot loader, and a Debian installation.
Does that include most of the use case requirments?

xorriso to burn .iso to optical
debootstick to move .img to usb

almost everything except installing images to another machines VM
theres got to be an easier way huh!
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage


Re: Create custom image installation ISO

Postby xepan » 2018-12-22 14:57

been a while, but to me refractasnapshot creates an installable iso from a running system much more comfortable than doing it with live-build (which could do the exact same thing as refractasnapshot does, but i think not anymore, and for quite a while).

before that we created an iso with live-build, loop-mounted the iso, unpacked the iso, chrooted in it and startx from it, configured the gui, exit the chroot and pack the iso back together .... oh my .
iirc refractasnapshot mainly automates all of that.
xepan
 
Posts: 89
Joined: 2018-11-28 06:38

Re: Create custom image installation ISO

Postby half » 2018-12-26 09:58

thx for all the replies.

I got my solution.

just setup a machine which holds the live system. installed via debootstrap.

i create a tar.gz on the system that i want to duplicate.
scp the backup file to the installer vm.

on the installer vm start mksquashfs and xorriso

-> iso ready for installation
half
 
Posts: 2
Joined: 2018-12-21 04:30


Return to General Questions

Who is online

Users browsing this forum: No registered users and 15 guests

fashionable