FW: Custom Recovery CD.

Thomas Mondoshawan Tate plug-discuss@lists.PLUG.phoenix.az.us
Mon, 13 Aug 2001 12:27:55 -0700


--KDt/GgjP6HVcx58l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 13, 2001 at 10:37:04AM -0700, John (EBo) David wrote:
> "Furmanek, Greg" wrote:
> >=20
> > To be more specific I would like to create CD that
> >=20
> > 1. Boots kernel image.
> > 2. Auto partitions drives.
> > 3. Formats Drives.
> > 4. Restores applications.
> > 5. Restores data.
> >=20
> > All that with no assistance. (well maybe with the
> > exception of putting the cd in the tray and turning
> > the power switch)
>=20
> 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. =20
>=20
> 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.
>=20
> 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...
>=20
> 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?
>=20

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
=09
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.

-- Mondoshawan

>=20
>   EBo --
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't p=
ost to the list quickly and you use Netscape to write mail.
>=20
> PLUG-discuss mailing list  -  PLUG-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

--KDt/GgjP6HVcx58l
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7eCo7Yp5mUsPGjjwRAvvpAKCfYG6GT/vfNEOwGdL81wMH1NzXPACghqAj
E6Z1OAjUrUzFJ9KWgq3N+q0=
=Oo6q
-----END PGP SIGNATURE-----

--KDt/GgjP6HVcx58l--