Bug 243443 - man pages do not work in rescue mode
Summary: man pages do not work in rescue mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda
Version: 5.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Joel Andres Granados
QA Contact: Milan Zázrivec
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-08 18:20 UTC by Forrest Taylor
Modified: 2008-05-21 15:30 UTC (History)
1 user (show)

Fixed In Version: RHBA-2008-0397
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 15:30:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch for RHEL 5 (907 bytes, patch)
2007-08-21 11:13 UTC, Joel Andres Granados
no flags Details | Diff
Activate man pages in rawhide (894 bytes, patch)
2007-08-21 11:14 UTC, Joel Andres Granados
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0397 0 normal SHIPPED_LIVE anaconda bug fix and enhancement update 2008-05-19 23:11:23 UTC

Description Forrest Taylor 2007-06-08 18:20:37 UTC
Description of problem:
Getting to the man pages in rescue mode does not work.  `man rpm`, for instance,
gives nothing.  I am not sure what the problem is--possibly the busybox less
pager doesn't work as expected.

Doing a chroot does not work either, as the MANPATH includes the /mnt/sysimage
directory.  I would like to see MANPATH also (exclusively?) include
/usr/share/man so that it works if chroot is available.


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

How reproducible:
Always

Comment 1 Joel Andres Granados 2007-08-17 12:49:45 UTC
less is ok.  manpath is set to
/mnt/sysimage/usr/share/man:/mnt/sysimage/usr/local/share/man, which is sane. 
I'm pretty sure this is an issue with the nroff script.

Comment 2 Joel Andres Granados 2007-08-18 16:24:07 UTC
The /mnt/sysimage/usr/bin/nroff script is trying to exec /usr/bin/iconv, which
is not present in rescue.

Comment 3 Joel Andres Granados 2007-08-21 11:13:17 UTC
Created attachment 161963 [details]
Patch for RHEL 5

The man pages will become active once the images are remade with the anaconda
scripts.

Comment 4 Joel Andres Granados 2007-08-21 11:14:23 UTC
Created attachment 161964 [details]
Activate man pages in rawhide

The same bug is present in rawhide.  This will add man pages in rescue mode in
rawhide.

Comment 5 Forrest Taylor 2007-08-21 15:16:51 UTC
Might I suggest that MANPATH also include /usr/share/man and
/usr/local/share/man (without /mnt/sysimage)?  This would allow man pages to be
available in the chroot environment as well as rescue mode.

Comment 7 Joel Andres Granados 2007-08-23 16:58:23 UTC
Regarding comment #5.  I'm going to commit what has been done and open another
bug so I don't forget to add this to the rescue mode.

Comment 8 RHEL Program Management 2007-10-16 03:58:11 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 10 Forrest Taylor 2007-11-02 15:22:48 UTC
Regarding comment #7, did you open a new bug, or should I?

Comment 11 Joel Andres Granados 2007-11-06 18:10:45 UTC
comment #7 is taken care of in rawhide.

Comment 13 Milan Zázrivec 2008-02-06 12:34:43 UTC
RHEL5.2-Server-20080206.nightly rescue mode:
* MANPATH:
# echo $MANPATH
/mnt/sysimage/usr/share/man:/mnt/sysimage/usr/local/share/man

If I chroot into /mnt/sysimage, $MANPATH points to nonexistent directories

* groff, iconv:
/usr/bin/groff and /usr/bin/iconv are present in stage2.img, not in minstg2.img.
Not sure whether that's intentional or not, but as long as those two binaries
are not present in minstg2.img, there's no way you can read man pages in rescue
mode over serial console for example.

Comment 14 Peter Jones 2008-02-06 19:52:04 UTC
Is there a reason that:

HOME=/root chroot /mnt/sysimage bash -l -i

and then running "man foo" from that shell isn't sufficient to solve this problem?

Comment 15 Milan Zázrivec 2008-02-08 16:56:44 UTC
RHEL5.2-Client-20070207.0 / anaconda-11.1.2.96-1:

Running HOME=/root chroot /mnt/sysimage bash -l -i
does not help, since it does not reset $MANPATH to the right
values needed in the chrooted (/mnt/sysimage) environment ($MANPATH
actually stays at /mnt/sysimage/usr/share/man:/mnt/sysimage/usr/local/share/man)

To be honest, I don't quite understand what was the original point of this bz.

Was it:
1) Being able to access man pages in rescue mode before chroot to /mnt/sysimage

or

2) Being able to access man pages in rescue mode after chroot to /mnt/sysimage

or 1) && 2) ?

If it's 1), then I have to say that this part works with stage2.img, not with
minstg2.img, because it lacks groff anc iconv.

If it's 2), then the $MANPATH variable is a problem. The only thing that
anaconda suggests before it puts you into the shell is to run chroot
/mnt/sysimage (it says nothing about bash parameters or anything else).

Comment 16 David Cantrell 2008-02-08 20:17:57 UTC
Fixed in anaconda-11.1.2.88-1 and later.

Comment 18 Joel Andres Granados 2008-02-11 10:49:02 UTC
Regarding comment #15:  Changed the MANPATH in the rescue environment,  should
work with new anaconda build.  So now man pages are accessible in nochroot and
chroot environments.

Comment 19 Milan Zázrivec 2008-02-13 08:59:27 UTC
RHEL5.2-Client-20080211.0 / anaconda-11.1.2.100-1:

sh-3.00# echo $MANPATH
/mnt/sysimage/usr/share/man:/mnt/sysimage/usr/local/share/man:/usr/share/man:/usr/local/share/man

Man pages before and after chroot /mnt/sysimage work as expected.

Comment 20 Forrest Taylor 2008-02-26 20:37:39 UTC
In response to comment # 15, I was hoping to have both 1 & 2--man pages from
chroot or non-chroot.  I'll try out the latest version.

Comment 22 errata-xmlrpc 2008-05-21 15:30:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0397.html



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