Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] initrd contents

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Casey Harkins <charkins AT upl.cs.wisc.edu>
  • To: Seth Woolley <seth AT tautology.org>
  • Cc: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] initrd contents
  • Date: Wed, 16 Apr 2003 14:09:26 -0500 (CDT)



On Wed, 16 Apr 2003, Seth Woolley wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hey, this is great news. I was going to do this but never got past
> thought stage. Vladymir Vydra was working on something like this and had
> code for making a basesystem in chroot environment. Maybe you two can
> swap notes on what you've got so far.

Great! I was actually going to just copy the releavant basesystem spells
from the current running system, however, it would be nice to give it the
option to build the entire basesystem in a chroot.

> I agree with your approach of static linking initrd contents and/or using
> ash/busybox. Since the dialog part is fairly simple in the initrd stage
> you probably don't need anything complex in there, but I think you'll have
> to bite the bullet and pull in ncurses unless you can compile it into
> dialog statically. Even though they are separate, you might want to talk
> with the new cauldron team. This is more in the iso alley as far as I
> understand. Maybe Adam Clark has some experience that can help with this.

I now have two different scripts to make the initial ramdisk. One uses the
process I described before, the other uses static versions of busybox and
dialog. However, building the static versions automatically is another
trick. What I'm thinking is:

1) assemble or build the basesystem in chroot
2) create the basesystem.tar.bz2 for the iso
3) use this chroot environment to build the necessary static binaries:
busybox, bash, dialog, fdisk, cfdisk, parted, consolechars, hwclock,
loadkeys, mkfs, mkreiserfs

4) use the static busybox and dialog in the initrd
5) use all the static binaries listed on the iso itself

This eliminates the need for any shared libraries on both the iso and
initial ramdisk. I've gone through the installer line by line to determine
the required programs, most of which are provided via busybox. I'll leave
everything else off for now.

All of the building during install happens in a chroot using the
basesystem, so gcc and other progs aren't needed on the iso's root
filesystem.

It may be nice to include some of the editors statically linked on the iso
as well. The installer executes the editors from the basesystem chroot,
but they may be useful when using the iso as a recovery cd.

> If you statically link everything, wouldn't that remove the need for ldd
> and ldconfig? I'm not sure what nano and less are needed for. busybox
> has cat and ctrl-d ;).

Yup. I don't think having nano (or any editor) on the initial ramdisk is
very useful. busybox provides 'more' as well.

-casey




Archive powered by MHonArc 2.6.24.

Top of Page