How to Create Bootable CD/DVD From Installed Ubuntu System

| Comments

“…Hocus-pocus…” and a Live CD/DVD jumps out from nothing…
Hate Gossip?? Jump straight to Tut…


One day I was sitting in my room with my lovely Linux machine, when I got a call from my girlfriend (a girl who is my friend). She had to give a presentation in college within an hour,but her Windows Laptop got crashed giving every Windows lover’s favorite message:
“…bla….bla….bla….Windows Crashed…bla….bla…bla….”
Suddenly lightening of wisdom struck her head and she said, “Hey, I know a super genius guy(me) who can solve my problem”, and she gave me a call.
All right !! She didn’t say that, but she did call me.
She had seen me booting up damaged Windows machines from flash drive and wanted me to help her (Linux is not so popular in my locality, so people get amazed with tiny little Linux magics, so she called me).She wanted me to help her booting up her Laptop so that she could give the presentation.
Well, it is a five minutes job to create a bootable flash drive using an ISO image of Ubuntu/Mint using Unetbootin or I could have burnt the ISO image to a CD/DVD. But unfortunately, at that time, I didn’t have any Live CD/DVD or flash drive ready. Actually I didn’t even have any ISO image of any Linux distro.

I really wanted to help her (after all,girls don’t call me daily).
All I wanted at that time was a “Hocus-pocus” magic that could give me an ISO image of my favorite Linux distro.
Well there is such Linux magic, not hocus-pocus, but Remastersys.


Remastersys is basically a script which creates a bootable Live CD/DVD from Debian based Linux system already installed on your system (which means Ubuntu and all its derivatives).
There are other tools which can help you to create a custom Linux based Distribution like Novo Builder, UCK( Ubuntu Customization Kit) etc etc, but they all need you to download software to be added (and base iso image of distro sometimes) in one step. Though they offer easier customization, but they don’t allow you to make Live CD/DVD from preinstalled system. Most of them need you to have an iso image of Linux distro available to you (into which things are injected).

What remastersys do is that, it transfers your installed system with all the packages installed to a live ISO image which can be burnt to a disc or used for making a live USB.

So let’s start with the tutorial.
First things first, you have to download Remastersys and install it on your system (do this with Synaptic or if you are using Ubuntu, just double clock .deb file, rest Software Manager will manage). While installing it, it will download several dependencies (about 18 mb), so stay connected to internet while installing it. You can add following line into the sources list of apt and install it with command “sudo apt-get install remastersys”, but downloading from above given link works very well.
http://www.geekconnection.org/remastersys/repository/
Remastersys has a quite fine GUI interface, very kind for newbies. It explains everything about their usage, so more details will not be added here.

Remastersys can be accessed from commandline with syntax
sudo remastersys backup|dist|distcdfs|distiso|clean  
e.g. sudo remastersys dist myCustomDistro.iso

You can also give desired name of your custom iso file as shown in above example. Remastersys configuration files can be edited for tuning purposes, but it is advised to do this with “modify” option in GUI to prevent accidents.
Little discription of commands is here:

Backup: This command allows you to clone/backup entire installations including your local settings and home folder. When using this, keep in mind to remove useless files from your home folder which occupy large space (may be movies, music etc), because remastersys make use of “genisoimage” utility, which bounds the size of iso image to be about 4.7 Gigs.

Dist: Dist command works similar to backup but it do not include your local settings or home folder, only global settings are kept. Use this to make custom iso’s to distribute to your friends (as the description says).

Distcdfs: Using this command  will backup all the system files and other things above command will do, but will not make the iso image. This is useful if you want to manually edit things. Just go to remastersys’ working directory (“/home/remastersys” by default) and edit whatever you want/can (do this at your own risk).

Distiso: When you have already used “distcdfs” command and made important changes you wanted, run this command to generate the iso file.

Modify: Modify different settings like working directory, output file name and bla…bla…bla.

Clean: It cleans your working directory…….swappppp…….

…….try rest of them yourself…….:P

Well !! Time for some warnings.
When you run remastersys GUI, it will ask you to close all windows and running processes. Obey this, no processes means no music player, no browser, nothing but Remastersys. Do not disobey (in case you want to spoil the process, you can do that).
Or if being a badass, you have some problem following rules, run “Recovery Console” from boot menu (as I do) or Console from login menu, and run Remastersys from command line.

When I tested…
                                        When I tested Remastersys using GUI (on my Ubuntu 11.04 machine), bounded to my bad habits, I ignored above stated warning and was playing music while chatting on FB. So the result was, it finished quietly but when I tested the ISO in Virtualbox, I found that user for live session was not correctly managed and was asking for password (which I could never guess).

After that I used Remastersys from Recovery console on Mint 11, and everything went smooth and I got a perfectly working Live DVD with all my favorite software (Wine, Dropbox, Emacs etc…etc..) preinstalled.

I tested it several times on different machines and everytime it worked perfectly. Sometimes, when ran through GUI, there arise some issues though minor and occasional, but it is recommended to run it from Recovery Console.

One more thing, sometimes when you run ”sudo remastersys dist custom.iso” command, iso file is not created in Remastersys’ working directory. Don’t panic if this happens, just run ”sudo remastersys distiso custom.iso” and the iso file will be created.



Circle Beat Of The Geek on Google Plus
OR Like us on Facebook  OR Follow on Twitter

Comments