


Automatically Installing Linux from Bootable CD? 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."
Knoppix (Score:4, Informative)
Re:Knoppix (Score:2)
Re:Knoppix (Score:1)
Ghost (Score:3, Informative)
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 (Score:2)
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 (Score:4, Insightful)
Re:Ghost (Score:4, Insightful)
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 (Score:2)
Re:Ghost (Score:2)
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 (Score:1, Insightful)
Re:Ghost (Score:3, Informative)
Re:Ghost (Score:1, Informative)
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
#!/bin/bash
# get hard disk size
hd=`sfdisk -s
#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
Gentoo can do it (Score:4, Informative)
Re:Gentoo can do it (Score:3, Insightful)
Re:Gentoo can do it (Score:2)
Check support databases (Score:5, Informative)
Re:Check support databases (Score:2)
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 pleas
Kickstart (Score:5, Informative)
Re:Kickstart (Score:3, Interesting)
Google (Score:2, Funny)
Re:Google (Score:4, Funny)
Re:Google (Score:4, Funny)
"Ask Google" whiners (Score:1)
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.
Re:For god's sake... (Score:5, Insightful)
Re:For god's sake... (Score:2)
Thank you (Score:3, Interesting)
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. Slashdo
Re:For god's sake... (Score:1)
Mepis!!! (Score:5, Interesting)
Re:Mepis!!! (Score:3, Interesting)
Mondo Works for me. (Score:5, Interesting)
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.
-MS2k
Don't use CDs (Score:5, Informative)
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 (Score:2)
Another alternative to consider, which especially considering your mixed environment, might be better for you, is virtualization - e.g. using VMWare as described here [vmware.com]. This avoids the need to image the mach
Re:Don't use CDs (Score:2)
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, pr
Re:Don't use CDs (Score:3, Interesting)
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 C
Re:Don't use CDs (Score:1)
root@clientbox# reboot -- "net - install"
and it'll reboot with those options, starting the jumpstart automatically.
Mepis (Score:3, Interesting)
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 (Score:4, Informative)
Once done, boot into single user mode.
tar everything up to *another* disk (mounted here under /mnt) --
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 --
and then this script will replaceThen 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 (Score:3, Informative)
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'.
Cool hack :) (Score:3, Informative)
As for the partitioning (printf) problem, I'd save a partition table with sfdisk -d
Try systemimager (Score:4, Informative)
Use Kickstart. (Score:4, Informative)
I've done this... (Score:5, Insightful)
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 (Score:4, Informative)
I did this with Slackware (Score:2, Informative)
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.
What distro do you want to use? (Score:4, Informative)
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=http://kickstart.server.com/kickstart/file, 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).
Kirby
Morphix = modular (Score:2, Informative)
MHO.
L
Look into kickstart (Score:2)
A notice from the modular-livecd guy (Score:2)
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 tha
Debian: Fully Automatic Installation (Score:3, Redundant)
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 (Score:2, Insightful)
Kick Start (Score:3, Informative)
The important thing.... (Score:3, Funny)
The important thing is how you lable the CD once you've made it. I would recommend something like: 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 (Score:2, Informative)
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. F
Sisuite (Score:2, Informative)
g4u (Score:2)
- Hubert
Customising knoppix (Score:1)
Re:Customising knoppix (now with FREE link) (Score:1)
http://linux.oreillynet.com/pub/a/linux/2003/11/2
Have you looked at FAI? (Score:1)
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 (Score:2)
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 int
Re:Distro, no internet (Score:1)
My favorite sig? A sig-sauer.
viral linux (Score:1)
Re:viral linux (Score:1)
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? (Score:2)
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.
Paul
debian.. (Score:2)
Sci/math custom live cd? (Score:2)
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? (Score:1)
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. [sourceforge.net]
So any constructive critisism would be helpful, either here or on the Morhphix Forum [sourceforge.net]
Thanks,
Brendan
Fast Linux Installation 101 (Score:2)
Here's what we do.
I use Slackware, but this will apply to any O
Re:Fast Linux Installation 101 (Score:2)
Oops, forgot an obvious step before #7. Burn the ISO to a CD.