Bug#338405: another patch for busybox support
On Sun, 10 Dec 2006, Russell Coker wrote:
> On Sunday 10 December 2006 20:23, maximilian attems <maks@sternwelten.at>
> wrote:
<snipp previous mails>
> > nack,
> > this assumes that the initramfs will created on the same fs
> > than the / is on, that assumption does not hold.
>
> + ln -f /bin/busybox ${DESTDIR}/bin/$n
>
> That is easily fixed by replacing the above with the below:
>
> + ln -f ${DESTDIR}/bin/busybox ${DESTDIR}/bin/$n
ok i tested with the following patch:
=== modified file 'mkinitramfs'
--- mkinitramfs 2006-12-02 17:51:54 +0000
+++ mkinitramfs 2006-12-10 13:26:32 +0000
@@ -228,7 +228,10 @@
else
rm -f ${DESTDIR}/bin/sh
copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
- ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+ for cmd in `busybox | sed -n '/functions:$/,$p' \
+ | sed -e 's/[[:space:]]*//g; s/,$//; s/,/\n/g; /busybox/d'`; do
+ ln -f ${DESTDIR}/bin/busybox ${DESTDIR}/bin/${cmd}
+ done
fi
# Modutils
> > so for a small initramfs without hacking your best bet is to set
> > BUSYBOX=n
> > and have no lvm2 or mdadm around.
>
> No, we can fix the busybox problem, and we can also reduce the size of lvm and
> mdadm too.
you haven't tried aboves, as the expected outcome was a much bigger
initramfs instead of 2 busybox copies, now a copy for a each cmd:
ls -lt /boot/initrd.img-2.6.18-[23]-686
-rw-r--r-- 1 root root 40246497 2006-12-10 14:27 /boot/initrd.img-2.6.18-3-686
-rw-r--r-- 1 root root 5447271 2006-11-27 10:25 /boot/initrd.img-2.6.18-2-686
--
maks
Reply to: