Create a Linux boot CD using isolinux cbsi China · pchome Editor: Jiang Haiming 2006-11-24
In the past, many boot disks used the loadlin-guided Linux kernel mode (for example, early slackware ). That is, start with Win98 dos and use loadlin to guide our own Linux kernel and unlock our Installation File System.
However, with the diversity of hardware models we have come into contact with, some new devices cannot use DoS (or Win98) boot.
At this time, many people will use syslinux to create a boot disk. However, syslinux usually needs to be able to put the kernel and file system on a floppy disk. If our file system is large, we can't cut it down, that's terrible. Or if you want to select multiple kernel/file systems when the disc is started, syslinux is quite troublesome.
I finally found that the isolinux is still good and can support large file systems.
There are not many articles on the Internet about isolinux. Below are some of my attempts:
Step 1:
Make a Linux kernel. This is not a topic I want to discuss. Articles about Linux kernel creation can be found everywhere on the Internet. For example, we have prepared a bzimage.
The process of creating a file system is not discussed in this article. In this case, we have compiled a file system color.gz.
Find the isolinux tool that we need to guide. Specifically, it is isolinux. Bin isolinux. cfg, which is derived from the rh10 ISO image. :)
The preparation is complete.
Step 2:
Create a directory for your ISO image as the root directory of the ISO (that is, the root of the CD), such as myiso/
Under the established directory, create an isolinux directory (this name seems to be fixed, but it must have it. Once I did not create this directory, the result-guided system cannot detect interruptions normally, I don't know why. I am depressed for one night)
Then put isolinux. cfg and isolinux. Bin under the isolinux directory.
In the isocontent directory, place the content included in the optical disk, including bzimageand color.gz.
The rest is that you can put everything you want.
At this time, the directory structure is created. As follows:
Myiso
|
| --- Isolinux
|
| --- Isolinux. Bin
| |__ Isolinux. cfg
| --- Bzimage
| ---Color.gz
| --- Readme
.
Step 3:
Configure isolinux. cfg
The format of isolinux. cfg is similar to that of Lilo. conf grub. conf:
Prompt 1
Timeout 100
Default myiso
Label mysio
Kernel/bzimage
Append initrd =/color.gz load_ramdisk = 1 prompt_ramdisk = 0 ramdisk_size = 60000 RW root =/dev/Ram
If you don't want to wait, you can remove prompt and timeout. Otherwise, you need to click it during startup, Which is troublesome.
Step 4:
Now that everything is done, we can generate our own ISO image.
Run the mkisofs command in Linux:
Mkisofs-O myiso. iso-B isolinux/isolinux. Bin-C isolinux/boot. Cat-no-emul-boot-load-size 4-boot-Info-Table myiso
You can use man for specific parameters.
The above steps are successfully verified under linux2.4.
Suggestions:
If our color.gz can be very small and can be put on a floppy disk together with bzimage, we can use the more common syslinux boot disc. There are a lot of syslinux online usage. You can look at it when it is useful.
For the usage of isolinux, see:
Http://syslinux.zytor.com/iso.php