|
Target: add your own kernel and ramfs based on an existing Linux LiveCD
Original LiveCD: install-amd64-minimal-20130711.iso (gentoo)
Working System: CentOS
1. Copy the contents of the original LiveCD:
[Root @ localhost Downloads] # mkdir / mnt / livecd
[Root @ localhost Downloads] # mkdir / mnt / img
[Root @ localhost Downloads] # mount -t iso9660 -o loop install-amd64-minimal-20130711.iso / mnt / livecd /
mount: / dev / loop0 is write-protected, mounting read-only
[Root @ localhost Downloads] # cp -r / mnt / livecd / * / mnt / img
2. Switch to the / mnt / img, look at / mnt / img following.
[Root @ localhost img] # ls
gentoo.efimg image.squashfs livecd README.txt
gentoo.efimg.mountPoint isolinux
3. ramfs own kernel and put into isolinux folder. Here is the kernel bzImage, ramfs is ramfs.tar.gz
[Root @ localhost img] # ls isolinux /
boot.cat elilo.efi F4.msg F7.msg isolinux.bin memtest86
boot.msg F2.msg F5.msg gentoo isolinux.cfg ramfs.tar.gz
bzImage F3.msg F6.msg gentoo.igz kernels.msg System.map-gentoo
4. Modify isolinux.cfg, add a boot (which append that one, may need to be increased or decreased according to their parameters):
label hello-test
kernel bzImage
append root = / dev / ram init = / linuxrc initrd = ramfs.tar.gz
5. Go back img, make your own iso file
mkisofs -R -b isolinux / isolinux.bin -c isolinux / boot.cat -o /tmp/test.iso -V "test Linux" -no-emul-boot -boot-load-size 4 -boot-info-table .
6. The test.iso directly with the virtual machine, or burn down, entering the start screen, press the TAB key, you can see the hello-test this one, enter it and start |
|
|
|