<p>Can anyone point me to a good tutorial on creating a bootable Linux CD from scratch?</p>
<p>I need help with a fairly specialized problem: my firm sells an expansion card that requires custom firmware. Currently we use an extremely old live CD image of RH7.2 that we update with current firmware. Manufacturing puts the cards in a machine, boots off the CD, the CD writes the firmware, they power off and pull the cards. Because of this cycle, it's essential that the CD boot and shut down as quickly as possible.</p>
<p>The problem is that with the next generation of cards, I have to update the CD to a 2.6 kernel. It's easy enough to acquire a pre-existing live CD - but those all are designed for showing off Linux on the desktop - which means they take forever to boot.</p>
<p>Can anyone fix me up with a current How-To?</p>
<hr />
<h3>Update:</h3>
<p>So, just as a final update for anyone reading this later - the tool I ended up using was &quot;livecd-creator&quot;.</p>
<p>My reason for choosing this tool was that it is available for RedHat-based distributions like CentOs, Fedora and RHEL - which are all distributions that my company supports already. In addition, while the project is very poorly documented it is extremely customizable. I was able to create a minimal LiveCD and edit the boot sequence so that it booted directly into the firmware updater instead of a bash shell.</p>
<p>The whole job would have only taken an hour or two if there had been a README explaining the configuration file!</p>

[{'answer_id': 33133, 'author': 'Ryan Guest', 'author_id': 1811, 'author_profile': 'https://Stackoverflow.com/users/1811', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://www.howtoforge.com/ubuntu-linux-mint-livecd-with-remastersys" rel="nofollow noreferrer">Creating Your Own Custom Ubuntu 7.10 Or Linux Mint 4.0 Live-CD With Remastersys</a></p>\n'}, {'answer_id': 33171, 'author': 'Misha M', 'author_id': 3467, 'author_profile': 'https://Stackoverflow.com/users/3467', 'pm_score': 1, 'selected': False, 'text': '<p>Depends on your distro.  Here\'s a good article you can check out from <a href="http://lwn.net/Articles/172132/" rel="nofollow noreferrer">LWN.net</a></p>\n\n<p>There is a book I used which covers a lot of distros, though it does not cover creating a flash-bootable image.  The book is <a href="https://rads.stackoverflow.com/amzn/click/com/0132432749" rel="nofollow noreferrer" rel="nofollow noreferrer">Live Linux(R) CDs: Building and Customizing Bootables</a>.  You can use it with supplemental information from your distro of choice.</p>\n'}, {'answer_id': 33261, 'author': 'Jörg W Mittag', 'author_id': 2988, 'author_profile': 'https://Stackoverflow.com/users/2988', 'pm_score': 2, 'selected': False, 'text': '<p>There are a couple of interesting projects you could look into.</p>\n\n<p>But first: does it have to be a CD-ROM? That\'s probably the slowest possible storage (well, apart from tape, maybe) you could use. What about a fast USB stick or a an IEE1394 hard-disk or maybe even an eSATA hard-disk?</p>\n\n<p>Okay, there are several Live-CDs that are designed to be very small, in order to e.g. fit on a business card sized CD. Some were also designed to be booted from a USB stick, back when that meant 64-128 MiByte: <a href="http://DamnSmallLinux.Org/" rel="nofollow noreferrer" title="Damn Small Linux">Damn Small Linux</a> is one of the best known ones, however it uses a 2.4 kernel. There is a sister project called <a href="http://DamnSmallLinux.Org/dsl-n/" rel="nofollow noreferrer" title="Damn Small Linux - Not">Damn Small Linux - Not</a>, which has a 2.6 kernel (although it seems it hasn\'t been updated in years).</p>\n\n<p>Another project worth noting is <a href="http://grml.org/" rel="nofollow noreferrer" title="grml">grml</a>, a Live-CD for system administration tasks. It does not boot into a graphic environment, and is therefore quite fast; however, it still contains about 2 GiByte of software compressed onto a CD-ROM. But it also has a smaller flavor, aptly named <a href="http://grml.org/faq/#whatissmall" rel="nofollow noreferrer" title="grml-small">grml-small</a>, which only contains about 200 MiByte of software compressed into 60 MiByte.</p>\n\n<p>Then there is <a href="http://Morphix.Org/" rel="nofollow noreferrer" title="Morphix">Morphix</a>, which is a Live-CD builder toolkit based on <a href="http://Knoppix.De/" rel="nofollow noreferrer" title="Knoppix">Knoppix</a>. ("Morphable Knoppix"!) Morphix is basically a tool to build your own special purpose Live-CD.</p>\n\n<p>The last thing I want to mention is <a href="http://MachBoot.Com/" rel="nofollow noreferrer" title="MachBoot">MachBoot</a>. MachBoot is a super-fast Live-CD. It uses various techniques to massively speed up the boot process. I believe they even trace the order in which blocks are accessed during booting and then remaster the ISO so that those blocks are laid out contiguously on the medium. Their current record is less than 6 seconds to boot into a full graphical desktop environment. However, this also seems to be stale.</p>\n'}, {'answer_id': 33343, 'author': 'Joshdan', 'author_id': 1990, 'author_profile': 'https://Stackoverflow.com/users/1990', 'pm_score': 3, 'selected': True, 'text': '<p>One key piece of advice I can give is that most LiveCDs use a compressed filesystem called squashfs to cram as much data on the CD as possible.  Since you don\'t need compression, you could run the mksquashfs step (present in most tutorials) with -noDataCompression and -noFragmentCompression to save on decompression time.  You may even be able to drop the squashfs approach entirely, but this would require some restructuring.  This may actually be slower depending on your CD-ROM read speed vs. CPU speed, but it\'s worth looking into.</p>\n\n<p>This <a href="https://help.ubuntu.com/community/LiveCDCustomization" rel="nofollow noreferrer">Ubuntu tutorial</a> was effective enough for me to build a LiveCD based on 8.04.  It may be useful for getting the feel of how a LiveCD is composed, but I would probably <strong>not</strong> recommend using an Ubuntu LiveCD.  </p>\n\n<p>If at all possible, find a minimal LiveCD and build up with only minimal stripping out, rather than stripping down a huge LiveCD like Ubuntu.  There are some situations in which the smaller distros are using smaller/faster <em>alternatives</em> rather than just leaving something out.  If you want to get seriously hardcore, you could look at <a href="http://www.linuxfromscratch.org/" rel="nofollow noreferrer">Linux From Scratch</a>, and include <em>only</em> what you want, but that\'s probably more time than you want to spend.</p>\n'}, {'answer_id': 43658, 'author': 'Mike Heinz', 'author_id': 1565, 'author_profile': 'https://Stackoverflow.com/users/1565', 'pm_score': 1, 'selected': False, 'text': '<p>So, just as a final update for anyone reading this later - the tool I ended up using was "livecd-creator".</p>\n\n<p>My reason for choosing this tool was that it is available for RedHat-based distributions like CentOs, Fedora and RHEL - which are all distributions that my company supports already. In addition, while the project is very poorly documented it is extremely customizable. I was able to create a minimal LiveCD and edit the boot sequence so that it booted directly into the firmware updater instead of a bash shell.</p>\n\n<p>The whole job would have only taken an hour or two if there had been a README explaining the configuration file!</p>\n'}, {'answer_id': 54403, 'author': 'hendry', 'author_id': 4534, 'author_profile': 'https://Stackoverflow.com/users/4534', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://debian-live.alioth.debian.org/" rel="nofollow noreferrer">Debian Live</a> provides the best tools for building a Linux Live CD. <a href="http://webconverger.com" rel="nofollow noreferrer">Webconverger</a> uses Debian Live for example.</p>\n\n<p>It\'s very easy to use.</p>\n\n<p>sudo apt-get install <a href="http://packages.qa.debian.org/l/live-helper.html" rel="nofollow noreferrer">live-helper</a> # from Debian unstable, which should work fine from Ubuntu</p>\n\n<p>lh_config # edit config/* to your liking</p>\n\n<p>sudo lh_build</p>\n'}]
['https://Stackoverflow.com/questions/33117', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1565/']