Gentoo Archives: gentoo-dev

From: Aron Griffis <agriffis@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] initrd
Date: Wed, 06 Aug 2003 14:05:06
Message-Id: 20030806140504.GC22331@time
In Reply to: [gentoo-dev] initrd by Chris PeBenito
1 Dunno if this is helpful, but I make initrds all the time without a
2 special tool. This is the applicable snippet from the script that I
3 use.
4
5 echo Calculating size of root disk
6 size=$(( $(du -s ${target} | cut -f1) * 11 / 10 ))
7 echo Building root disk of ${size}k
8 dd if=/dev/zero of=initrd.img bs=1k count=${size} || exit 1
9 mke2fs -F initrd.img || exit 1
10 mkdir -p initrd
11 mount initrd.img initrd -o loop || exit 1
12 cp -a ${target}/* initrd
13 umount initrd || exit 1
14 gzip -f -9 initrd.img || exit 1
15
16 Aron
17
18 --
19 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] initrd Grant Goodyear <g2boojum@g.o>