MCNLive - Live USB :: HowTo


dot

????????



cat


No scripts available for Mandriva 2008

Currently there are no mklivecd scripts available to work on Mandriva Linux 2008.

Live CD/Live USB based on Mandriva 2007.1 Spring

Included in MCNLive 'Delft' and 'Toronto": graphical remaster-on-the-fly wizards to create your own Live system!
We can't make it any easier.
The command line, however, gives you more power. Terminal, su, and type: mklivecd --help
Get more tips on the running 'Delft', opening a default browser window.

Live CD/Live USB based on Mandriva 2007 pic


The mklivecd scripts (cvs version and those on the MDV contrib mirrors) don't work on Mandriva 2007. There is no active development of these scripts for Mandriva.
The fastest way to build a live system is to use MCNLive Cherbourg or VirtualCity (it includes my personal tweaked version of mklivecd) as a base and to build a remastered iso. This can be done on-the-fly while running MCNLive from CD or USB stick, or after an hard disk installation. Please note that the method of hardware detection has changed, also the cheatcodes. Find out more on the running MCNLive.

From the remaster-on-the-fly howto, included on MCNLive Cherbourg and VirtualCity:

You can remaster the LiveCD or the LiveUSB on-the-fly, while running in live mode without installing to HD first.
* You need enough RAM. How much depends on the new .iso file you wish to create. For a 400 MB LiveCD 512 MB RAM should be enough. A Linux swap partition (automatically detected and activated when you run MCNLive) would help here too. You need A hard disk with enough free space to build your new live system. The partition needs a Linux filesystem. Update: It was reported that you can also use a partition with a NTFS (after remounting it read-write) filesystem for the build process.

* Start the LiveCD or LiveUSB. Don't use the copy2ram bootcode. Open a terminal window. Find out which partition on the harddisk you want to use for the build process by typing: mount
Remember where it is mounted, for example: /mnt/hda5
Find out how much space is left on the partition by typing: df
It is useful if your chosen partition has a /tmp directory. Just create it if it is missing.

* Change your running Live system, add software, uninstall programs, change settings. When you are done close all running applications except a terminal.
* Open a terminal, get root in the terminal by typing: su
Enter the root password: root
* Assuming that you have chosen the partition hda5 which is mounted at /mnt/hda5 and a /mnt/hda5/tmp directory is available, you would start the remaster-on-the-fly with the following command:

mklivecd --verbose --root=/union --tmp=/mnt/hda5/tmp /mnt/hda5/live.iso

This will build a file live.iso on /mnt/hda5, without any initial bootsplash, the build process will be done at /mnt/hda5/tmp. You can watch the build process in the terminal window. The build time will be between 7 - 30 minutes depending how much you added, how much RAM you got and and ...

Another example with the default graphic isolinux bootsplash from MCNLive (the files are in /home/guest/):

mklivecd --verbose --root=/union --tmp=/mnt/hda5/tmp --bootmsg myboot.msg --bootkey F1=help2.msg --bootkey F2=myboot.msg /mnt/hda5/live.iso
(it is ONE line !!)

* Remaster MCNLive after installation on a hard disk
It is also possible to install MCNLive first on your harddisk, with the graphical Wizard 'draklive-install'. Boot the system, make your changes, get root in a terminal and run:
mklivecd --verbose live.iso
(without bootsplash)
or:
mklivecd --verbose --bootmsg myboot.msg --bootkey F1=help2.msg --bootkey F2=myboot.msg live.iso
(with MCNLive graphical bootsplash)

For questions please visit our forum at Mandrivaclub.nl.


LiveCD based Mandriva 2006

You can try the latest mklivecd.rpm from the livecd project at developer.berlios.de

Update: Create a LiveCD with Mandriva Limited Edition 2005

The basic steps remain the same - just scroll down to 10.1. Here some changes.

Building a LiveCD based on Mandrakelinux 10.1 Official

This step by step HowTo describes how you can master a LiveCD from an installed system. You should be familiar with: doing basic works on command line, setup additional software sources on a Mandrake system, using 'urpmi' to install and remove software.

0. Mastering a LiveCD requires a minimum of 256 MB RAM and in addition a swap partition. 250 MB should be enough if you create a small LiveCD ( ~ 300 MB ), go for 2 GB if you are planning a bigger system.

1. Install a clean Mandrakelinux 10.1 Official on one / partition. Don't forget the swap partition. Install the available official updates. Don't install nvidia or ati drivers.

2. Keep your system simple, and: keep it small. Start with a used space of 800 - 900 MB, this is a full featured KDE system. 'df' is the command to control the used space on your harddrive. Take your time to uninstall (Mandrake Control Center) all unneeded software. A default Mandrake installation includes a lot of stuff that you can safely get rid off. And if urpmi complains about dependencies and wants to uninstall too much, you may want to experiment with: rpm -e --nodeps. That will erase single packages.
Configure the 'look and feel' of your graphical environment. The LiveCD will look the same.
Make sure that /etc, /home, /lib, /root, /var is not too big. Otherwise you'll be running out of RAM when starting the LiveCD. Examples: Don't put many (already compressed) video or music files into your home directory. Don't have two kernel versions (/lib) installed. Clean or uninstall your urpmi databases in /var/lib/urpmi.

3. Add 'contrib' and 'main' to your urpmi software sources. Install the 'kernel 2.6.7 tmb' from 'contrib' on your system. (MCC) The default kernel 2.6.8 won't work on a LiveCD!

[added] After installing the kernel, as root edit /etc/lilo.conf : in the append line for the new kernel, add: devfs=nomount. Save the changes, and run as root: lilo -v

Reboot with your new kernel, make sure you are running it: uname -r. Uninstall the default 2.6.8 kernel, again reboot.

4. The next step is to install the mklivecd scripts that will build your .iso file. If you want to include an installer into your LiveCD you also need the package livecd-utils.rpm. Get it here

5. Clickup a console. Get root. Run: mklivecd --help
The command to build your iso is as simple/enhanced as you want.
Examples:
# mklivecd myown.iso
# mklivecd --verbose --resolution 800x600 --fstab=rw,auto --splash=no --keyboard=fr rainbow.iso
The script takes care of compressing the files and building a bootable image, and will cleanup after it is done.
Burn your iso. Have fun.

6. If you are running into problems, please read the archives of the livecd-users mailinglist at berlios.de, or even better, join the list.

7. Some notes on Kernel problems with Mandrake 10.1 OE. To build a LiveCD with the mklivecd scripts the kernel has to be patched with squashfs. The default Mandrake 10.1 kernel (2.6.8.1) has the wrong, not working patch! And the 2.6.8 kernel has broken append options! You can use the 2.6.7 tmb kernel from contrib. It's working fine. If you want a newer kernel version (2.6.9 or 2.6.10), you need to patch and compile your own kernel. More info on the users-list or on the irc channel #pclinuxos (efnet), where you can talk to the developers of the mklivecd scripts.

8. When building your iso, you can specify a standard keyboard layout. Default is the US keyboard. Later on your LiveCD you can use a cheatcode (keyb=fr) to alter the layout. If you want an easy way to change the keyboard while running the LiveCD, you need to edit the file '/usr/lib/libDrakX/Xconfig/xfree.pm ', before building your iso. Lines 25 and 71, change the resp. 'keyboard' to 'kbd', that will load the correct keyboard driver.

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/showfiles.php?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.
Examples:
# 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. livecd.berlios.de (these steps only work on a Mandrake 10.0 system. For 10.1, please read the mailing list)

Mandrakelinux 9.2.: Make your own Linux Live CD

Step 1
Install a 'basic' Mandrake 9.2 - on a separate partition. Choose individual package selection, concentrate on one Desktop Environment, KDE or Gnome or a light one. Or install as the only OS on your PC, does not matter. You will need 'one' ~5 GB partition. And a swap partition, you can use your already existing swap. 250 MB is the minimum swap, it's ok, when you plan to create a small Live CD. More swap will speed up the creation process. Your RAM is also important, minimum 256 MB! 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, choose 'menustyle' - second choice: Mandrake Menu. Save it. Now you won't get the menu bug and you don't have to install all the updates.
Get the following rpm's from a Mandrake 9.2 ftp/contrib mirror:
- kernel-tmb-2.4.22.21.tmb.1mdk-1-1mdk.i586.rpm
- busybox-1.00-0.4mdk.i586.rpm
- cloop-utils-1.02-1mdk.i586.rpm

Get the latest stable version of mklivecd- scripts (mklivecd-0.5.7-0.cvs.20031118.1mdk.noarch.rpm) here: developer.berlios.de Install the kernel on the new partition, using the softwaremanagement tool. Uninstall the old kernel. Reboot and make sure everything is ok. Install the rpms busybox, cloop and mklivecd on your new partition.

Step 3
- Remove all stuff using the Mandrake Control Center, 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 directory. 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=pt --fstab=rw,auto --splash=no livecd.iso

Explanation:
--verbose
You can see in your console window, how the sript is working. Very nice!
--keyboard=de_nodeadkeys
Default is the US layout, so this is your keyboard for the LiveCD.
--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 partitions, exception is 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.
livecd.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 directories 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'. Then you need to tell the script where it can find the 'root' directory of the system which will get compressed, for example:
--root /mnt/spiel
The mountpoint of course must exist, and the partition has to be mounted before running your script.
How long does it take: on a Pentium 4, 2 Ghz with 256 MB RAM and a swap of 250 MB it took 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 a cd-r. Or copy it to a different partition where you have your burning application.

Step 7
Boot your cd.

Step 8: Add a graphical installer to your Live CD
You need to learn:
- how to work with CVS versions
- how to work with sources and build them
- to figure out which additional software und which kernel is required to use this version
You will find the information usually in the archives of the mailing lists of the developer:
livecd.berlios.de Read the archives carefully. If you are stuck, subscribe to the list and ask for help.

© 2007 - www.mcnlive.org