Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 605244 - no busybox in anaconda %pre script available
no busybox in anaconda %pre script available
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Installation_Guide (Show other bugs)
6.0
All Linux
low Severity high
: rc
: ---
Assigned To: Ruediger Landmann
ecs-bugs
: Documentation, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-17 10:01 EDT by Mike Hauth
Modified: 2010-11-11 10:34 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 10:34:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
commands.txt (11.55 KB, text/plain)
2010-07-08 13:45 EDT, David Cantrell
no flags Details

  None (edit)
Description Mike Hauth 2010-06-17 10:01:10 EDT
Description of problem:
During the pre-install there are no busybox utils available.

Version-Release number of selected component (if applicable):


How reproducible:
Steps to Reproduce:
1.boot from rhel 6 beta dvd in pre-install process
2.change to a terminal
3.try f.e. tr, chvt, dirname, etc.
4.it will fail

the same procedure works in rhel 5
  
Actual results:


Expected results:


Additional info:
RedHat Support Request Number 2032174
Comment 2 RHEL Product and Program Management 2010-06-17 10:13:26 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Chris Lumens 2010-06-18 10:43:43 EDT
anaconda no longer uses busybox - we use the real versions of commands now so we don't have busybox-specific problems to deal with.  I further see tr and dirname present in /usr/bin in the stage2 image.  chvt was added later - don't know if that made it in time for the beta or not.

By "pre-install process", do you mean the loader stage of anaconda?  That's the part where you're on a text-mode blue and red screen.
Comment 4 Mike Hauth 2010-06-21 02:28:04 EDT
the pre-install time is the stage my kickstart script runs the %pre script.


(In reply to comment #3)
> anaconda no longer uses busybox - we use the real versions of commands now so
> we don't have busybox-specific problems to deal with.  I further see tr and
> dirname present in /usr/bin in the stage2 image.  chvt was added later - don't
> know if that made it in time for the beta or not.
> 
> By "pre-install process", do you mean the loader stage of anaconda?  That's the
> part where you're on a text-mode blue and red screen.
Comment 5 David Cantrell 2010-06-24 14:30:57 EDT
As Chris stated, we have discontinued the use of busybox in the installer images.  We are using the standard system tools, but at the same time have reduced the number we include in the initrd.img file.

%pre scripts will execute with bash, so you have all the capabilities that bash provides.  The initrd.img also provides grep, gawk, and sed.  With that set, most of the functionality provided by other tools can be done.  chvt is the only one I can think of that we do not have an alternative for in the initrd.img.

Can you provide a list of the tools you would like to see in initrd.img available to %pre scripts and we can narrow this down to a small list?
Comment 7 Mike Hauth 2010-07-06 09:27:22 EDT
We are not able to provide you a completed busybox subset tool list we need during our different installation processes. We worked fine with the busybox toolkit. An emulation with sed and awk script won't be an alternative for us.

So because of downward compatibility we request the whole coverage of the busybox toolkit (see man 1 busybox).
Comment 8 David Cantrell 2010-07-06 10:08:25 EDT
chvt was not provided in the initrd environment with RHEL-5 either.  busybox commands were provided in the stage2 environment.

I'm changing this bug to "need chvt in initrd" because we're not going to play the game of chase down the 501 programs I want in initrd.  If you want more than chvt, speak now.
Comment 9 Mike Hauth 2010-07-08 09:51:46 EDT
Maybe we are talking about some different things: What we need in RHEL 6 can be found on the redhat documenation: http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Installation_Guide-en-US/s1-redhat-config-kickstart-prescript.html

In my opinion, currently in the %pre scripts the listed tools are not available in RHEL 6 beta. Right? If not, i'll invite you for an icecream asap... :-)
Comment 10 David Cantrell 2010-07-08 13:44:21 EDT
You need to try the latest beta release of RHEL 6.0 as things like chvt have been added.  It appears we did not have those added in time for the first beta release.

Second, the documentation link you provided definitely needs updating for RHEL-6.  I am attaching a chart of commands for %pre and %post scripts as they are for RHEL-6.
Comment 11 David Cantrell 2010-07-08 13:45:21 EDT
Created attachment 430434 [details]
commands.txt

Docs team, please see that the install guide is updated to reflect the new installation environment and commands available to users.  The http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Installation_Guide-en-US/s1-redhat-config-kickstart-prescript.html page is no longer correct for RHEL-6.
Comment 12 Mike Hauth 2010-07-09 07:29:26 EDT
A lot of %pre-scripts in our environments uses the "tr" command.
It wouldn't be simple to convert the "tr" to a python or sed workaround. So it will be nice to have it again.
Comment 13 Mike Hauth 2010-07-15 07:00:06 EDT
Your workaround

[2] GNU bash can provide basename functionality via string manipulation.  If
    var="/usr/bin/command", then "echo ${var##*/}" will give "command".

doesn't provide the full functionallity to basename.

Compare
# var="/usr/bin/" ; echo ${var##*/}
(empty string)
vs.
# basename /usr/bin/
bin
Comment 14 David Cantrell 2010-07-21 13:22:37 EDT
At this point in time, it's too late for us to go changing things like this in the installer.  We are only accepting critical blocker fixes at this point and this one does not fit the criteria for blocker status.

I do not want to leave you hanging for RHEL 6.0 though, so here are some alternative workarounds:

    http://shell.cfajohnson.com/commands/

The above URL contains POSIX-compliant sh-only implementations of a few commands, such as dirname and basename.

For tr-like functionality, you can use awk (or sed) which is included in the pre-execution environment.  Here is an example of transliteration using awk:

    http://www.gnu.org/software/gawk/manual/gawk.html#Translate-Program

(Reassigning this one to the install guide for proper documentation updates for RHEL 6.0.)

If you want me to look at specific %pre examples, contact me via email rather than through this bug and I will be happy to help you out.
Comment 15 Ruediger Landmann 2010-07-26 02:10:53 EDT
(In reply to comment #11)

> Docs team, please see that the install guide is updated to reflect the new
> installation environment and commands available to users.  The
> http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Installation_Guide-en-US/s1-redhat-config-kickstart-prescript.html
> page is no longer correct for RHEL-6.    

Done; thank you David, and thanks Mike for raising this.

I've corrected the list of commands available in %pre based on David's chart (section 33.10), and included the full chart as a new Appendix (appendix G).

Fixed in build 0-78
Comment 16 Michael Doyle 2010-07-27 20:30:53 EDT
Red_Hat_Enterprise_Linux-Installation_Guide-6-en-US-0-80

33.10. Pre-Installation Script

The command list is not exactly the same as David's chart.

[add] ash
[remove] ftp
[add] ftpget
[add] ftpput

Appendix G. Alternatives to busybox commands

Contains the correct list of commands.
Comment 17 Ruediger Landmann 2010-07-29 22:40:07 EDT
(In reply to comment #16)
> Red_Hat_Enterprise_Linux-Installation_Guide-6-en-US-0-80
> 
> 33.10. Pre-Installation Script
> 
> The command list is not exactly the same as David's chart.
> 
> [add] ash
> [remove] ftp
> [add] ftpget
> [add] ftpput

The list contains the commands that are available in RHEL6, ie, the right-hand column of the chart. The commands in the left-hand column are busybox commands that are no longer available and must be worked around (with the commands in the right-hand column).

I did, however, miss "bash", added in build 0-81.
Comment 19 releng-rhel@redhat.com 2010-11-11 10:34:03 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.