[arch-general] Kernel ext2 driver

Thomas Bächler thomas at archlinux.org
Sat Mar 1 14:27:46 EST 2008


Peter Feuerer schrieb:
> I don't use the arch initcpio generated initramfs. I create a standalone
> "old" initrd containing the complete root filesystem of the arch
> installation myself. And due to the fact that the initrd is using ext2
> as filesystem the kernel can't read it unless i compile ext2 in.

Just don't use a filesystem for your initrd. Create a cpio image and use 
it as an initramfs image. Apart from the fact that it is easier to 
create, there is also no unnecessary overhead like in case of a ramdisk.

Usage:
	gen_init_cpio <cpio_list>

<cpio_list> is a file containing newline separated entries that
describe the files to be included in the initramfs archive:

# a comment
file <name> <location> <mode> <uid> <gid>
dir <name> <mode> <uid> <gid>
nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>
slink <name> <target> <mode> <uid> <gid>
pipe <name> <mode> <uid> <gid>
sock <name> <mode> <uid> <gid>

<name>      name of the file/dir/nod/etc in the archive
<location>  location of the file in the current filesystem
<target>    link target
<mode>      mode/permissions of the file
<uid>       user id (0=root)
<gid>       group id (0=root)
<dev_type>  device type (b=block, c=character)
<maj>       major number of nod
<min>       minor number of nod

example:
# A simple initramfs
dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
dir /root 0700 0 0
dir /sbin 0755 0 0
file /sbin/kinit /usr/src/klibc/kinit/kinit 0755 0 0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://archlinux.org/pipermail/arch-general/attachments/20080301/cb22bf63/attachment.pgp>


More information about the arch-general mailing list