* Samuli Suominen schrieb am 05.08.11 um 15:43 Uhr: > On 08/05/2011 04:12 PM, Marc Schiffbauer wrote: > > OTOH the initrd that Robin described would be a very static solution > > with almost no dependencies, so if genkernel had a USE flag like > > "dracut" it would be possible to build it without dracut > > dependency and thus would allow for smaller systems. > > > To clarify, > > By dependencies in dracut you mean udev?
For example yes. > And by smaller systems you mean > systems without udev? No. > > Then yes, such minimal initramfs should propably be covered in the > embedded's documentation, but otherwise trying to avoid dracut is > reinventing the wheel... You may be right, but to my understanding such a minimalistic initrd would really do nothing special. Possibly a small shell script run in a static busybox would do the job, Given some required conditions like having a "normal" boot device like /dev/sda is given this thingy would just mount the rootfs, read some config,, then mount other things like /usr and thats it. Not to forget pivot_root and starting the real init of course. Maybe something like: <pseudo shell mode> #!/bin/sh mount -t proc proc /proc rootfs=`sed 's/.*root=\([^ ]*\)/\$1` /proc/cmdline mount $rootfs /newroot while read device mnt fstype; do mount -t $fstype $device $mnt done < /newroot/etc/initramfs.mount cd /newroot pivot_root . /oldroot exec chroot . /sbin/init # END -Marc -- 8AAC 5F46 83B4 DB70 8317 3723 296C 6CCA 35A6 4134
pgpgrutzKyU1Q.pgp
Description: PGP signature