Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 09-29-2003, 05:31 PM   #1
LQ Newbie
Registered: Aug 2003
Posts: 5

Rep: Reputation: 0
custom bootable iso with my own kernel?

how would i go about making a slackware 9.1 (or any version) install disk, with my own compiled kernel on it? I'd like my kernel to be booted instead of the default bare.i kernel.
does the kernel need to be uncompressed?
do i need to do anything else to get the boot-loader to recognize it?
how do i build the revised iso? (and make it bootable)


-- i want a 2.6.0-test6 kernel so that i can install to a SATA drive on my VIA 8237 southbridge controller...test5 was the first to even recognize the controller.
Old 09-30-2003, 05:33 AM   #2
Registered: Sep 2003
Location: Dallas, Tx, USA
Distribution: Red Hat, Gentoo, Libranet
Posts: 98

Rep: Reputation: 16
I am not even going to attempt to cover everything on this subject. It's way too big for one post.

I'm going to mention a couple of places that do that kind of thing (build bootable CDs), and give a rough outline of how you'd do what you're talking about. I'd much rather answer questions about specific steps that try to write one massive "how-to" on the subject in a post here.

First, the two places to check out: and . Those aren't the only two, by any means, just the ones I'm familiar with. They make a good starting point. Prowling around their sites (especially Knoppix's forum) should be helpful.

Things you're going to need to know about to do bootable CDs:

syslinux/isolinux -- there are other ways to make a bootable CD, but this is by far the easiest.

mount -o loop -- This will be your workhorse when working with this stuff. If you had an ISO image of your Slackware disk on the harddrive, called /myswr/slackware91.iso you could mount it by "mount -o loop -t iso9660 /myswr/slackware91.iso /loop1" and then see all the files on the CD by cd'ing into /loop1.

If you have the actual CD, this probably seems kind of pointless, but it has two important uses. One, if you've downloaded a CD image, it lets you look at the innards of it before you burn a copy.

Second, it's on disk, NOT on CD, which means you can change it.

Revamping the Slackware 9.1 iso image might be as simple as[list=a][*]Mounting it this way[*]Copying your kernel over their kernel[*]Unmounting it, and[*]Burning the ISO image[/list=a]

If they're using isolinux (or syslinux, two slightly different versions of the same idea, from the same author) there will be a configuration file. It's an ordinary text file, and the layout is pretty simple. That will tell you (if it's not already obvious) what the kernel is.

Continuing on with the list of things it's good to know (the first two were isolinux and mount -o loop, in case I veered too much ), the next one is mkisofs.

This takes a tree and makes an ISO image out of it. You'll definitely need this if you make any extensive changes, because every change you make uses up more space. If you open up that /loop1 file I described earlier and copy a file (like the kernel) into it, when you unmount the file, it's going to be bigger. A fresh ISO image is about as compact as its possible to get. Every new file (whether completely new or a replacement) takes up more space.

The downside to this is you have to have twice as much space.

By the way, I recommend using somebody else's mkisofs command as a model, and work your way through the options, keeping what you want for yours. The option list for mkisofs is pretty ugly (very, very long).

If you do try to play around with either Knoppix or LNX-BBC, you'll need cloop. I recommend avoiding that for starters.

Here's how most bootable CDs are laid out (the ones that don't use cloop):

Isolinux is used to boot with. It has a configuration file which is pretty easy to figure out. It will specify the kernel (all paths are from the root of the CD, if applicable) and probably an initrd file.

The initrd file contains a compressed image of a filesystem, which is loaded into RAM. To see what's in it, copy to someplace (I usually use /tmp), gunzip it, and do another mount -o loop command. This time, the filesystem type (the -t option) is not iso9660, it's (usually) ext2.

The initrd filesystem gets loaded into RAM, and a command/script called /linuxrc is run. This usually finds the real root filesystem, mounts it, does a few other setup activities and turns control over to it.

On an installation CD, the linuxrc script is probably either what does the install, or it calls whatever does after doing some setup.

A couple of gotchas to watch out for:

Until you have your real root filesystem loaded, you can't load modules, so anything you want the kernel to talk to has to be permanently compiled in. Most especially, this includes the iso9660 filesystem and whatever filesystem your root fs is (ext2, ext3, reiserfs, whatever).

I'd add your kernel and a stanza for it to the standard isolinux stuff. That way, you've still got the standard kernel to boot from, if needed. (Hopefully, space is not so tight that an extra meg or meg and a half is going to be a problem.)

Good luck,



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Install ISO: Kernel Panic froedi Slackware 7 08-22-2004 02:47 PM
bootable custom cd DAChristen29 Linux - Distributions 1 07-21-2004 10:56 AM
Question: How to create a bootable install custom ISO? jsokko Linux - Software 6 04-20-2004 07:54 AM
making custom bootable CD out of ISO? slackman Slackware 5 12-01-2003 01:16 PM
custom kernel for ISO CD ??? Bluesuperman Slackware 2 10-17-2003 11:16 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration