Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Automatically Installing Linux from Bootable CD?

Cliff posted more than 10 years ago | from the insert-wait-and-go dept.

Data Storage 85

phorm asks: "While there are newer many distributions of linux that come bootable from CD, I've found that some are a bit difficult to customize and wonder how hard it would be to create my own. Currently we are looking at replacing some of our Windows desktops at work with Linux test-machines - and it would be nice to make the installation process as simple as possible. How hard would it be to create a bootable CD that would automagically install Linux onto the first detected hard-drive? How would you go about 'imaging' an existing machine to use as the base? I suppose that in many cases a tar-gzip of the entire OS would work, provided you could partition the drive correctly, recreate some important handles as in /proc, and run lilo/grub to install a boot loader. Does anyone here have experience with this? I know morphix/knoppix make nice bootable distros but what I really want is a basic Linux bootCD which installs a preconfigured version of the OS of my choice."

cancel ×


Sorry! There are no comments related to the filter you selected.

FP! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7925512)

holy crap! NEONS ROOL!

Re:FP! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7925519)

Ya beat me Ya Bastard!

Knoppix (4, Informative)

lortho (700090) | more than 10 years ago | (#7925546)

The Knoppix [] live CD distro comes with a script for installing to the hard drive that works pretty well, just go to a root console after booting off the cd and type 'knx-hdinstall'. It probably wouldn't be too hard to customize the disk so that it does this automatically.

Re:Knoppix (1)

shaitand (626655) | more than 10 years ago | (#7935423)

how is this +5 informative when the ask slashdot poster specifically said he is aware of knoppix and he's not looking for a livecd?

Re:Knoppix (1)

decepty (662114) | more than 10 years ago | (#7936258)

because it's the first post in this thread that isn't a troll and people with mod points are lazy?


Anonymous Coward | more than 10 years ago | (#7941244)

Poster said he was aware of Knoppix and it doesn't fit his needs.

Ghost (2, Informative)

Webmoth (75878) | more than 10 years ago | (#7925550)

Symantec/Norton Ghost works very well for mirroring drives.

However, you may have issues when it comes to differing hardare in different machines, and all your boxes will have the same hostname and IP address.

Re:Ghost (1)

Webmoth (75878) | more than 10 years ago | (#7925563)

I forgot to mention that some versions of Ghost allow you to create a bootable recovery CD of your system at a given state.

Read the license agreement, you may need to purchase the correct Ghost license for what you aim to do; the off-the-shelf variety typically allows you to only use it on ONE computer system.

Re:Ghost (4, Insightful)

ottawanker (597020) | more than 10 years ago | (#7925566)

..and all your boxes will have the same hostname and IP address. Or, you could use DHCP.

Re:Ghost (3, Insightful)

Oriumpor (446718) | more than 10 years ago | (#7925729)

On imaged systems, it's a bad idea for them not to access the network on first boot.... that means legwork after the image process. I would recommend configuring a DHCP client (with DHCP assigned hostname.)

For me, this is all I need, as each machine can be assigned statically via the DHCP server.

Still, IMO Kickstart is a much better methodology. Still better is PXE controlled kickstart mini-distros.... (Ala Ghost/Image Blaster Image partitions.) But I have yet to see someone do this.

Re:Ghost (1)

DA-MAN (17442) | more than 10 years ago | (#7926902)

You can use PXE and kickstart for the best of both worlds.

Re:Ghost (1)

cperciva (102828) | more than 10 years ago | (#7929219)

I would recommend configuring a DHCP client (with DHCP assigned hostname.)

That's a great idea. Install your machines from a CD automatically, have them boot, connect to the network via DHCP, and get rooted before anyone even logs in.

Re:Ghost (1, Insightful)

Anonymous Coward | more than 10 years ago | (#7936345)

Well I sure hope I keep a clean shop, if the attacker could get through both sets of firewalls and the guy was already in your DHCP server you're in a lot more trouble than just having a few workstations rooted.

Re:Ghost (2, Informative)

jsse (254124) | more than 10 years ago | (#7926072)

How about a Linux solution? Mondo []

Re:Ghost (1, Informative)

Anonymous Coward | more than 10 years ago | (#7929591)

remaster a small version of knoppix called damnsmalllinux

partimage from d*mnsmalllinux with a big partimage master image copied on the cdr/dvdr+-whatever.

you could tweak a bash script like below to setup your various partitions and restore them. MBR can be set also in partimage. though you need similar hardware

# get hard disk size
hd=`sfdisk -s /dev/hda`
#need the hd's MB
mbs=`expr $hd / 1024`
# remove all partitions
dd if=/dev/zero of=/dev/hda bs=512 count=1
# make a label for the disk
parted -s /dev/hda mklabel msdos
# repartition the drive

parted -s /dev/hda mkpart primary 0 $mbs

####################TWEAK HERE for MBR AND PARTITIONS

# set boot flag on
parted -s /dev/hda set 1 boot on
# make an xxxxx container for Partimage

# mount cd to get image file zart from your CD
mount -t iso9660 /dev/sr0 /mnt/cdrom
# run Partimage master is the image file
partimage -b -f3 restore /dev/hda1 /mnt/cdrom/zart.000

# cp reboot from cd
cp /sbin/shutdown /tmp
# Eject the CD
cdrecord -eject dev=0,0,0
# reboot /tmp/shutdown -nr now

I use something similar to restore Windows boxen.

Gentoo can do it (3, Informative)

Apreche (239272) | more than 10 years ago | (#7925573)

The gentoo livecd is high quality. And on any gentoo system you can emerge the tools used to create the livecds. Create your own custom livecd and go at it. Of course knoppix and such can do it, but the knoppix installer is very primitive and set in stone. By making a custom gentoo livecd you can actually make the system the way you want it to be.

Re:Gentoo can do it (2, Insightful)

nathanm (12287) | more than 10 years ago | (#7925984)

I'm a very happy Gentoo user myself, but I can't imagine an installer much more primitive than Gentoo's. And from the original questions, it sounds like creating the custom livecd would be much more complicated than they're asking for.

Re:Gentoo can do it (0)

Anonymous Coward | more than 10 years ago | (#7933655)

your thinking that lack of gui == primitive, it doesn't. I have problems with most distro's due to them failing to pick up my hardware, I've never had this problem with gentoo, and that goes back to pre 1.0 releases.

Re:Gentoo can do it (0)

Anonymous Coward | more than 10 years ago | (#7934551)

Uh, the whole point of Gentoo install process is to be primitive so that only Real Studly Nerds (ha) can use it.

Re:Gentoo can do it (1)

nathanm (12287) | more than 10 years ago | (#7935959)

your thinking that lack of gui == primitive, it doesn't.
No, I mean primitive in the sense that a Gentoo install is mostly instructions to manually setup your system. The only installer more primitive is Linux From Scratch [] . Before I discovered Gentoo, I installed an LFS system once. Imagine Gentoo without portage, what a pain.

Check support databases (4, Informative)

MrResistor (120588) | more than 10 years ago | (#7925575)

I found this [] with a simple search of Suse's support database. I just skimmed it, but it seems to lay out the whole procedure. I'm sure your distro of choice has a similar page. While I haven't tried this myself, I know people have been doing it with Red Hat and Mandrake for years.

Re:Check support databases (1)

wik (10258) | more than 10 years ago | (#7935537)

AutoYaST is an excellent installation system. For our compute cluster, I have a CD with roughly 6MB of bootstrap code on it. It's hard-coded to ask our web server for an XML AutoYaST configuration file and install the machines with the packages and configuration files that we want.

The documentation for AutoYaST is a bit hard to find, but everything works well. You might want to learn a bit about rolling your own RPM packages.

You will, of course, be stuck with SuSE if you do that. I've been quite pleased with the distribution, so I don't think of this as a drawback. :)

Kickstart (5, Informative)

baywulf (214371) | more than 10 years ago | (#7925576)

You can do this with Redhat Linux (or Fedora.) It is basically a utility called kickstart that creates a configuration file that you can place onto the cd or a floppy. Then when the install takes place, it will automatically make choices based on the configuration file.

Re:Kickstart (2, Interesting)

hdparm (575302) | more than 10 years ago | (#7926016)

This probably isn't much of an issue anymore on FC1 and RH9, as it was with older releases but to achive completely unattended install, good idea would be to trial normal (of the CD) one and get entries for detected hardware and desired packages to be installed. This way file /root/anaconda-ks.cfg (created by installer and available after first reboot) can be almost entirely reused, with only alteration required for the line describing install method (change cdrom to whatever type of network install would happen). Also if one figures that some hardware is not detected properly, manual changes can be done and ks file entries changed accordingly as well.

Google (2, Funny)

tsa (15680) | more than 10 years ago | (#7925596)

Maybe /. should have an 'Ask Google' next to 'Ask /.'

Re:Google (3, Funny)

dotgod (567913) | more than 10 years ago | (#7927559)

What is this "Google" you speak of?

Re:Google (3, Funny)

tsa (15680) | more than 10 years ago | (#7928537)

Maybe you should Ask Slashdot!

Re:Google (0)

Anonymous Coward | more than 10 years ago | (#7936931)

score "Funny"? score Troll! the guy is asking a question in a developing area that /. readers are particularly suited to answer, and are particularly suited to learn from the posts themselves. just look at the answers that are being generated here. you would get nothing like this from google.

"Ask Google" whiners (1)

tepples (727027) | more than 10 years ago | (#7941202)

Most users who whine in "Ask Slashdot" articles that the submitter should have "Asked Google" instead do not bother to link to a useful query. Not all Slashdot users can always form a Google query that returns relevant results in the first 30.

For god's sake... (0, Flamebait)

Phleg (523632) | more than 10 years ago | (#7925639)

...just doing a search on Google for linux bootcd [] gives you several locations for the "bootcd" package, which, conveniently enough, makes a bootable image of your installation.

Re:For god's sake... (5, Insightful)

lortho (700090) | more than 10 years ago | (#7925884)

Come on, people, enough of the 'just search Google, n00b' mentality - I mean, sure, any one can go search Google for "custom linux boot cd" and get a hundred possible options, just like anyone can search the yellow pages for a doctor and get a list of a hundred names; But people post questions here to see what experiences real, tech-savvy people have had with potential solutions, much like one might ask friends/family members about their experiences w/ certain doctors, in order to make a more educated decision. So next time you see a question like this, don't scorn the poster for wasting your time - be flattered that they have come to seek your personal expertise!

Re:For god's sake... (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7926386)

You're new here, huh?

Re:For god's sake... (1)

TwistedSquare (650445) | more than 10 years ago | (#7931496)

I know I'll get modded redundant if anything, but.. you're right!

Thank you (2, Interesting)

phorm (591458) | more than 10 years ago | (#7931769)

"Google" answers are always annoying, nice to see somebody put the google trolls in their place.

Indeed, they are trolls for if they had read the question, they would have noted that I have looked at both knoppix/morphix and found them not quite what I wanted (so obviously I have been checking around before slashdot). Freshmeat has some projects too, some of which I've tried, but none of them quite did what I want either (some came close though).

Google is a great resource for generic information. Slashdot is a better resource for asking people with experience in what is a "good" solution as opposed to a "possible" one. Thanks for the support.

Re:Thank you (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7932326)

>Indeed, they are trolls for if they had read the question, they would
>have noted that I have looked at both knoppix/morphix and found them
>not quite what I wanted (so obviously I have been checking around
>before slashdot).


This isn't your personal help desk. We don't owe you an answer.

Re:For god's sake... (1)

charlieafrid (654116) | more than 10 years ago | (#7934828)

You the man...a very well thought and very educated answer.....

Re:For god's sake... (0)

Great Malinko (594745) | more than 10 years ago | (#7934869)

Ahh, We welcome the "Newcomers" with open arms. Since when, were "We" supposed to be nice to them?

Mepis!!! (4, Interesting)

mabhatter654 (561290) | more than 10 years ago | (#7925641)

You want Mepis [] It's a knoppix-based Live CD distro that works as both a live CD and an installed distro. It's designed with a few of the Knoppix kinks worked out so that the LiveCD can "help" the installed version out when their's trouble...perfect for corperate environments. Also, it's based on you can always get your favorite stuff if you get bored/ need special configs!

Re:Mepis!!! (2, Interesting)

QuantumG (50515) | more than 10 years ago | (#7926117)

I just bought a copy, I'm that impressed. This is truely the way installation should be done. No crappy half working X11 in 16 colours. No half-assed mouse support. And best of all, I can keep using my computer during the installation.

Mondo Works for me. (4, Interesting)

madstork2000 (143169) | more than 10 years ago | (#7925652)

Try Mondo Rescue / Mindi []

It can create a bootable CD image. Essentially, it can be used to clone/backup a harddrive. I use it to setup a customized distro. Using the recue CD your "install" image can be put on bare hardware and be up in running in less than 20 minutes. If you are using a distro with KUDZU, after the first boot it will recognize your hardware.

I have been very pleased thus far, it has allowed me to build "base" configuration of dedicated servers and quickly migrate data and test new hardware.


Don't use CDs (5, Informative)

hbackert (45117) | more than 10 years ago | (#7925687)

If possible, use the network. If those PCs have PXE to boot from, that is by far the easiest and customizeable way to install lots of Linux machines. Using RedHat's kickstart, I can install a basic server in about 5 minutes, plus 5 minutes to configure everything for that machine. It's thus faster than CD and easier and easy to customize. No need to burn a new CD.

Re:Don't use CDs (1)

Bazzargh (39195) | more than 10 years ago | (#7926341)

Mod parent up, doing this with CDs would be painful and time consuming. I used to work at a facility managing firewalls worldwide for a multinational, our requirements for regular machine resets weren't all that dissimilar from a testbed (although on a larger scale) - and this is exactly how it was done.

Another alternative to consider, which especially considering your mixed environment, might be better for you, is virtualization - e.g. using VMWare as described here [] . This avoids the need to image the machine entirely.

Re:Don't use CDs (1)

Glonoinha (587375) | more than 10 years ago | (#7930435)

I run RH9 in a VMware guest machine (VMware Workstation 4) - I love it.

Notes :
I got the GL drivers in RH8 working fine under VMware but when I installed RH9 something ended up broken and they don't work. I assume responsibility for it not working, as I probably screwed something up.
VMware runs better on machines with LOTS of RAM. If you are going to use Gnome in RH9, count on giving the VM 256M plus 256M for your host OS - 512M is a bare minimum for reasonable performance. I recommend at least a Gig, prefer 1.5G to 2G so I can run multiple virtual machines at the same time.
Follow the detailed instructions in VMware for installing Linux - there are a few gotchas. Do it according to the dox, or do it more than once trying to get it right.
Rolling out new machines is about as easy as copying 8 files to the new machines (over the network, DVD, I really don't care how you get them onto the new machine) and starting the new VM full screen. Installing VMware is a snap too, takes about a minute or two.

Re:Don't use CDs (2, Interesting)

larien (5608) | more than 10 years ago | (#7932547)

Yup, one of the best things about Suns systems is that once you have a jumpstart server set up, installation on a client is simply stop-A, boot net - install. You then walk away, come back later (anything between 30 minutes and a few hours, depending on hardware config and number of patches) and you've got a fully configured server.

The main advantage of a network install of anything is that a config change to the installation image is as simple as modifying a file (or files) on a network server; with a CD, you have to change the file, burn the CD and test. If the change doesn't work, you've got a coaster.

Re:Don't use CDs (1)

gr8fulnded (254977) | more than 10 years ago | (#7935103)

You may or may not know this, but a little timesaver. You don't even need to go to the console and Stop-A the box.

root@clientbox# reboot -- "net - install"

and it'll reboot with those options, starting the jumpstart automatically.

Mepis (2, Interesting)

Cipster (623378) | more than 10 years ago | (#7925701)

MEPIS [] would be a great choice.
Debian based, runs off the CD and the install consists of double clicking on a shortcut on the desktop, answering 2 or 3 questions and waiting for everything to be installed.

One really quick, dirty way to do it (3, Informative)

dougmc (70836) | more than 10 years ago | (#7925733)

Install a system, configure it the way you want it. Don't install too much stuff, because it needs to fit on a CD.

Once done, boot into single user mode.

tar everything up to *another* disk (mounted here under /mnt) --

cd /
tar --one-file-system --sparse -zcvvvf /mnt/disk.tar.gz /

If that file doesn't fit on a CD with at least 10 MB to spare, remove some stuff and try again. export GZIP=9 might help a bit too.

Get a bootable linux floppy disk image. It doesn't really matter which one, but it does need to have a real filesystem on it (not just a kernel.) Your typical rescue disk will probably work well.

Make a script to install. It'll be something like this --

#!/bin/sh -e
# zero the partition table
dd if=/dev/zero of=/dev/hda bs=1024 count=10
sleep 3
# create a 1024mb / partition
printf "n\np\n1\n+1024m\nw\n" | fdisk /dev/hda
# create the filesystem
mke2fs -j /dev/hda1
# mount it
mkdir /m /n
mount /dev/scd0 /cd
mount /dev/hda /m
# dump your tar.gz file to the new fs
cd /m
tar --totals --preserve --sparse -zxvf /cd/disk.tar.gz
cd /
# (re)install the bootloader
echo "/sbin/grub-install /dev/hda" | chroot /m /bin/sh
# clean up
umount /m
umount /cd
echo "Ok. Time to reboot!"
and then this script will replace /sbin/init on your boot floppy. Of course, if your floppy starts something other than /sbin/init, you'll need to replace that.

Then you'll burn a cd that contains that floppy image as the el Torito boot image, and has that file.tar.gz in the root of the file system.

This is really rough, and will only work properly with rather specific hardware, but it may get you started. Making a proper distribution is a lot more work than this -- I only spent a few minutes typing this out.

I have not tested any of this. In particular, the command to do the fdisking probably has issues -- for example, most boot floppies don't have printf by default (you'll need to add it, or a script to just print all the fdisk commands), and I probably got the order of some stuff in the printf statement wrong (it's a string of commands for fdisk.) And of course it'll happily trash whatever is on your disk with no warning. (Installing lilo rather than grub can be done with a similar procedure if needed.)

But if you're looking for a really quick and dirty way to install lots of identical machines, this may get you started. This is NOT a procedure for anybody who doesn't really understand what all this stuff does and the possible problems -- I just provided it as a first stab at a possible solution under some limited conditions. Note that the general idea can apply to other OSs as well -- I even remember once making a setup that installed OS/2 (off a network share) just like this -- long before Ghost was a gleam in Norton's (or whomever's) eye.

In any event, I'd suggest seeing what Knoppix has to offer -- if, like another poster suggested, they have a script to just install to a disk, that would probably be far better than this hack.

Re:One really quick, dirty way to do it (2, Informative)

dougmc (70836) | more than 10 years ago | (#7925764)

Already, one typo --
mount /dev/hda /m
That would need to mount /dev/hda1 /m, of course. There's probably more typos.

No, I don't really expect anybody to actually do this -- there's already much better stuff out there. But several years ago, before all those smart people solved the problem elegantly for you, this was one way that people would solve problems like this -- with a nasty `one off'.

Re:One really quick, dirty way to do it (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7925979)

Poster 'Doug McLaren' if from Texas...sigh.

Lament. Lament. Americans and Europeans freely give their time, expertise, and experience with only the hope that others may benefit from it.

And, people are moving our jobs to India. India. India. The Indians survive by posting questions to our public forums, feeding off our good will. I would mind not at all if they contributed. But, they don't. They really don't.

Cool hack :) (2, Informative)

korpiq (8532) | more than 10 years ago | (#7926716)

You really make it sound simple. Sure there'll be problems like really getting the image to boot, but a few trials-and-errors should get those right. And a plain approach such as this spells out total control, a pair of words every root should love.

As for the partitioning (printf) problem, I'd save a partition table with sfdisk -d /dev/hda >partitions.txt, and restore it with sfdisk /dev/hda <partitions.txt. If you have clients with different-sized disks, leave a partition (say, /home or /scratch) out, and after running sfdisk do something like

fdisk /dev/hda <<EOT

(notice the two empty lines to use defaults for partition start and end - will use the rest of the disk.)

Also notice that tar --one-file-system already creates the directories (/proc, /usr, ...) to use as mount points for subsequent filesystems, no need to handle them specially. Of course if the original file system consists of several partitions (like a separate /usr or /var) you'll need to run one tar --one-file-system for each of them - spanning several file systems with one tar command will force you to explicitly exclude sources like /proc, /home, /tmp that should not be copied. Whatever suits you best.

Also note that even while files under /var/log and /var/run should not be copied, subdirectories therein should be.

If you choose this 'roll your own dirty solution' I'd like to hear about your experiences.

Re:One really quick, dirty way to do it (0)

Anonymous Coward | more than 10 years ago | (#7941757)

this is what sfdisk is for: it's intended to take
everything from the commandline. i used it with great success in an automated install project a few jobs ago; sfdisk supports the notion of "rest-of-disk", which is really really handy.

Try systemimager (3, Informative)

chriskenrick (89693) | more than 10 years ago | (#7925770)

If you're looking for a "Ghost" like solution, try SystemImager [] . Should work well if your hardware is fairly standardised.

Re:Try systemimager (0)

Anonymous Coward | more than 10 years ago | (#7930327)

I have to second this one. You built your golden client to the specs that you'd like them all to be, then you propagate that image out to multiple machines. If you want to update your image, you make the changes on the golden client, resynch the image on your imageserver, then propagate the changes out to your other clients. Because systemimager uses rsync for the transfer, if you have more than 5 clients, or slow network links this is preferred for updates, since it only transfers the difference between the images, not the whole image.

You can use multiple images of multiple sizes, specifying each client's image via their IP or MAC address, or on a boot floppy. You can boot to install from floppy, CD, or PXE netboot.

Use Kickstart. (4, Informative)

Thalin (130318) | more than 10 years ago | (#7925773)

As a couple other people have said, Kickstart is probably your best option. I work at NCSU and we have a bunch of linux machines. When we need to upgrade or reinstall, we just take a boot cd, pop it in, and let it go. It grabs all the configuration and install files off our kickstart server and goes to town. When it's done, the system reboots and sits at a login screen, no other config required. It's a beautiful thing.

I've done this... (4, Insightful)

.@. (21735) | more than 10 years ago | (#7925830)

I've done something like this for work. Created a custom bootable Linux CD (SuSE 8.2-based), with all the necessary drivers for the hardware it'd run on.

Then, I have an image server elsewhere on the network, full of dd images of various installs. So, when I build a new machine, I simply boot from the CD, and then pipe dd through ssh ("ssh remotehost 'dd if=foo.dd' |dd of=/dev/sda"), and within an hour (they're 18GB images), the new system is built.

I can use the same process in reverse for imaging an existing system (or simply use the ssh-piped dd on a live system), to create the stored images.

I spent so much time rewriting bits of systemimager that I got frustrated. Finally, I ran into hardware systemimager wouldn't support out-of-the-box (devices that only had drivers in 2.4, and SI's 2.2-based), and figured since I was going to have to build a new bootable ROMfs anyway, I may as well make a bootable CD and ditch SystemImager altogether.

Catalyst (4, Informative)

Shwag (20142) | more than 10 years ago | (#7925856)

The new gentoo image creation program, called catalyst [] , does exactly what you are looking for.

I did this with Slackware (2, Informative)

severett (38602) | more than 10 years ago | (#7925908)

Slackware's simple package and configuration setup made this fairly painless.

What I did was modify the initrd ram disk to change the custom setup files. I created my own which partitioned the drive, formatted, and started installing packages.

I modified a couple packages to use defaults the way I liked them, reburned the CD and voila. Perfectly installed systems every time.

Slackware uses shell scripts exclusively so it's quite easy to figure out what happens when.

Re:I did this with Slackware (0)

Anonymous Coward | more than 10 years ago | (#7931428)

The creator of slax, formerly known as Slackware-Live has a section of his website devoted to creating your own live cd for other distros as well as a support forum on his website.

You can check it out at

What distro do you want to use? (3, Informative)

ComputerSlicer23 (516509) | more than 10 years ago | (#7925929)

I've built a RedHat kickstart CD that loads the kickstart file via HTTP of a web server. You can write a pre-install script to massage the disks (using either python or shell, probably anything you want, but python and shell are the only to utilities I know are there, in shell you are limited to mostly busy box utilities).

You can use the redhat-config-kickstart to help you build a default install package set (and to build the kickstart file).

Then you can run a post install script (also specified in the kickstart script). Generally, I always make my pre/post scripts wget the script I really want them to run. This gives me a bit more flexibility. (Actually I've never written a pre-install script, only posts).

In the post install scripts, I've used wget to download the set of scripts/config files I wanted to replace (I recommend using a tarfile that you unpack from the filesystem, use diff to apply patches to all of the config files, or use sed to edit the config files).

From there, it's relatively simple matter of deciding what you want changed and how you want it to work. I generally make sure to install AutoRPM, and the autorpm config files that point to my local package repository. Thus anything I can make into an RPM, I can get deployed onto remote machines in mass. I create one extra AutoRPM package pool for each class of machine, so I can put custom packages by machine type onto each machine.

Either use PXE boot, or boot from CD. The CD image to do a kickstart style install is on the first RedHat CD. Look for the isolinux directory and create your own ISO (if you edit the files to put ks=, then it's completely unattended). Or you can use the prebuilt images in /images, but then you have to fiddle with the command line a bit from CD. I've never done a PXE boot for installation of a machine (used it for building X-terminals, but not for this).


Morphix = modular (2, Informative)

Louis Guerin (728805) | more than 10 years ago | (#7926109)

Knoppix and Mepis are both good, but Morphix seems like it's best suited to this sort of thing. It is designed to be modular, meaning you can *very* easily build an iso to custom requirements. It has solid hardware detection, and has the built-in capacity to execute a script once it's finished booting, so you could write an installer script to install, configure and reboot the box without intervention. Hell, you could even have it apt-get update && apt-get -y upgrade if you wanted.



Look into kickstart (1)

venom600 (527627) | more than 10 years ago | (#7926157)

We use kickstart to image machines all the time.....many, many machines.....and it works great. Once you get an installation you like, you can just use it as a base for everything.

A notice from the modular-livecd guy (1)

AlXtreme (223728) | more than 10 years ago | (#7926396)

I'm working on it, but it isn't top priority. For auto-installing any livecd, you also need to have a tool that automatically partitions your harddisk.

I'm currently pretty busy on a GTK2 partitioner called PartitionMorpher, and it's nearing completion for manual partitioning. the debian-installer guys have been working a lot recently on autopartkit (from SkoleLinux), and it looks like it would be a useful addition to our installer too.

Bottom line: You'll see it sooner rather than later. But I've said that a lot in the past...

Debian: Fully Automatic Installation (2, Redundant)

korpiq (8532) | more than 10 years ago | (#7926581)

FAI ( [] ) is a system that can be used to automatically install Debian on any kinds of different machinery (you define the differentiating classes yourself). Documentation on its site states that "Booting and installing from CD-ROM is in progress" [] .

If you happen to need that level of complexity, maybe you can lend in a helping hand for them to finish that CD-ROM version.

Just thought FAI would deserve to be mentioned here along with all the others. It might very well be overly complex for your purposes.

Not for the newbies (2, Insightful)

Crayon Kid (700279) | more than 10 years ago | (#7926802)

There are many already available solutions from established distro's out there. Use one of them, like the previous posters suggested. Making a custom boot CD to be used for rescue/backup is not exactly easy for a Linux newbie, since it requires a fair understanding of the operating system's inner workings. Sure, there are tutorials and examples out there, that's how I've learned too, but my guess is that in a corporate environment you can't afford to lose time in this manner.

Re:Not for the newbies (0)

Anonymous Coward | more than 10 years ago | (#7935684)

Sorry to be a grammar prig, but the correct usage is distros not distro's.
The collections of files that comprise a distribution does not own anything.
The group of collections is not the possessive therefore we use the plural: distros. If you were referring to some aspect of a distro - such as the boot loader used, you might say: "The distro's default install boot loader is lilo not grub."
Again, sorry to be a bother, but I am seeing this error more and more frequently. I hope that this is not seen as a flame, but more as a way of letting you know that I care about all your hard work and that I want you to look good the next time you use a plural and/or the possessive when putting forward a solution.

Kick Start (3, Informative)

floydman (179924) | more than 10 years ago | (#7926945)

At work we have something around 500 Linux desktops, and almost 1K cluster nodes, all of them are installed using Kisck start(well almost all of them). Very neat and good effort, should try it out.

The important thing.... (2, Funny)

MarkusQ (450076) | more than 10 years ago | (#7928357)

The important thing is how you lable the CD once you've made it. I would recommend something like:

Hands-off raw load

For mature audiences ONLY
Then you won't have to worry (if you leave it laying around) that someone might stick it in their system not knowing what it was.

-- MarkusQ

P.S. If you include X you may want to note that as well.

Try systemrescuecd (1, Informative)

anomaly (15035) | more than 10 years ago | (#7928786)

I've been working on this for work, and have been pleased with the systemrescue cd []

I've got a primary system from which to create my "gold disk." I have installed/configured the OS and third-party applications in a meaningful way.

The process that I've followed is to create an image of the pristine system using partimage (on the rescue CD) and a copy of the boot sector using sfdisk (on the rescue CD) then create installation scripts that rewrite the partition table and dump the image to the hard disk. Finally I created a "gold CD."

One advantage I have is that I can count on pretty consistent hardware.



BTW - God loves you and longs for relationship with you. If you want to know more, please email me.

Sisuite (2, Informative)

prefect42 (141309) | more than 10 years ago | (#7929648)

Sisuite [] Nuff said. It'll do network or CD based installs.

g4u (1)

hubertf (124995) | more than 10 years ago | (#7930796)

Check out g4u at which we use for deploying pre-configured linux harddisk images to various machines (also works fine for windows, solaris, netbsd, ...)

- Hubert

Sysinstall (0)

Anonymous Coward | more than 10 years ago | (#7930898)

Why don't you just use sysinstall rather than messing around with poorly documented shit?

Customising knoppix (1)

HansF (700676) | more than 10 years ago | (#7930991)

Read this.

Have you looked at FAI? (1)

jalspach (688329) | more than 10 years ago | (#7931586)

I have not used it but I have seen a little bit about Debian's FAI []
It looks like it combines a lot of the good ideas from the other suggestions (no CD's required and Kickstart type of install) And, if you combined it with a cache of the packages for apt-get or used the mkdebmirror script, you would also lessen the network load.

-I learned in health class that sig's will stunt yoru growth

Distro, no internet (1)

phorm (591458) | more than 10 years ago | (#7931619)

A lot of interesting suggestions that I'll be checking out, but I thought I'd add some more info to my question.

a) The distro I'm installing is debian. Therefore it would be nice if I could create the bootCD using debian, and having custom bootmenus or at least my own script

b) The CD's will be available for computers that don't have an internet connection. This includes both desktops and/or servers which, while they might be connected to a network, don't always have access to a central server or the internet.

c) Simple is best to start, but once it works I'll probably try to add a somewhat intuitive UI (delay and go auto, or allow options if a key is hit). Preferable debian/stable-again as it would be odd having a RedHat/Suse/etc bootCD to install a debian system. Even the morphix/knoppix UI might be overkill. Perhaps something just similar to debian's own installer, though I've not found out where it comes from.

Any more suggestions/ideas?

Re:Distro, no internet (1)

jalspach (688329) | more than 10 years ago | (#7931895)

I just mentioned it above but, now that I know you are using Debian, it is especially APT (get it? Ha ha ha). Check out FAI . As I said before, I have never used it but it looks like it may be just the thing.

My favorite sig? A sig-sauer.

viral linux (1)

dynamo (6127) | more than 10 years ago | (#7931646)

I've always thought it would be cool if there were a linux distro called viral linux or something similar, that could house a minimal linux system on a floppy, maybe without even a gui, but it did have the ability to install itself onto a random computer when you inserted it and rebooted -- with zero user interaction. Then once booted, every floppy inserted would become a copy of the installer floppy. Whatever would fit on the floppy could also be there to make the system a usable linux box when installed.

Substitute a CD on a computer with a CDR, and you could have a real system there. It's one way to get Best Buy to carry linux.. though the PR would probably not be entirely good :)

I am not seriously suggesting anyone create this beast. I just thought it was an interesting concept, like those parasites that require two or three different host bodies to complete their lifecycle.

Re:viral linux (1)

More Karma Than God (643953) | more than 10 years ago | (#7937525)

In a perfect world one could duplicate every detail of windows but the crashes. The installer would preserve all the user's data and simulate whichever version of windows was installed.

The only thing the user would notice after you put in your Linux disk is the extra stability.

Alas, this world is far from perfect.

Debian/Knoppix? (1)

proberts (9821) | more than 10 years ago | (#7934335)

You mentioned Debian, so how about:

1. Spend 15 minutes learning how to remaster Knoppix.
2. Grab one of the Knoppix installer scripts.
3. Write a post install script if you want to do more.
4. Combine #1 and #2, add #3 to taste.
5. Make lots of copies of the resultant CD.
6. Run around putting it in drives and rebooting.

Alternately, put enough of a thing on bootable media to run netcat and a small copy script, and place an image on a central machine, dd it on to the drive, and then do post-install stuff.


debian.. (1)

Suppafly (179830) | more than 10 years ago | (#7934367)

Make your own debian package that contains as dependancies everything you want installed, then do a minimal install from a netinstall cd or a cd that has the bootfloppies stuff on it and then apt-get install your custom package.

Sci/math custom live cd? (1)

dlakelan (43245) | more than 10 years ago | (#7935704)

Does anyone know of a live CD based on Debian that is oriented towards scientists and mathematicians? For example something that has Octave, Yacas, Maxima, gnuplot, R, LaTeX, Emacs with calc, etc?

I am considering doing this myself from a morphix lite-gui CD but I don't know enough about how to do it yet. The Morphix docs were not exactly straightforward either.

I think making morphix auto install by wiping the first hard drive would be easy though (per the original question)

Re:Sci/math custom live cd? (1)

bmsleight (710084) | more than 10 years ago | (#7944034)

The Morphix docs were not exactly straightforward either.

Alex Treme does all the hard Work on Morphix but, I am trying to keep the Morphix FAQ upto date and have also written a HowTo with the aim of being really easy to follow. []

So any constructive critisism would be helpful, either here or on the Morhphix Forum []



apt-get install bootcd (0)

Anonymous Coward | more than 10 years ago | (#7939886)

scolex@motte:~$ man bootcd

bootcd* - utils to run diskless systems from cd

With bootcd you can copy your running Debian System on CD with the com-
mand bootcdwrite. If your system has no CD-Writer you can build a
bootcd via NFS on a remote System with CD-Writer or you can only create
an ISO image. When you run your system from CD you do not need any
disks. All changes will be done in ram. To reuse this changes at next
boot time you can save them on FLOPPY with the command bootcdflopcp. If
booting from your CD-drive is not supported, booting from FLOPPY is
possible. It is possible to install a new system from the running CD
with the command bootcd2disk. Bootcd2disk can also find a target disk,
format it and make it bootable automatically. Bootcd also supports
parisc/hppa, initrd root fs, devfs and syslinux/isolinux.

bootcd2disk(1), bootcdflopcp(1), bootcdmkinitrd(1), bootcdwrite(1)

Fast Linux Installation 101 (1)

JWSmythe (446288) | more than 10 years ago | (#7947400)

It sounds like you want to do something almost identical to what we've done at my work. We build out servers on a regular basis, and need to be able to get a full OS installed as quickly as possible. We have the total install time, from the time we turn the machine on with blank hard drives, to when it's finished rebooting with a working operating system, down to 5 minutes. I'm happy with our time, so we aren't pushing to get it any faster.

Here's what we do.

I use Slackware, but this will apply to any OS that you'd like, with some changes. Normally, we have two hard drives in the server, one for the OS, and a second for the server's data (web data, mail, databases, or whatever this machine does). As far as this first step goes, this second drive is empty.

Our partitions usually consist of:

/dev/hda1 All available space
/dev/hda2 128Mb swap
/dev/hdb1 server files (empty to start)

Below is a sample of /dev/hda . We don't have a /dev/hdb in this machine, it's just a workstation, but it shows the partition table.

root@master (/) fdisk -l /dev/hda

Disk /dev/hda: 20.0 GB, 20000000000 bytes
255 heads, 63 sectors/track, 2431 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2415 19398456 83 Linux
/dev/hda2 2416 2431 128520 82 Linux swap

1) We take a machine, and do a full install as normal, and do our customizations (adding programs, modifying the /etc/rc.d/rc.* files, etc).

2) We build a bunch of kernels, one for every one of our "standard" installations. There are only 3 or 4 hardware platforms that we end up using, so I build out kernels for each, plus have some generic ones waiting, in case someone asks for a server to be built on some different hardware (can you make my 486/33 a server? Sure.)

3) Make "generic" customizations. That is, make this config generic, so it won't conflict with something else. I change /etc/HOSTNAME to "server", and put in impossible values in /etc/rc.d/rc.inet1. This would be easy enough to replace the value with a script. (cat rc.inet1 ; sed -e s/xNETWORKx/192.168.1/g | sed -e s/xDx/99/g > rc.inet1.temp ; mv rc.inet1.temp rc.inet1). If you use DHCP, you don't even have to mess with this. We don't use DHCP for servers.

--- /etc/rc.d/rc.inet1
#! /bin/sh
# /etc/rc.d/rc.inet1


# Attach the loopback device.
/sbin/ifconfig lo
/sbin/route add -net netmask lo

/sbin/ifconfig eth0 xNETWORKx.xDx broadcast xNETWORKx.255 netmask
/sbin/route add -net xNETWORKx.0 netmask eth0

/sbin/route add default gw xNETWORKx.1 netmask metric 1

# End of rc.inet1

3) When we're sure we are happy with the installation, we just tar it up.

mkdir /orig/
mkdir /new/

mount /dev/hda1 /orig
mount /dev/hda2 /new

cd /orig
tar cvpzf /new/os.tar.gz ./

That'll run for a while. You'll get to watch the filenames roll by.

4) send it over to a workstation that you make CD's on. I have copies of all my ISO's, and the tgz's for future reference, and to download from internally. This lets me figure out mistakes from the past, or make subtle corrections as necessary.

5) prepare to make a CD.

I took <A HREF="">isolinu x</A> from the Slackware installation CD (1st disk of the pack, if you bought it), but I suppose I could have just downloaded it. The one from the Slackware CD works fine for me, so I continue to use it.

I put all my files in /usr/src/os . Put yours wherever you'd like, it's your system. Under /usr/src/os, I have:

root@master (/usr/src/os) ls -al

total 324408
drwxr-xr-x 4 root root 4096 May 12 2003 ./
drwxr-xr-x 35 root root 4096 Jan 10 02:19 ../
-rw-r--r-- 1 root root 4494 May 12 2003 VERSION
-rwxr-xr-x 1 root root 1218 May 12 2003 install.os*
-rwxr-xr-x 1 root root 676 May 12 2003 install.os.only*
drwxr-xr-x 3 root root 4096 Jun 25 2003 isolinux/
drwxr-xr-x 16 root root 4096 Mar 17 2003 kernels/
-rw-r--r-- 1 root root 331814627 May 9 2003 os.v15.tar.gz
-rw-r--r-- 1 root root 498 May 12 2003 raidtab
-rw-r--r-- 1 root root 7757 May 12 2003 software_raid.txt

/isolinux/ is obviously the isolinux files.
/kernels/ are the kernels used by isolinux

The remainder of the files are the files I use to do the install.

install.os is what we use to do the install (theoretically).

raidtab is for if we're doing Linux software raid configurations.

software_raid.txt is the how_to, for people who don't know, or just a reference (I read it occasionally)

VERSION is a plaintext file that also exists in / of the os.tar.gz . It says what the original distribution version was, plus all the changes I've made. This is useful for when a developer comes to me and asks "have you installed this?" "Sure, it's there by default, check /VERSION."

message.txt is what's displayed at boot time, before selecting the kernel to boot with. Simple instructions to any tech who may be installing

Welcome to 09VN/Linux07 1.5

This installation is based off of Slackware v9.0, and uses Linux Kernel 2.4.20.

VN/Linux Installation:
> mkdir /cdrom
> mount /dev/hdc /cdrom
> cd /cdrom
> ./install.os

Version information is available in /cdrom/VERSION
You can install a fresh OS by typing /cdrom/install.os

As an emergency boot, you can:
boot: bare.i root=/dev/hda1 noinitrd ro

This prompt is just for entering extra parameters. If you don't need to enter
any parameters, hit ENTER to boot the default kernel "bare.i" or press [F2]
for a listing of more kernel choices.

install.os is the only command the tech has to type. It may not work, I don't know. I do it all by hand still. :) My install time is still under 5 minutes, so it doesn't hurt.

--- install.os
echo "This script installs VN/Linux."
echo "It assumes you are using /dev/hda1 and"
echo "If you don't want to format the drive, use this. Do it by hand."
sleep 3
echo " "
echo "It's not hard. cat this file, and read what it does."
sleep 2
echo " "
echo "Hit [CTRL-C] to *ABORT* now, or wait 5 seconds to start install."
sleep 1
echo "Make two partitions on this hard drive:"
echo "/dev/hda1 - Linux Native - as large as possible"
echo "/dev/hda2 - Linux Swap - 128Mb"
sleep 3
fdisk /dev/hda
echo "Formatting /dev/hda1"
mke2fs /dev/hda1
tune2fs -j /dev/hda1
echo "Making Swap on /dev/hda2"
mkswap /dev/hda2
echo "Mounting new drive"
mkdir /new
mount /dev/hda1 /new/
cd /new
tar xvpzf /cdrom/os.v15.tar.gz
echo " "
echo " "
/new/sbin/lilo -r /new/
echo "Installation Complete."
echo "You have a few clean-up tasks to do yourself.
echo " "
echo "1) Please copy in the correct /etc/fstab and /etc/lilo.conf"
echo "2) Update /etc/raidtab , if this is a Linux software raid machine"
echo "3) Build the right kernel for this machine. Generic isn't good enough."
echo " Note: Kernels must live in /boot/ now."
echo "4) Re-run lilo to get your kernel in place."

make.image makes our bootable ISO with everything that's here.

--- make.image
# Run this from the root of what you want your CD Image tree to be.
# In our case:
# cd /usr/src/os
# ./isolinux/make.image
mkisofs -o /tmp/TEMP.iso \
-R -J -V "VN/Linux Install" \
-v -d -N -no-emul-boot -boot-load-size 32 -boot-info-table \
-sort isolinux/iso.sort \
-b isolinux/isolinux.bin \
-c isolinux/isolinux.boot \
-A "VN/Linux 1.5.1 (Slackware 9.0) Install CD" .

6) Make your bootable ISO image. This is the easy step. :)

cd /usr/src/os

Now you'll have an ISO at /tmp/TEMP.iso .. You can change that path to suit your tastes in /usr/src/os/isolinux/make.image. I dump it into tmp, and then move it to it's final home.

7) Test your installation. Remember that nice machine that you just put all the work into? You're going to wipe it out now. :)

Boot with the CD. type "install.os". It'll pop open fdisk for /dev/hda, then format, install, re-run lilo, and you're pretty much ready to go.

It shouldn't be rocket science to have a script guess at which drive to use. Check /proc/ to see what drives exist. If it's a blank machine, it shouldn't be very hard. You can probably partition the drive with a script, I've just never had the urge to do it. The install.os script could prompt for things, like the hostname and IP, but we just wait til it's done installing. Frequently, we don't know what the machine will be doing til sometime after the OS has been installed. Since they're all put together this way, with all the tools we'd need for most installations, there isn't much work involved in making it a web/dns/mail/SQL server . We just don't make these workstations, simply because I don't include any of the X11 stuff with it.

I don't recommend putting install.os at the end of rc.local, or anything like that. It makes a stupid-user hazard. You have to protect stupid users from themselves. Someone has to.

I hope all this helps.

Re:Fast Linux Installation 101 (1)

JWSmythe (446288) | more than 10 years ago | (#7947431)

Oops, forgot an obvious step before #7. Burn the ISO to a CD. :)

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?