Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 326593

Summary: sys-kernel/genkernel does not allow to use more busybox applets than "[ ash sh mount uname echo cut cat"
Product: Gentoo Hosted Projects Reporter: r1k0 <erick>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED FIXED    
Severity: enhancement CC: sping
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 351772    

Description r1k0 2010-07-02 10:10:30 UTC
In the case where a user needs more tools from the initramfs especially from the busybox applets. Genkernel allows a user to provide a custom .config for busybox but does not allow configuration of which applet should be shipped within the initramfs. Only "[ ash sh mount uname echo cut cat" are hardcoded at /usr/share/genkernel/gen_initramfs.sh +58
The solution is the inclusion of a new config variable called:
BUSYBOX_APPLETS="[ ash sh mount uname echo cut cat"
inside /etc/genkernel.conf that would let the user add udhcpc/telnet/vi/sed/awk/httpd/etc.

I have in mind the need to build a custom and remote luks rescue initramfs (but for that I'm working on the inclusion of dropbear within the initramfs) that is why a user might need more tools from the busybox compiled package.

Reproducible: Always

Steps to Reproduce:
1.genkernel --luks --splash=gentoo --busybox-config=/mydotconfig initramfs
2.reboot
3.exit to initramfs shell and try to use more tools compiled from the /mydotconfig file provided 

Actual Results:  
The new initramfs produced does not reflect the custom busybox dotconfig and more importantly genkernel does not allow the user to configure it.

Expected Results:  
The expected results is to be able to configure which applet the user wants to be shipped from the custom compiled busybox.

PATCH:

add to /etc/genkernel.conf
BUSYBOX_APPLETS="[ ash sh mount uname echo cut cat" # telnet udhcpc vi sed cmp patch awk httpd

replace from /usr/share/genkernel/gen_initramfs.sh +58
    for i in '[' ash sh mount uname echo cut cat; do
into
    for i in ${BUSYBOX_APPLETS}; do
Comment 1 r1k0 2010-07-16 07:17:02 UTC
actually busybox --install -s from the linuxrc takes care of that, meaning whatever option compiled for busybox should be symlinked when run on boot.

However, before digging into the linuxrc, I've seen previoulsy missing links hence the first reason for the post.


Comment 2 solar (RETIRED) gentoo-dev 2010-07-16 07:53:59 UTC
This is not a bug with embedded. Over the years we have mentioned our concerns of genkernel's use of busybox. Sadly we don't see eye to eye.

Please file a new bug with that team.
Comment 3 SpanKY gentoo-dev 2010-07-17 19:00:01 UTC
or we give them this bug
Comment 4 Sebastian Pipping gentoo-dev 2011-01-09 18:34:37 UTC
This features has now been added in Git:

http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=0e37a5fba1c30ed779d4c6723841844c3f87c34d

You can test it live by emerging sys-kernel/genkernel-99999 (five nines).