New initrd concept

Benjamin Schieder <blindcoder-1k+CIuW/[email protected]>
Newsgroups gmane.linux.distributions.rock.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list.

After getting inspired by rich-r/[email protected]'s mail I started work on a
new initrd concept.
Submaster ID: 2005022615304115134

What happens is the following:
mkinitrdnew.sh creates the new mkinitrd named initrdnew-$kernel.img in
the /boot directory. $kernel can be passed as first parameter to
mkinitrdnew.sh.
This script goes then just as the current one through /etc/conf/kernel
and copies the kernel modules not marked with no-initrd to the initrd.
After that it copies default applications and files on the initrd:
- - /bin/bash		# yes, I want to write most of the initrd stuff
			# in bash for simplicity
- - /bin/ls
- - /sbin/pivot_root
- - /sbin/insmod
- - /sbin/insmod.old
- - /bin/mount
- - /bin/umount
- - /usr/bin/chroot
- - /bin/mkdir
- - /etc/fstab

It also copies the necessary libraries for the programs to the initrd
(using ldd to find out which those are).

Last, it goes through the files /etc/conf/initrd/initrd_* and copies
programs to the initrd which other packages (loop-aes will, for example)
have registered. This file has the following format:
<source file>	<target file>

<source file> references a file on the local filesystem and <target
file> the path and filename on the initrd. An example is included.

We might have to increase the default initrd size to 8192 kB, though.

RFC


Greetings,
	blindy
- --
Benjamin 'blindCoder' Schieder
Registered Linux User #289529: http://counter.li.org
finger blindcoder-1k+CIuW/[email protected] | gpg --import
- --
/lusr/bin/brain: received signal: SIGIDIOT
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCIIov7Wabow2Um2YRAsUtAJ9rG6enO/GUFYTZWaNBLfezc1GjlwCgiorF
AZOH+mGQzibKJzfd9ZbVsrA=
=2V0B
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.