by July 1, 2005 0 comments



If you’re a security expert, you can’t rest in peace unless you have the right set of tools and know how to use them to assess your network’s security. So we’ve provided a multi-boot DVD with this issue. This is the first of its kind in India containing five hottest penetration testing/vulnerability assessment distros and clustering live Linux distros. Just pop it into your DVD drive and set up your BIOS to boot from it. You’ll get a menu from which you can choose to run any of them, namely Auditor, Whoppix, L.A.S and PHLAK for security and one clustering distro called
ChaOS.

Sounds exciting, doesn’t it? So try it out yourself. We’ll now tell you the process of how you can create such a multi-boot DVD. The consecutive article in the section will tell you how to use these live distros. We’ve kept the article as generic as possible. 

Pre-requisites
You need a machine running Linux with at least 10 GB of free disk space, a DVD writer to burn the final DVD ISO, and ISO images of all the Live Linux distros that you want to compile on the DVD. For creating this DVD we won’t use any third-party or paid applications such as MagicISO or EasyBoot. Instead we will use the standard, GNU tool called
isolinux. 

Direct
Hit!

Applies to: System administrators

USP: Create a multi-boot DVD with live Linux distros of your choice

Primary Link:
http://forums.pcquest.com

Google keywords: Live Linux distros
On PCQXtreme DVD: PCQXtreme DVD

First create a folder for each live distro you have. For instance, if you are creating a DVD for Auditor, PHLAK and Whoppix, create three folders with the name auditor, phlak and whoppix. Then mount the ISOs of the live distros to these folders by issuing:

#mount —o loop /live-distro.iso /blank-folder 

So if your are mounting the ISO of Auditor to a blank folder named auditor, you have to run:

#mount —o loop auditor-150405-04.iso /auditor

This should make all content of the ISOs available to those blank folders. As most CDs are based either on Knoppix or one of its derivatives, you will find the structure of the CDs very similar. You will find two folders-isolinux and KNOPPIX. The folder name KNOPPIX can vary and if it does, it is good because it will reduce some of your work. Now lets try to understand what these folders have. 

isolinux: This folder contains all files that are needed for booting the distro. For instance, it will surely have the following four files-isolinux.bin (the bootloader binary file), isolinux.cfg (the file which contains all the configurations and settings), miniroot.gz (this file has a preliminary ramfs image which has the file called linuxrc that is responsible for the ‘init’ process), and vmlinuz (the Linux kernel file). We’ll primarily deal with these four files only. 

KNOPPIX: It contains the actual file system image that you will see when the system boots up. The image file is generally called knoppix and is an ramfs file system.

Creating the DVD structure
Let’s start building our DVD. For this, you first have to create a blank folder and name it dvdroot. Now ‘cd’ into the folder and create a folder called isolinux inside it. Copy isolinux. bin, boot.msg and isolinux.cfg from any of the distros here. Next, one by one copy the miniroot and vmlinuz file from each distro’s isolinux folder to the /dvdroot/isolinux folder and rename them so that you can identify which miniroot.gz and vmlinuz file belongs to which distro. So for example, if you are copying the files from auditor, rename miniroot.gz as miniaud.gz and vmlinuz as vmlinux.aud. You can call it whatever you want but remember that the name should not exceed eight characters and the extension should not exceed three characters else isolinux won’t be able to recognize the files while booting. Now after you have copied all files, you should have as many vmlinuz and miniroot.gz into your /dvdroot/isolinux folder as many Live distros you are planning to combine into the
DVD.

Modifying the isolinux.cfg
Now open the /dvdroot/isolinux/isolinux.cfg file into any word processor and add the boot parameters for all the distros. The boot parameter should look something like this.

LABEL auditor
KERNEL vmlinuz.aud
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=miniaud.gz nomce quiet
BOOT_IMAGE=knoppix

You’ll get this screen after booting from the multi-boot DVD. Type the name of the distro you want to boot into and hit Enter

Here LABEL defines the name you will pass to call the distro from the boot option of the DVD. KERNEL defines the name of the kernel it will be using for the distro, and ‘initrd’ specifies the name of the miniroot.gz file, which in this case (auditor) is miniaud.gz. If the following set of parameters causes any problem and doesn’t let the distro boot, go to the folder where you have mounted the actual ISO of the distro and open the /isolinux/isolinux.cfg file. Copy the default parameter from there and paste it to the isolinux.cfg file. 

Copying the ramfs
Now you have to copy all the main file system images for each and every live distro to your dvdroot folder. But there will be one problem you will face. In most cases, the name of the file system image and the folder where it resides will be same and that will be /KNOPPIX/knoppix. But, you can’t have more than one file with the same name in a folder. So create a folder for each distro in your dvdroot. For example, if you are adding auditor then create a folder Auditor into your /dvdroot/ folder. Now copy the file system image file mostly called ‘knoppix’ from each distro’s /KNOPPIX folder to the folders you have created for them. Say for Auditor, you have to copy its /KNOPPIX/knoppix file to the
/dvdroot/Auditor. 

Modifying miniroot
Now that you have renamed the folder that contains the file system image, open and modify the linuxrc file for each and every distro. That is, you have to unzip, mount, modify, unmount and gzip all the miniroot.gz files. How is this done? We assume that we are going to modify the miniroot file of Auditor. So the commands will look something like this.

#cd /dvdroot/isolinux
#gunzip miniaud.gz
#mkdir /testmount
#mount —o loop miniaud /testmount

Now go to the /testmount folder and open up the file called linuxrc and search for the line that says 

KNOPPIX_DIR=”KNOPPIX”

Replace “KNOPPIX” with the folder name, which you have given for the distro. For Auditor, the line will be:

KNOPPIX_DIR=”Auditor”

Now save the file and exit and run the following commands to recreate the miniroot.gz file.

#cd /
#umount /testmount
#cd /dvdroot/isolinux
#gzip miniaud

And you are done with the major task and you are just left to give some finishing touch before you create the ISO of the DVD. By this, we mean that you have to modify the boot.msg file so that it can reflect the labels for booting the distros at the DVD boot prompt. For this, open the boot.msg and enter the text labels that you want on the screen. For example, you should have something like this in your boot.msg file-“Type auditor at the boot prompt to boot the machine with Auditor”. 

Making the ISO
The command syntax needed to start the ISO making process is pretty long. To run the command, first go to the /dvdroot folder and type in

#mkisofs —r —N —ldots —d —D —J —V “Multiboot DVD” -b isolinux/isolinux.bin —c isolinux/boot.cat —no-emul-boot —boot-load-size 4 —boot-info-table —x lost+found —o /multiboot.iso .

And after 10 to 20 minutes, depending on your machine’s speed, the multi-boot DVD’s ISO will be ready to burn. 

Now use any of your favourite DVD burning program to burn the ISO and enjoy.

Anindya Roy

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

<