Linux Tutorials New

Make Your Very Own Customized Linux Distro From Your Current Installation

make a linux distro

One of the most common and utility things, when we use Linux is that we can personalize, copy and remaster our Linux installation according to our needs. Linux is very flexible so we have many ways to install and use it: we can install Linux from cd, DVD, network, USB, disk partition; and we can choose between a common installation medium or a medium that contains a live Linux system.

Also, we can create an ISO file of our current Linux installation and we can use the generated ISO file to make a bootable medium. In this article, you’re going to know the process to create an ISO of your current Linux installation and also know the alternatives that we have to do it.

Ways To Make Current Installation’s ISO

There are many applications to create an ISO from the current installation, so I’ve listed the applications that I know to do it easy.

1. Linux Respin

It’s a fork of the discontinued Remastersys, this last was a free tool to personalize and create custom distros, also you could make complete system backups using it.

remastersys to make linux iso

Linux Respin is new, you can get it from its official Website: http://www.linuxrespin.org/

Also, you can get its source code from Github: https://github.com/ch1x0r/LinuxRespin

2. Systemback

It’s a system utility to make backups and restore the previous state of your system. Also, you can use it to copy your system and create a Live System.

systemback to create linux iso

You can get it from its official website at Sourceforge: https://sourceforge.net/projects/systemback

3. Linux Live Kit

It’s a set of shell scripts to create your own Live Linux from the current Linux installation. I’m going to show you the process to make a Live Linux using Linux Live kit.

First, you must install the dependencies of Linux Live kit:

  • Squashfs

Squashfs is a compressed read-only filesystem for Linux. Squashfs is intended for general read-only filesystem use, for archival use (i.e. in cases where a .tar.gz file may be used), and in constrained block device/memory systems (e.g. embedded systems) where low overhead is needed.

You must install squashfs-tools in your system using the package manager:

# aptitude install squashfs-tools

Now you must download Linux Live kit from its official website: http://www.linux-live.org/

If you want, you should remove all unnecessary files from your system (for example man pages and all other files you don’t need),  to make your Live Linux system as small as possible (this step is optional). You must move the Linux Live kit to /tmp, if you want you can read the documentation files in DOC/ to learn how it works. Also, you can edit .config file if you need to modify some variables.

Now is the moment to start with the creation of the Live System, switch to the root user using su and go to the Linux Live directory and xecute the following script:

# ./build

You should go for a cup of coffee because generally, this process takes a very long time.

build current linux iso

Your Live Kit ISO image will be created in /tmp.

There is a screenshots of the process:

linux .iso process

At this point, the process is finalizing.

finalizing linux .iso process

If you see the root prompt again, it means that the process is complete.

Finally, you’ll find an ISO file for CD boot and a ZIP archive for USB boot located in /tmp, you copy these files to any other directory.

To make bootable USB, unpack the generated zip archive (also from /tmp) to your USB device and run bootinst.sh from the boot subdirectory.

Conclusion

​In conclusion, I’ve used Linux Live kit because it worked for me, but you can choose another. Also, this process can be useful to make a customized Linux distro using an already Linux installation.

14 comments

Thomas August 3, 2019 at 3:31 pm

Cheers,
ISO and Archive generated succesfully – but could not get the bootable USB stick so far – although terminal says “Boot Installation finished” the USB Drive does not show up in the Boot Manager … trying the ISO now

Reply
Thomas August 3, 2019 at 4:40 pm

Tried the ISO on several ways:
StartupDiskCreator does not accept ISO – the button keeps disabled
UNetbootin and ddrescue both perform the task, but the usb device is still not present in the Boot Manager
(tried an Ubuntu 16.04 6 from ubuntu.com created with rufus which worked)
My conclusion is that the ISO / zip archive is somehow broken :/ Maybe try CloneZilla ? idk

Reply
John Nanda August 14, 2019 at 11:44 am

You can also go to linuxcustomizer.com and use build features (a structure with command segments) to customize and build your image… It’s free

Reply
Mark January 24, 2020 at 10:53 pm

http://www.linuxrespin.org is an uncompleted website with no links to any files on the download page.. so forget that one

Reply
Tim February 27, 2020 at 7:26 pm

Sounds like it was being updated at the time.
Press Debian or Ubuntu-based on the homepage and you will be taken to the sourceforge page.

Reply
Joe August 7, 2020 at 11:51 am

Thumbs down to Respin.
Has an unresolved dependency and very poor websites.

Reply
Ryan Salomon September 14, 2020 at 6:36 am

I was able to get a bootable pen drive, well actually a very old SATA II SSD connected to a USB to SATA cable!

So it boots, but then fails on looking for data in /linux … despite the fact that I’ve followed the instructions and the linux directory is right there in the root of the drive, containing almost everything, other than one more directory at the root, called EFI, that was created from me running the boot script.

Am I doing something wrong?
How do I get it to find the data file?
The data file is right there in the /linux directory.

It it is owned by root and has permissions -rw-r–r–

Reply
Daniel November 2, 2020 at 4:57 am

Hi ! “To make bootable USB, unpack the generated zip archive (also from /tmp) to your USB device and run bootinst.sh from the boot subdirectory” this is on linux?

Reply
Sidnei March 2, 2021 at 7:47 pm

There are two files, a .bat to Windows and a .sh to Linux. So you must use .bat or .sh file with the system you are using now. I tried to make a bootable pendrive in Windows but it didn’t work…

Reply
nick February 9, 2021 at 5:00 am

Finally, you’ll find an ISO file for CD boot and a ZIP archive for USB boot located in /tmp, you copy these files to any other directory.

do i have to copy to another directory or can i just leave them in temp??
when i try to move these files i dont have the rights …
how do i change permissions on these files or this directory??

To make bootable USB, unpack the generated zip archive (also from /tmp) to your USB device and run bootinst.sh from the boot subdirectory.

by unpack do you mean extract?
i cant extract to my usb i dont have the permissions required
run boot inst.sh ???
where is bootinst.sh?? in the usb or on my system hard drive?
what is the file path of bootinst.sh
what command in terminal can i use to run bootinst.sh

what is the recovery or boot up process like??
will it wipe my main systemdisk when i boot from usb?
i have my main disk partitioned and just want to boot the usb and use timeshift in case i break the system.
will this boot usb wipe my other partitions on the same disk?

all i need is to be able to boot back up after a crash and use timeshift to restore the system instead of re installing from scartch…
it would be nice also to use the usb to install ubuntu on other systems

Reply
nick February 9, 2021 at 5:47 am

Finished. Find your result in /tmp/linux-data-3149
To build ISO, run: /tmp/gen_linux_iso.sh
To build ZIP, run: /tmp/gen_linux_zip.sh
[email protected]:/home/r2d2/linux-live-2.3#

after the build process is complete you can build the zip file by entering /tmp/gen_linux_zip.sh in terminal

then you have to EXTRACT!!! the zip file you just created in terminal… using package manager.
double click on the linux-x86_64.zip located in ,tmp (opens archive manager)
then… click the plus button ( at the top left of archive manager )and select your thumbdrive from the list on the left.
then press extract (on the top right)
this should extract the files to your usb drive

open the usb drive (your extracted files should be in the usb drive) navagate to linux (directory in the usb) then boot (directory in the usb)
rightclick the filepath at the top of the screen … select open in terminal
once in terminal you should be able to type sudo ./bootinst.sh

this should return something saying it was created… youre done!

if you cant extract to usb due to permissions then
Here’s the procedure:

Open “Disk Utility”, and look for your device, and click on it. This will let you be sure you know the correct filesystem type and device name for it. In my case, it was ‘ext4’ and ‘/dev/sdb1’ respectively. Next: Decide what you want to call your thumb drive. I called mine ‘USB16-C’, but you choose your own name. Before closing Disk Utility, click unmount. And USER should be your login name??

Then run steps 2 to 4 in a terminal window.

sudo mkdir -p /media/USB16-C

sudo mount -t ext4 -o rw /dev/sdb1 /media/USB16-C (check your usb in disks program to see device name ) it was /dev/sdb not /dev/sdb1 in my case

sudo chown -R USER:USER /media/USB16-C (also this user user all i did was type the name of my computer here)

if you dont sudo first youll get this
./bootinst.sh
. is device /dev/sdb
./extlinux.x64: cannot open device /dev/sdb
Error installing boot loader.
Read the errors above and press enter to exit…

Reply
nick February 9, 2021 at 8:23 am

BEFORE running
# ./build

first you need to edit the config file of linux live
the file is located in your home diredtory under linux-live-2.3
double click linux live and find bootfiles directory then find syslinux.cfg
open syslinux.cfg and edit the KERNEL /boot/vmlinuz line to read …….. KERNEL /boot/vmlinuz-5.4.0-65-generic
or whatever your kernel version is ( type uname -r in terminal to find your kernel)
dont forget to add the dash between vmlinuz and 5.4.0-65-generic (dont do this vmlinuz5.4.0-65-generic)
SAVE the syslinux.cfg !!!

now run # ./build

makes me wonder if the author has tried his usb stick yet?? it probably wont boot his system if he hasnt edited syslinux.cfg …

Reply
nick February 9, 2021 at 9:29 am

ACTUALLY IM AN IDIOT!
you need to edit the config file linux-live-2.3 / config
change the LIVEKITNAME
change the VMLINUZ file path to reflect your computer
change the kernel (uname -r)
save the file

Reply
Sidnei Serra March 2, 2021 at 7:43 pm

How to install the live-dvd created using the Respín? There isn’t any shortcut in the system to install it.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.