FW: Custom Recovery CD.

John (EBo) David plug-discuss@lists.PLUG.phoenix.az.us
Mon, 13 Aug 2001 12:50:35 -0700


Thomas Mondoshawan Tate wrote:
> 
> On Mon, Aug 13, 2001 at 10:37:04AM -0700, John (EBo) David wrote:
> > "Furmanek, Greg" wrote:
> > >
> > > To be more specific I would like to create CD that
> > >
> > > 1. Boots kernel image.
> > > 2. Auto partitions drives.
> > > 3. Formats Drives.
> > > 4. Restores applications.
> > > 5. Restores data.
> > >
> > > All that with no assistance. (well maybe with the
> > > exception of putting the cd in the tray and turning
> > > the power switch)
> >
> > sounds like creating your own custome distro with only the packages you
> > want on it and the data could probably be put in an RPM and treated like
> > any other package.  This assumes that the data is static or can be
> > downloaded from another machine or server.
> >
> > Some time back I asked about creating a boot CD to replace the boot
> > floppy.  I did not have time to follow up on it.
> >
> > I would also be interested in learning how to create a regular boot CD
> > so that I can have it automatically spawn programs like a firewall,
> > bridge, or gatway...
> >
> > You know, aspects of this would make a wonderful meeting demo or HOW-TO
> > ;-)  Anyone know enough about how to do various aspects of this?
> >
> 
> I've built distros before, but not based off of a bootable CD (though the
> principle is pretty much the same). To do what you're wanting, EBo, you'll
> want to create a 2.88MB bootable floppy image that contains a minimal kernel
> and initrd. The kernel should have only the modules needed to mount the CD
> staticially linked into it -- the others can be loaded as modules after the
> CD has been mounted. You'll also need to have a working linux filesystem
> stored either directly on the CD or on the CD as a disk image. After the
> kernel has booted, you follow these steps in the linuxrc script from the
> initrd image:
> 
>         1. Mount the CD somewhere
>         2. Mount a loopback image containing a linux filesystem (optional)
>         3. pivot_root to the image's mountpoint (or the CD's mountpoint)
>         4. exec chroot / /sbin/init < dev/console > dev/console 2>&1
> 
> At this point, init(8) can then take over with the rc.d scripts to run the
> firewall software, etc.
> 
> Mind you, most of this information can be gleaned from the
> Documentation/initrd.txt file in the Linux source tree. I believe they've
> also got a couple of HOWTOs at http://www.linuxdoc.org by the name of
> Bootdisk-HOWTO and Linux-Init-HOWTO.

Thanks!

I followed up on http://open-projects.linuxcare.com/BBC/ and found that
there are several projects and tools including a CD-bootable firewall,
and tools to do just about everything I need.  So, with any luck that'll
work for me.  BTW, if I get time to do something serious with this I'll
report to the group...  One of the possible projects that would be great
to deal with now is to put EMC on a bootable CD to run a CNC mill,
lathe, etc.  I have a friend with a benchtop 4-axis CNC mill so I'll be
able to test it and maybe even bring it to a meeting ;-)

  EBo --