Custom Rpms

How to create a custom boot image on cd for OpenNA



Synopsis
The reason I choose to use this method instead of using another distro was because I liked how the OpenNA install gave me a complete working enviroment specific for say, a mail server or whatever.

What I wanted to accomplish was install OpenNA on a server that need a raid controller driver which was not included on the cd's boot disk kernel.
I got considerable help from an email posted to the mailing list to get this working.
We will assume that system A is your OpenNA Workstation, and B is the server you will use to test. The thing that matters with the workstation is that what you compile is compatible with the OpenNA distro in terms of the gcc version and etc.

Howto see all the setup files
1. Mount OpenNA disk1 iso via loopback on system A e.g. mount -o loop /root/openna-i686-disc1.iso /mnt/cdrom2
2. Create a temporary directory e.g. /tmp/openna
3. Copy the CD into this new directory e.g cp -pr /mnt/cdrom/* /tmp/openna/.

How to's
There are some things to think about:
o Make a new kernel with your hardware drivers or modules compiled in.
o Change the setup script to detect your cd drive if needed and to be able to find your hard drive parttion listing.
o Create a new cd and test it.
Miscellaneous Items:
o Try Debian
o Want an Open Source Phone system on linux!


Make a new kernel:
If you look in the isolinux folder you will see a file called "vmlinuz". This is the kernel that boots when you boot the cd. You need to create your own monolithic kernel with the right drivers compiled in for your hardware.
What you can do for this is download the kernel source from kernel.org. Unzip it: bunzip2 linux-version.tar.bz2
Untar it: tar xvf linux-version.tar.bz2
Move to its folder: cd linux-version
make your config: make menuconfig
(There are other ways config or xconfig but I like this one best.)
Be sure to select the network, harddrive, and cdrom drivers amongst the others.
Remember this kernel will only be used on the first boot for your install.
After you have your config done make the kernel image: make
When it finishes it tells you where the bzImage is. Move this to the openna/isolinux folder and name it vmlinuz.
When you burn your cd (see below) you will be booting with the kernel you just made.

Changing the setup scripts.
This may be the most difficult. However, it can be done.
The scripts are acually quite simple. And you have two options here.
1. You can skip this step for now, make your cd, and then after booting
your new cd before issuin the setup comand, edit the setup script that needs to be changed. 2. Change the script file before making the cd.
If you want to make the change permanent, than making it here makes the most sense.
First you need to get access to the script files:
1. Copy /tmp/openna/isolinux/initrd.img into /tmp/initrd.gz
2. Gunzip this file e.g. gunzip /tmp/initrd.gz
3. Mount this file via loopback e.g. mount -o loop /tmp/initrd /mnt/tmp
4. Change into the setup directory e.g cd /mnt/tmp/usr/lib/setup
Now you are ready to look around in this folder and change whatever needs changed. I had to change the partions script file and make the lines that had fdisk on them say fdisk /dev/sda. I just added the /dev/sda part. You will need to do some trial and error to figure out what needs to be changed for you.
Note: If you get the message saying install does not recognise your setup cd,
this is where you can change the setup script so that it will look at the right device.
Assuming you are done with these script file changes:
Once all the files have been edited the boot image needs to be unmounted and re-compressed. 1. cd /
2. umount /mnt/tmp
3. gzip /tmp/initrd
4. Now the image needs to be out back into the CD structure: cp /tmp/initrd.gz /tmp/openna/isolinux/initrd.img

Burning the new cd
Assuming you have made the changes to your openna cd, now you need to make a new cd.
Change to openna folder: cd /tmp/openna
Create iso: mkisofs -o ../new_openna.iso -V 'Custom Kernel - OpenNA 1.0' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -l -R -J -V -T .
Change to one folder back: cd ..
Make your cd: cdrecord -v speed=4 dev=0,0,0 new_openna.iso (check with cdrecord -scanbus for your device id)
 
Contributed OpenNA Rpms
Original OpenNA Rpms



Debian
Due to the fact that OpenNA is not being updated, I am going to suggest an alternative os:
Don't want to burn your own cds? Try Debian.
Why Debian? Debian is constantly updated, easy to install, no custom cd need for Dell.
It does not have all the security applied like OpenNA, but there is no reason you could not install debian and then go back and use the Openna compile directions ets. If you want, you can use apt-get update;apt-get dist-upgrade and your system can be always fully up to date.
Debian Installer
Installation tips
Host your own Debian mirror, and your installs/updates are a snap
Debian allows you to install for example the testing version. The testing version can be constantly updated. You use apt-get to update your workstation or server.
Apt-get Tips for Debian



Open Source Phone System
Free fun opensource pbx or phone system for your business or home. It works fine on OpenNA or Debian.
Includes conference bridging, does call center call routing, full logging of calls, recording of calls, callerid munipulation, music on hold, works with softphones, analog phones, or ip phones. Has more than 8000 people on the mailing list.
Help is available via mailing list, irc, or you can get commercial help from digium.com.
Asterisk Linux phone system - Asterisk.org
All about how to use asterisk - Voip-info.org

Your comments are welcome about this page: 80 at ekn.com

$Id: openna.php 2115 2007-12-28 16:53:56Z tech $