[clug] Setting up a root filesystem

Daniel Pittman daniel at rimspace.net
Tue May 4 06:56:51 MDT 2010


David Cottrill <cottrill.david at gmail.com> writes:

> In the Debian flavoured distros (eg: Ubuntu) there is 'debootstrap'.
> For Fedora there is the poor cousin 'febootstrap'.
> What is there in RedHat? I could use febootstrap but my experiences with it in
> the past have not been positive.

Last I looked, nothing good; upstream just doesn't seem to care about anything
but installing onto a "standard" system, from media or network, so most of the
tools live a brief and painful life before being dropped.

febootstrap should be able to do a RHEL release, though, since they are pretty
similar at heart...

Anyway, last time I needed this I wrote a little bit of ugly Perl that went
through the YUM XML database, cross-referenced it, and installed the RPM
packages by hand by doing:

1. parse XML and index it.
2. identify the list of RPM packages needed to run 'yum'.
3. unpack 'em all with rpm2cpio into the chroot.
4. chroot in there and run rpm to install the same packages.
5. run yum to bootstrap the rest of the chroot.

It only took me an hour or so of hacking; you do need to index the package
names and the advertised file content, though, since some things depend by
shared library name.

Sadly, I don't have the script around any longer, but writing your own
shouldn't be terribly hard.

        Daniel
-- 
✣ Daniel Pittman            ✉ daniel at rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons


More information about the linux mailing list