Re: Boot from memory.

peppe_at_unipg.it
Date: 11/28/05


Date: 28 Nov 2005 04:27:34 -0800

Well ... I did some research on the Net and after this post without
answer I resorted to formalize what I have done on a script.

The scipt is just an "first attempt" in this direction, but it seems to
work. It is a single script, modeled on the system mkinitrd script,
that can generate a living system for the Fedora (tested FC2) or RH AS
(tested 3 and 4, 32 and 64 bits) RPM packages.

The script uses as input files the RPMs of the distribution (as
extracted from the ISO CD images) and generates a couple of output
files: the "initrd.img" image file (in ramdisk format) and the
"vmlinuz" kernel extracted from the installed system.

With "syslinux" or "isolinux" these files can be used to boot the
system directly in memory.

The script has this "shape":

mkimg [--version] [--verbose] [--progress]
       [--rpm <package dir>] [--root <root device>] [--device <image
device>]
       [--size <image size>] [--proc] [--noaid] [--nozip] [--tmp <tmp
path>]
       [--relase <release package>] [--rpmdb <rpmdb package>]
[--keeprpmdb]
       [--fs <filesystem type>] [--fsopt <filesystem options>]
       [--kernel <kernel image path>] [--vmlinuz <kernel path>]
       [--nopasswd] [--noshadow] [--list] [--conf configurarion
directory]
       <package_list> <image_name>

and, as an example, it can be used to install a FC2 minimal system in
this way:

     mkimg --rpm /u0/fc2 --rpmdb rpmdb-fedora-2-0.20040513.i386.rpm
--release fedora-release-2-4.i386.rpm --kernel
/boot/vmlinuz-2.6.5-1.358 list.fc2 initrd.img

where list.fc2 is the list of the FC2 rpm packages to be installed on
the image. In my example is something like:

dhclient-3.0.1rc12-4.i386.rpm
diffutils-2.8.1-11.i386.rpm
file-4.07-4.i386.rpm
ftp-0.17-19.i386.rpm
gcc-3.3.3-7.i386.rpm
glib-1.2.10-12.1.1.i386.rpm
glibc-2.3.3-27.i686.rpm
initscripts-7.53-1.i386.rpm
kbd-1.12-1.i386.rpm
kernel-2.6.5-1.358.i686.rpm
kernel-smp-2.6.5-1.358.i686.rpm
nfs-utils-1.0.6-20.i386.rpm
nptl-devel-2.3.3-27.i686.rpm
ntsysv-1.3.9-1.1.i386.rpm
openssl-0.9.7a-35.i686.rpm
passwd-0.68-8.1.i386.rpm
rpm-4.3.1-0.3.i386.rpm
rootfiles-7.2-7.noarch.rpm
star-1.5a25-5.i386.rpm
system-config-date-1.7.3-3.noarch.rpm
SysVinit-2.85-25.i386.rpm
telnet-0.17-28.i386.rpm
telnet-server-0.17-28.i386.rpm
vim-minimal-6.2.457-1.i386.rpm

As you can see (using the --aid rpm feature) it can be really "short".
In this example installs a "live" system of abot 400Mb on a compressed
initrd.img of about 120Mb.

This particular system can be configured automatically with dhclient,
accessed via telnet and even used to compile with the gcc compiler and
can be easily booted via network, via CD or via USB disk on a 1Gb
machine.

I'm wondering if a similar script is already around and if it can be
useful to others ....

G. Vitillaro.

peppe@unipg.it ha scritto:

> Thank for the reference. I'm aware of the rescue system, but ... well
> is not, as you sad, what I'm looking for.
>
> I'm speaking of a "minimal" system, that can be networked, where is
> possibile to compile and that is possible to customize.
>
> The basic idea born from the observation that "current" machines have
> enough memory (1Gb and up) to boot a full functional system, not just a
> rescue system, directly in memory.
>
> So placing a ramdisk compressed image of ... let me say of 100Mb ... on
> a CD, on the network, on an USB key ... is enough to boot a living
> system.
>
> I already did some experiment and I think that is possible. Just
> curious to see if other attempts are around ...
>
> G. Vitillaro.



Relevant Pages

  • Re: Flaw in install script for nasm v0.98.39?
    ... Frank Kotler wrote: ... sourceforge.net and tried to compile it. ... install script and then manully copied the files written to them to the ...
    (alt.lang.asm)
  • Re: Flaw in install script for nasm v0.98.39?
    ... sourceforge.net and tried to compile it. ... install script and then manully copied the files written to them to the ... I don't know the answer to that one, Santosh. ...
    (alt.lang.asm)
  • Re: Incude statement - is there such a thing?
    ... but have you noticed that you get poorer compile time messages when ... > if they are constantly loaded into memory or per script. ... you had 50 statements that you wanted to execute 1000 times in a loop. ...
    (microsoft.public.scripting.vbscript)
  • Flaw in install script for nasm v0.98.39?
    ... sourceforge.net and tried to compile it. ... install script and then manully copied the files written to them to the ... I want to bring these potential problems to the notice of the NASM ...
    (alt.lang.asm)
  • Re: Deploying Office 07 with Group Policy
    ... computer I tested it on took 30 minutes to install. ... the following script to the Computer Startup Script. ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ...
    (microsoft.public.office.setup)