Linux.com

Feature: Linux

Creating a custom Linux LiveCD With PCLinuxOS

By Dmitri Popov on April 21, 2005 (8:00:00 AM)

Share    Print    Comments   

LiveCD Linux distributions offer a great way to learn Linux, troubleshoot computer problems, and share Linux with others. Now, with PCLinuxOS, creating a custom LiveCD that meets the exact needs of your family, friends or coworkers has become so easy that almost anyone can do it -- once you know a few simple tricks we'll cover in less than 1500 words, along with a couple of screenshots.
The mklivecd tool, which is used to create a LiveCD Linux, can also be used with Mandrakelinux. However, PCLinuxOS has a couple of advantages that make it better suited for a LiveCD Linux project. First off, PCLinuxOS comes with mklivecd already installed and configured, so you don't have to spend time doing it yourself. Second, the Synaptic package manager that comes as part of PCLinuxOS offers an easier and more fool-proof way of adding and removing software than RPM-based systems. Finally, PCLinuxOS comes on a single CD and offers only a small set of programs by default, which makes it less time-consuming to remove unwanted software packages.

The process of creating your own PCLinuxOS-based LiveCD (also known as remastering) consists of three major steps: 1) installing the system on your computer, 2) customising the installed system by tweaking its settings and installing/removing software packages, 3) creating an ISO image.

Start by downloading the most recent release of PCLinuxOS from one of the mirrors listed on its Web site. Burn the downloaded ISO image to CD, and you're ready to begin the process.

Installing PCLinuxOS

For the sake of simplicity let's assume that you will use the computer's entire hard disk for PCLinuxOS. Before you can boot your computer using the newly created PCLinuxOS, you have to make sure that your PC's CD-ROM drive is set as the first boot device. Usually this can be done by changing settings in BIOS, and the exact steps depend on your computer model and BIOS version. Once this is done, you are ready to boot PCLinuxOS. Start your computer and insert the PCLinuxOS CD in the CD drive.

During the boot you will be asked to log in either as guest or root. Log in as root using root as both user name and password. When the system is finished booting, double-click on the Livecd-Installer shortcut on the Desktop to launch the Livecd-Installer tool.

Before you can proceed with the installation, you have to partition the hard disk using the Disk Partitioner tool. Although the Disk Partitioner button says that this tool is for advanced users, it's actually quite easy to use. Press the button to launch it.

The hda tab contains a graphical presentation of your hard disk. If the disk contains any partitions it's a good idea to delete them beforehand. Simply click on the partition(s) and press the Delete button in the Choose action section. When the disk has been 'cleaned,' you can start partitioning it. PCLinuxOS requires two partitions: one for the swap file (swap partition) and one for the system itself (root partition). Let's start with creating the swap partition. Click on the bar representing the empty hard disk, press the Create button, select the Linux swap from the Filesystem type list, and use the slider to set the partition's size to around 2GB. Click OK. Format the created partition by pressing the Format button.

To create a root partition, click on the empty space on the hard disk bar, press the Create button, select Journalised FS: ext3 from the Filesystem type list, and use the slider to set the partition's size. Click OK. When prompted select the Move files to the new partition option, and click OK. The properly partitioned hard disk should look like the one in figure 1. Press Done to save the changes (choose Yes when prompted to save the /etc/fstab modifications) and quit the Disk Partitioner.
Figure 1 -- click to enlarge
Figure 2 -- click to enlarge


In the PCLinuxOS Installer click the "Next" button, and make sure that the dialogue window looks like the one in figure 2. Press Next, check the settings, and press Next again. At this point the PCLinuxOS Installer proceeds with the installation of the system on your hard disk. Make yourself a cup of tea and watch the progress bars. When the installation is complete, click "Next" and select where to install the bootloader (the Master boot record of the drive is a good bet). If you want to enable logging, then press Activate. This will keep logs of system messages and errors for troubleshooting purposes. Finally, add a new root password, delete the guest account and create a new user account. If you want to reboot the system immediately after the installation is complete, select the Yes, reboot my system automatically now option. Press Finish when done.

Customising PCLinuxOS

When the system is installed and you have rebooted your computer, you are ready to customise PCLinuxOS. As with any Linux distribution, you can customise virtually every aspect of PCLinuxOS, and your options are limited only by your imagination and level of expertise. On the most basic level you can easily modify the look of your system. This can be done through the KDE Control Center, which allows you to change the background picture, windows appearance, overall theme, splash screen and Screen Saver among other things.

Changing the default theme can really make your own version of PCLinuxOS stand out. KDE-Look.org provides a wealth of background pictures, icons and themes for you to try. (If you are looking for an especially nice-looking theme, you might also want to try Nuvola.)

To install the theme, download it, launch KDE Control Center, go to the LookNFeel > Theme Manager, and press the Install New Theme button. Select the downloaded tar.gz file, and press "OK." This will install the new theme, and you can activate it by pressing the "Apply" button.

If you want to take your customisation a step further, you can update your system and install/remove software packages. PCLinuxOS comes with APT -- one of the best package management tools available for GNU/Linux. The first thing you need to do is to update the list of available packages. Launch Konsole, become root using the su command, and run the apt-get update command. Then you can upgrade your system using the apt-get dist-upgrade command.

Tip: APT HOWTO will help you to get the most out of this package management tool.

You can also use APT to install and remove software packages. However, PCLinuxOS also includes Synaptic -- a graphical front-end to APT, which makes it even easier to manage software. Using Synaptic is easy. To launch it choose "Configuration > Packaging > Synaptic Software Manager" from the "Penguin" menu.

When you start Synaptic for the first time, it prompts you to update the package information. Press the Reload button to perform the update. All software packages are neatly organised in categories, making it easier to locate the applications you want to install or remove. You can, for example, view the packages by category (the Sections button) or by their status (the Status button). You can also search for a particular package by clicking on the Search button. When you've located the desired application, right-click on it and choose the Mark for Installation option to install it, or Mark for Removal to uninstall it. To commit changes click on the Apply icon in the main toolbar, and Synaptic will take care of the rest.

Creating an ISO image

When you are satisfied with the changes and customisations, you are ready to create an ISO image. This is probably the easiest part of the remastering process. All you have to do is to launch Konsole, become root, and enter mklivecd livecd.iso, where livecd.iso is the name of the final ISO image. There is, of course much more to it. You can run the mklivecd tool using a number of options, which gives you more control over the remastering process. For example, using the --nofile or --nodir option you can exclude particular files or directories from the final image, while various boot options allow you to specify how your remastered PCLinuxOS boots. For example, using the --keyboard option you can specify the default keyboard layout, and the --resolution option allows you to define the default screen resolution. You can easily access the full list of option using the mklivecd --help command.

Dmitri Popov is a freelance writer whose articles have appeared in Russian, British, and Danish computer magazines.
Dmitri Popov is a freelance writer whose articles have appeared in Russian, British, US, German, and Danish computer magazines.

Share    Print    Comments   

Comments

on Creating a custom Linux LiveCD With PCLinuxOS

Note: Comments are owned by the poster. We are not responsible for their content.

What makes Synaptic better than URPMI?

Posted by: Anonymous Coward on April 21, 2005 09:46 PM
Surely PCLinuxOS is based on Mandrake anyway, so what's so great about synaptic compared to URMPI?

#

Re:What makes Synaptic better than URPMI?

Posted by: Anonymous Coward on April 22, 2005 12:30 AM
I hate urpmi. It almost works, though is clumsier in my mind than apt-get, and when it doesn't or breaks, or gets confused about data sources and which things are on a cd vs should be fetched remote, it's a real mess to untangle. For example, i have had mandrake systems that failed with the message "no such release exists", even sometimes newly installed ones from genuine release cd's. I love Mandrake (now Mandriva) overall, but would much prefer the rpm apt tools which behave the same as Debian apt, to urpmi, any day.

#

Re:What makes Synaptic better than URPMI?

Posted by: Anonymous Coward on April 22, 2005 04:03 AM
I cannot get urpmi to work in mdk.

#

Re:What makes Synaptic better than URPMI?

Posted by: Anonymous Coward on April 22, 2005 12:40 AM
As far as I know, urpmi is only available on one major distribution -- Mandriva. However, there are very few distributions which don't use apt/synaptic. So, it's more of a "standard." Not saying that they can share binaries, but if you learn it on one distribution, you can usually use it on another.

BTW, PCLinuxOS is an RPM-based distribution. It just uses apt to resolve dependencies. Somewhat ironically, apt-for-rpm was primarily developed by the Connectiva half of Mandriva.

#

swap partition size

Posted by: Anonymous Coward on April 22, 2005 04:12 AM
select the Linux swap from the Filesystem type list, and use the slider to set the partition's size to around 2GB.


Is there any advantage to using a 2GB swap partition as compared to the old rule of 2 x RAM size, which in my case is much smaller? Is there a noticable performance difference?

#

Re:swap partition size

Posted by: Anonymous Coward on April 22, 2005 04:24 AM
The 2GB swap partition is for remastering the cd. If you aren't planning on remastering the cd, then 2 x RAM size works just fine.

#

HD install size

Posted by: Anonymous Coward on April 22, 2005 05:30 AM
What must the HD install size be kept to so that you remaster on to one CD?

#

Re:HD install size

Posted by: Anonymous Coward on April 22, 2005 05:35 AM
The same as the swap partition size: about 2 GB.

#

Re:HD install size

Posted by: Anonymous Coward on April 22, 2005 07:45 AM
A large swap partition makes the iso build faster.

#

Re:HD install size and some tips

Posted by: Anonymous Coward on April 23, 2005 02:27 AM
How big can the installion size be so as to be compressible to a =700MB iso.
Texstar says doing df should report 1.9GB or less.
I got a 560MB iso with df reporting 1.6G and a 600MB iso with df reporting 1.7GB (bordering on 1.8GB) so compression seems close 3:1 overall.
I use CDRW discs to avoid coasters, and it seems they can take a 700MB iso but I have yet to try that size.

The swap partition does need to be 2GB or so, and I found<nobr> <wbr></nobr>/tmp needs 1.5GB or more also.

The remainder comment is offtopic but could be useful if you are like me with a lowly PC with only 256MB ram, integrated graphics & do dial-up.
My 600MB iso is a p8 upgraded to KDE3.4, plus KOffice and a GNOME 2.10 desktop but traded off Nvu, Gaim, Gnomemeeeting, Xpdf and some other forgotten stuff.

PCLinuxOS p8 iso seems fairly optimally mklivecd'd to me ?? and just about runs in 256MB. However when you remaster with mklivecd defaults, 256MB is very very tight to run your new iso. So if you have only 256MB, you must use --nodir to exclude guest & or username accounts and also exclude<nobr> <wbr></nobr>/var/cache/apt/archives if apt/synaptic uses it.

During bootup of your new iso, if you don't have enough ram, you will get multiple 'insufficent write space errors' as it tries to build the directory structure in ram and it dumps you at a login or a runlevel prompt.
Users with integrated graphics might try reducing any bios setting for integrated video mem & rebooting.

Some tips to reduce iso size

1) Its worth cleaning up stale data in All accounts before remastering ie empty all web browser caches, delete stale<nobr> <wbr></nobr>.directorys for removed pkgs, image browser thumbnails etc.

2) If you set Apt/Synaptic to cache downloads in<nobr> <wbr></nobr>/var/cache/apt/archives etc then use -nodir to exclude this cache from mklivecd. Subtract this cache size from the df reported size.

3) To roughly learn the installed size of apps, go in synaptic and set its options to reveal install size & download size then view installed pkgs sorted by install size. Mark a biggish candidate pkg for removal then check yes for all its dependant / related pkgs to be also marked. Review descriptions for all the marked pkgs and only if they also seem unwanted then hit toolbar apply button. View the total size you could recover and then cancel if you think there's not enough return or proceed the removal.

4) Dial-up users should enable Synaptic to cache downloaded files (in<nobr> <wbr></nobr>/var/cache/apt/archives) incase you need to experiment and reinstall a removed downloaded pkg. But remember to -nodir the cache and remember to subtract the cache size from df.

Brian Nugent

#

Re:HD install size and some tips

Posted by: Anonymous Coward on April 23, 2005 03:48 AM
Thank you for the helpful comments. I was the poster above originally asking about HD install size. I think I have been running into problems with the cached install files - had not included them as -nodir.

I also stumbled on another option to remaster using Amarok Live CD which is a music based live CD based on PCLinuxOS. It has a minimal KDE install plus the music. But it is much smaller to start with and can be easily upgraded to latest KDE (130Mb?) and have specific programs added to it.

#

Re:HD install size and 2 more tips

Posted by: Anonymous Coward on April 23, 2005 05:07 AM
A tip I forgot to mention above is probably vital for 256MB systems and perhaps even 512MB PCs. I found this gem on the PCLinuxOS forums when searching for mklivecd

Edit the<nobr> <wbr></nobr>/usr/share/mklivecd/linuxrc file
& replace line 66

RAMSIZE=1000000 # default ramdisk size

    with
RAMSIZE="$(expr $TOTALMEM / 3)" # default ramdisk size

Also I've found that apps like the media player Totem that use mru (most recently used) files/folder info is preserved by mklivecd. I think it is tidy to find & deletede all this cruft data even if its not sensitive.

Brian Nugent

#

Re:HD install size and some tips

Posted by: Anonymous Coward on April 23, 2005 05:29 AM
Also before burning a CDROM, if you have more than a 256MB system, try (as root ?) qemu mynew.iso
to test booting your new iso. qemu doesn't boot my new iso very far in my 256MB PC so I just reburn a CDRW.

Brian Nugent

#

Bootsplash tip?

Posted by: Anonymous Coward on April 24, 2005 03:40 AM
Thanks again for the above comments. If you are still checking here I am wondering if you have any suggestions on the bootsplash. When I include "splash=yes" I get "bootsplash not found in<nobr> <wbr></nobr>/tmp/initrd.gz". Are you familiar with how to sort this?

Also are you aware of any howto pages on remastering using mklivecd. I know about the lists but that is hard to sift through and a lot is a bit technical for me.

#

Re:Bootsplash tip?

Posted by: Anonymous Coward on April 24, 2005 03:37 PM
Hav'nt tried the bootsplash option so I will try that shortly.
While just doing a remaster (which I'm right now running from), I did examine the temp mklivecd.#### dir in<nobr> <wbr></nobr>/tmp and saw the generated text file listing all excluded directories.<nobr> <wbr></nobr>/tmp was excluded which I think is sensible but that would seem to defeat finding initrd.gz there.
I see a initrd.gz in my CDROM's isolinux folder.

Try the PCLinuxOnline forum as it has very helpful people & I think mklivecd will be a popular subject now. I googled mklivecd & found the home site livecd.berlios.de to have minimal info and is a very early work in progress. The other links either pt to other similarly named projects or rehashes of the home site.

Brian

By the way if you use GNOME, --nodir<nobr> <wbr></nobr>/etc/gconf sinces its about 24MB!.

#

hardware detection

Posted by: Anonymous Coward on April 22, 2005 10:44 PM
So does the makelivecd command put in drivers for other computers?

I'm just wondering, if I make the install on an old Gateway pII, will it have the drivers for a new Dell computer with completely different nic and video card.

#

Re:hardware detection

Posted by: Anonymous Coward on April 23, 2005 03:54 AM
Yup, you should end up with a CD that will boot and run on almost any hardware.

#

Re:hardware detection

Posted by: Anonymous Coward on April 23, 2005 05:20 AM
Yes I 've done this just fine. However if mem is only 256MB on other machines, you will need to follow some tips in my replies to post above 'HD install size'.
Even then your new iso could seem quite slower than the P8 iso.

Brian Nugent

#

For Small Live CD - go with DSL (Damn Small Linux)

Posted by: Anonymous Coward on April 24, 2005 12:16 AM
Fits on a 50MB Credit card size CD. Very portable and fast on the boot up with the needed web browser, email client, etc...

Does anyone know how to remaster DSL so that your preferances are saved to CD as well?

#

Re:For Small Live CD - go with DSL (Damn Small Lin

Posted by: Anonymous Coward on April 24, 2005 12:59 AM
I've played with DSL, Puppy & Austrumi and they are each excellent 50MB distros that run very fast in ram. I don't recall about remastering DSL but you might like to know about Puppy's unique way.
It aks to save all its changes back to the next CDROM session as you exit Puppy so it prompts you to pop the CDROM back in, if you want. This can be done about 99 times per CDROM.


  Fvwm95 is used by Puppy & Austrumi and Puppy's app selection range is fairly comparable to DSL's.

Brian Nugent

#

Creating a custom Linux LiveCD With PCLinuxOS

Posted by: Anonymous [ip: 59.93.8.206] on September 15, 2007 08:54 PM
thanks for ur excellent article...ur indepth knowledge and easy to follow language is very clear from ur article..i was wondering if u would share ur linux knowledge in this orkut community about pclinux?
http://www.orkut.com/Community.aspx?cmm=37586510

#

Creating a custom Linux LiveCD With PCLinuxOS

Posted by: Anonymous [ip: 80.248.105.241] on February 07, 2008 11:39 PM
How about user name and password, does remastered CD allow creating new user on install so my current username/password wont work?
I have added now all themes and styles to my test user account and customized KDE and i have installed all applications what i want and removed what i dont need.

Now if i run this remaster to CD, does i have samekind CD what allows installing, then set new user name and password and then that is by default on desktop what i have set?

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya