Jump to content

SI-04: How To build your own Live CD with mklivecd

Recommended Posts

Browse: [About the FAQ Forum] [Table of Contents] [FAQs] [Contribute] [SI: Software Installation]


SI-04: How To build your own Live CD with mklivecd?


Step 1


Install a 'basic' Mandrake 9.2 (individual package selection, concentrate on one DE) on a separate partition. Or as the only OS on your PC, does not matter. You will need a ~5 GB partition. And a swap partition, you can use your already existing swap. 250 MB should be fine. Create one user with a password, and root of course. If you have a multi-boot box, tell the installer to write lilo to /, not to the mbr. Modify your lilo in your main install to call lilo in your new partition. Or do what you use to do in this case ;-)


Step 2


Boot your fresh MDK. Run immediately menudrake - and choose menustyle - second choice: mandrake menu. Save it. Now you won't get the menu bug and you don't have to install all these updates.

Get the following rpm's from a mdk 9.2 contrib mirror:

  • kernel-tmb-
  • busybox
  • cloop-utils

Get the latest stable cvs version of mklivecd (mklivecd-0.5.7-0....noarch.rpm) here:




Install the kernel on the new partition. Urpmi or MCC. Uninstall the old kernel, dito. Reboot and make sure everything is ok. I had no problems. Install the rpms busybox, cloop and mklivecd on your new partition.


Step 3


Remove all stuff using mcc-softwaremanagement, that you don't need. Hints: python, gimp etc. Don't remove the gnome-libs, mdk config tools need them. Check in a terminal how big your used space is:


# df


Hint: clean /usr/share/doc and /usr/share/man and /usr/share/wallpapers (~200 MB)

  • Install additional stuff from contrib and plf etc.
  • You iso should have a maximum of 700 MB to fit on a cd. Your used space should be < 1,7 GB. The compression rate is ~ 41 %

Step 4


Make your desktop look nice. Configure everything - your live cd will look and behave almost exactly like your installed system. Don't forget to clean your browser cache, the cookies, your trash can ... stuff in your home dir, or the add. rpm's.

Once again:


# df


Step 5


Open a terminal, su to root :

# mklivecd --help

Here you'll find all options to run the script.

Most simple is:


# mklivecd <name>.iso  (where <name> is your choice)


This will create an iso file in your current directory.


This is what I am using:


# mklivecd --verbose --keyboard=de --fstab=rw,auto --splash=no rainbow.iso



  • --verbose
    You can see, what the script is doing. Very nice!
  • --keyboard=de
    Default is the US layout, so this is my keyb for the live cd.
  • --fstab=rw,auto
    Default creates the script a fstab without mounting the partitions on the hd. This option creates a fstab with read-write mounted partitions, Windows and Linux part., exception NTFS (you have to mount it manually to an already set mount point)
  • --splash=no
    This will create a live cd without the Mandrake bootsplash and the background while booting. I've set it this way to get rid of it. When you have your own bootsplash theme, and you want to use it, dont set this option. Default is with bootsplash.
  • rainbow.iso
    This is the name of the iso file, that the script creates. Your choice.

There are many options you can use like: writing the iso to a different partition, excluding dirs and files from the creation, using a different /tmp dir for the whole process ... One of the most interesting is: you can install the script to your *main* OS and not into the new partition, so you would build the iso from 'outside'. But I am not familiar with it.


How long does it take: on a P4, 2 Ghz with 256 MB RAM and a swap of 250 MB it took me 7 minutes to create a 230 MB iso from a used space of ~600 MB.


Step 6


Burn the iso - to a cd-rw (or cd-r). Or copy it to a different partition where you have your burning application.


Step 7


Boot your cd. And tell us about it.

Edited by Tuxiscool
Link to comment
Share on other sites

How about making this a FAQ anna?


Its absolutely fabulous. I will be making one when I get my new computer. Gonna run fluxbox, with loads of themes, have XINE, CD burner, XMMS, some favourite music, Firebird, gdesklets............. oooh!! i cant wait!!


Add some things like the mklivecd's site and all the extra options



the extra options are located in a file called BOOTCODES, here is the CVS version of that file


Edited by Tuxiscool
Link to comment
Share on other sites

HowTo part 2: using the newer version of mklivecd and livecd-install


Get from a 9.2 contrib mirror - and install:

  • cloop-utils
  • busybox

Go here to get the most recent mklivecd scripts:




--> 'Download tarball'


Yes, now you need to work with sources and build them.


Unpack it to your home dir, on the partition where you will run the mklivecd script. It will create a subdir: /livecd with 4 more subdirs, you only need the following two: /mklivecd and /livecd-utils. Open a terminal, as a user, navigate to /livecd/mklivecd. Run:

$ make

Su to root and run:

# make install


The mklivecd scripts are now installed.


As a user navigate to /livecd/livecd-utils and run:


$ make


A new sub dir will be created: /dist

There you'll find the file: livecd-install

If you are not already on the partition which is the base for the creation of your new live-iso, then copy this file to it, to /usr/sbin/. This small file is your hd installer, which you can launch later on your livecd. - But your not yet done: this file needs:

  • perl-QT-3.008 ... rpm
  • libsmokeqt1-1.2.1-2mdk.i586.rpm

Get them on a 9.2 contrib mirror. Install, you will be asked to insert your mdk cd, there are two more dependencies.


Ok, now you should have a working livecd-install script.


There are a lot of changes in the new mklivecd script: better hwdetect, different default settings, more kernel-versions (stock mdk kernel to 2.6.x, but not all are tested, you are on your own here, or read the discussion on the livecd-user or livecd-developper mailing list).


Running and building the livecd iso.

First run as root in a terminal:

# mklivecd --help


- and please read what are the defaults settings, what are the options to run the script. For example in this new version you need to specify:


--kernel <version>
--looptype clp


All this is in a process of very fast and heavy development, so this might have already changed when you read this. And there are still bugs, with special hardware or the combination of special kernel versions with ReiserFS etc. And please keep in mind that I actually don't really know what I am talking about - as a newbie.


I give you an example, how I ran the script with success:


# mklivecd --verbose --root /mnt/spiel --kernel 2.4.22-21.tmb.1mdk --looptype clp --keyboard=de_nodeadkeys --fstab=rw,auto --splash=no livecd.iso

  • --verbose
    Watch the script doing its work.
  • --root /mnt/spiel
    Yeah - I am running the script now on may *main* system/partition. Here you tell the script the path to the *mounted* partition that will get compressed. If you are running everything on your new partition, skip this part.
  • --kernel 2.4.22-21.tmb.1mdk
    The script wants to know the exact name of your kernel (on your new partition), if you are not running the standard mdk kernel
  • --looptype clp
    Default is now a different looptype, something with squashfs, but I have not installed it, don't know what it is and how to do this. Here you specify the looptype cloop, which you do have installed.
    The other explanation you'll find in part 1 of the HowTo.

Finished your livecd.iso? Burned it ? Booted? You want to test the installer?


Step 1

Create a Linux Partition on your harddisk, ext3 should be fine a filesystem. Use MCC or cfdisk or fdisk. Format it. Create a swap. If you already have a Linux and swap partition you want to use/overwrite, then skip this. The installer only offers Linux partitions, not vfat or ntfs.


Step 2

Login as root in your LiveCd. Run:

# livecd-install


You are guided graphically through the install process. At the end you will be given the choice to write the bootloader to / of the installed system or to the mbr, default is /. Choosing / would mean that you need to boot your main system and modify your mbr bootloader. My lilo-example for an added entry:


append="devfs=mount splash=silent"


More informations about the mklivecd project, screenshots of the hd installer, mailing lists and archives and more:




Jaco Greeff is the developper of these scripts :-)))

Edited by Tuxiscool
Link to comment
Share on other sites

Update: Part 2


1. There is an easier way to build the cvs version, building rpm's, Jaco suggested to add the following to the HowTo:


>Instead of building the rpm version with the normal make and install, I

>would suggest that you add the "make rpm" command in your FAQ. Eg.

>instead of doing a "make && make install", do a "make rpm && rpm -Uvh



>This builds an RPM which you can install and upgrade as you get newer

>versions from CVS. (It also makes it much easier to uninstall ;) This

>works for both the mklivecd and livecd-utils packages.




Thanks, Jaco!


2. When you are building your LiveCD with the --keyboard=<whateverhere> option, and only in this case, there is a problem installing it later, because lilo is not written properly. No problem running the livecd though. Workaround at the moment: choose install lilo to / (not mbr) and modify lilo on your main system. You'll find an example above in Part 2.

As mentioned it works fine when you create your livecd with the default us keyboard layout.

Link to comment
Share on other sites

  • 1 month later...

Hi, this is greate :)

But I have little a question. When I install MDK in the target partition, if I install nVidia driver, will this work on other video cards ot will work only on nVidia cards.

Also what resolution I have to set before making the ISO file?


10x in advance



Edited by Tuxiscool
Link to comment
Share on other sites

@Icobgr: I have no experience with an installed nvidia driver. I'd suggest: just build the iso, and see if it works.

PCLinux OS has ati and nvidia drivers - it works for some people, for some it didn't.


Your cd will start, running a hwdetect-script, and will set up automatically the detected hardware. Without the nvidia driver it will choose generic drivers which come with a standard MDK installation.


Good luck!


--anna (a hardware noob)

Edited by Tuxiscool
Link to comment
Share on other sites

  • 1 month later...

Part 3: mklivecd with Mandrake 10.0 CE


Hard times for Mandrake LiveCD builders - the developer is MIA since weeks, the scripts are partially broken with 10.0 and Kernel 2.6.x.


Here my temporary workaround.


- A Mandrake 10.0 CE installation. Kernel: 2.6.3-4mdk (on CD 1)

(different kernels like 2.6.3-7 or the tmb-kernels don't work for me!)


- From 10.0 contrib you need: busybox, squashfs-tools, cloop-utils, libsmokeqt, Perl-QT, mediacheck.

From CD 1 you need the file /Mandrake/mdkinst/usr/bin/perl-install/install_any.pm.gz, copy it over to:



- I've changed the mklivecd scripts so that they are working for me. Had to replace the hwdetect with an older version, had to add a line in the livecd-install script. (Thanks to Ross Merlin from the livecd-users list)


- The iso builds fine. When starting the CD there might be a few messages warning about already mounted partitions or about USB hubs - but in fact everything is working fine. Hardware which is not supported by 10.0 CE and his kernel 2.6.3-4mdk will probably not work.


- The livecd-install has one problem: the option to format the partition where one want to install is broken. - Solution: format the desired partition before you start the script and uncheck 'format'. Then everything works. I made two install tests today. The created fstab is a bit weird - with supermount and a few not matching entries. But no big problem.


- I've made a tar.gz including: (my) mklivecd-rpm, (my) livecd-install script (copy it to /usr/sbin), the file install_any.pm.gz, and all needed rpm's from contrib. It's 2,1 MB. You can get it here:




Link to comment
Share on other sites

  • 2 weeks later...



Thanks for making available all your findings!


I have attempted using both 9.2 and 10, unfortunately both were without success. I got closer with 10 - making the iso it went a bit wonky at the end with the md5 business. However the iso seemed ok. On boot up it got half way before a kernel panic.


I am more interested in getting 9.2 going. I am puzzled on two counts.


1. Where to find the cvs tarball file for mklivecd utilities- it doesn't seem to be present at:



2. Which kernel is satisfactory - the kernel mentioned above for using with 9.2 is no longer available. What kernel is likely to be ok?


I did try making the iso with your 9.2 instructions and the standard 9.2 kernel. The iso built ok but on boot up just after the start I got a blank screen.


Any suggestions on where to go would be appreciated.



Link to comment
Share on other sites

Hi Tony,


For 9.2.: The ftp mirror structure for Mandrake changed, you'll get all the contrib stuff for 9.2 here:




incl. the kernel-tmb-


For the cvs tarball - yes, not available for weeks now, dunno why. You have three options:


- 'check out' the source files the normal cvs way, you have to install cvs for this on your pc.

- Work with the (outdated, but working!) rpm, that is available at berlios.de.

The berlios server is down at the moment, so I can't give you the URL now, just start at


and navigate to the sites, the rpm is under 'released files', similiar the cvs sources

- Try the rpm I made for 10.0, see my former posting, part 3


My experience with kernel panic on my livecd's: it has always been the wrong kernel version! In 10.0 you do need the 2.6.3 -4 mdk (not the 7 !), and if you installed two kernel-versions then you have to point to the right kernel when building the cd:

# mklivecd --kernel 2.6.3-4mdk --blala --blah my.iso

(uname -r to see the kernel you are running)


Good luck to you!

I'll out of town for the next 3 weeks, and won't be able to help more :-C

Link to comment
Share on other sites

Even though out of town . . . the 10.0 has progressed but on booting now hangs at "Activating swap partitions". I see there is someone with a similar problem at the live-cd users list.


Thanks for your suggestions - 9.2 is not happening at the moment, using the kernel-tmb-

causes a kernel panic on my 9.2.1.



Well, a response came back on the live-cd users list.


At the boot prompt type: livecd noscsi and YES it booted fine.


And it is all so good. Thank you Anna for putting together the above howto and your help.


Next I will explore installing back to HD!



Link to comment
Share on other sites

  • 7 months later...

Update on the HowTo for Mandrake 10.0:



Building a LiveCD with Mandrakelinux 10.0 OE


Step 1

* Install Mandrakelinux 10.0 Official on one / partition, 3 - 5 GB, that depends on your needs. Make sure you have enough RAM and/or SWAP. Example: I am building a ~300 MB iso off a 700 MB big installed system, got 256 MB RAM and a big SWAP partition (but 250 MB SWAP might be enough). Make sure you have the syslinux rpm installed: # urpmi syslinux

Extract the file install_any.pm.gz from your first mdk install cd (/Mandrake/mdkinst/usr/bin/perl-install) to /usr/lib/libDrakX


Step 2

* Make your system as small as possible. You iso is limited to 700 MB, your system should not extend 1,8 GB. Better start with a pretty small installation.


Step 3

* Add contrib (for 10.0) to your urpmi sources.


Step 4

* Install the kernel-tmb-2.6.7-2.tmb.6mdk-1-1mdk.i586.rpm on your system. You can find the rpm on the *contrib 10.1* ftp mirrors.


Step 5

* Install the latest stable mklivecd scripts for 10.0, the version is 0.5.8-1mdk, get them here: http://developer.berlios.de/project/showfi...p?group_id=1149


The mklivecd rpm contains the scripts for building your livecd, the livecd-utils rpm is only needed if you want to implement a harddisk installation in your LiveCD. Use urpmi to install the rpms, it will take care of the dependencies, you have added contrib to your urpmi sources, don't you? And you might need CD 4, if you don't have it, just add also the /main ftp tree to your sources!


Step 6

Clickup a console. Get root. Run: mklivecd --help

The command to build your iso is as simple/enhanced as you want.


# mklivecd myown.iso

# mklivecd --verbose --kernel 2.6.7-2.tmb.6mdk --resolution 800x600 --fstab=rw,auto --splash=no --keyboard=fr --usbhome rain.iso

The script takes care of compressing the files and building a bootable image, and will cleanup after it is done.


Step 7

Burn your iso. Have fun. - Problems? Read the mailing list archives of the mklivecd project.


(these steps only work on a Mandrake 10.0 system. For 10.1, please read the mailing list)



A HowTo for Mandrake 10.1 will come the next weeks.

The howto can also be found on my website:




Link to comment
Share on other sites


  • Create New...