LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to create a CD bootable ISO image for 2.6.16 kernel (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-a-cd-bootable-iso-image-for-2-6-16-kernel-651443/)

vb_sridevi 06-24-2008 11:23 PM

How to create a CD bootable ISO image for 2.6.16 kernel
 
I have created a kernel image for 2.6.16 kernel.
using that kernel I want to create a bootable CD.



But the problem is I dont know exactly what all components I need to set up the file system.


I created

root, etc, bin, sbin, proc, var, lib directories.


can anyone help me how to set up this file system, what are the necessary files I need to put in these file systems.

Steps I followed are


mnt=/tmp/mnt
floppy=fimg
blocks=50000
fstype=vfat

cd_ia64:
mkdir -p ia64_build ia64_build/initrd.tmp $(mnt)
# Creating the initrd image
dd if=/dev/zero of=initrd.img bs=512 count=225000
/sbin/mke2fs -F -N 10000 initrd.img
mount -o loop initrd.img $(mnt)

Created and mounted a initrd image




I NEED what all things I need for the initrd image to come up...



Setting up the boot loader :elilo





touch $(floppy)
chmod 644 $(floppy)
# zero the entire disk, so that when we compress the raw disk image,
# unused blocks will compress well
# info "making loop filesystem in $floppy, size ${blocks}k"
dd if=/dev/zero of=$(floppy) bs=1k count=$(blocks)
# info "formatting and conditioning the new image"
mkdosfs -r 112 -F 16 $(floppy) $(blocks)
# mount the disk image to install additional files
# info "mounting new disk image at $mnt"
mount -o loop -t $(fstype) $(floppy) $(mnt)
mkdir -p $(mnt)/efi/boot
# install kernel
cp /home/sridevi/usr/vmlinuz-2.6.16.60-0.6-default $(mnt)/efi/boot/linux.bin
# info "copying root filesystem ($rootimage) into filesystem"
mv ia64_build/initrd.img $(mnt)/efi/boot/initrd.img
# info "installing boot loader"
dos2unix -n /home/sridevi/elilo.conf elilo.conf
cp /boot/efi/efi/SuSE/elilo.efi $(mnt)
cp $(mnt)/elilo.efi $(mnt)/efi/boot/
mv elilo.conf $(mnt)/efi/boot/elilo.conf
mv $(floppy) ia64_build/rescue.bin
umount $(mnt)
# Creating the ISO Image
mkisofs -v -T -no-emul-boot -V HPSMST -allow-lowercase -r -D -l -b rescue.bin -c boot-cat -o bootcd1.iso ./ia64_build
rm -rf ia64_build






I NEED what all things I need for the initrd image to come up...



Please help me

win32sux 06-25-2008 01:32 AM

Why don't you just let the mkinitramfs command do it for you?

vb_sridevi 06-25-2008 03:46 AM

Thanks
 
I dont have mkinitramfs installed in my machine, I am downloading it.

i have a question, mkinitramfs will create a image right ?, i need not create a initrd image or i should add the mkinitrmfs image to this initrd image ?

vb_sridevi 06-25-2008 07:13 AM

I have doubt exactly how this mkinitramfs works.
 
I have doubt exactly how this mkinitramfs works.

once i execute mkinitramfs from command prompt where the image will be created.

win32sux 06-25-2008 01:47 PM

Yes, it creates the whole ramdisk image for you. You basically just need to tell it which modules you want it to have (if you read the manpage or do a quick Google you'll lean how to use it fast). What distro are you using? I would think this was a standard part of pretty much any distro, and you are probably much better-off using a distro-supplied version.


All times are GMT -5. The time now is 05:37 AM.