<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>128249</bug_id>
          
          <creation_ts>2006-03-31 06:47 0000</creation_ts>
          <short_desc>Grub tab does not autocomplete</short_desc>
          <delta_ts>2008-05-10 14:10:28 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>2006.0</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>janne1.andersson@chello.se</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>gentoo@dstutz.com</cc>
    
    <cc>mike@duncodin.org</cc>

      

      
          <long_desc isprivate="0">
            <who>janne1.andersson@chello.se</who>
            <bug_when>2006-03-31 06:47:49 0000</bug_when>
            <thetext>When pressing tab there is no autocompletion, just an ordinary tab movement.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-06-11 07:52:24 0000</bug_when>
            <thetext>no idea what version of grub you&apos;re using or what your system looks like</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>matthias@lugfl.de</who>
            <bug_when>2006-06-12 07:46:47 0000</bug_when>
            <thetext>(In reply to comment #0)
&gt; When pressing tab there is no autocompletion, just an ordinary tab movement.
&gt; 

I have the same problem... my grub version: 0.96-r2</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>janne1.andersson@chello.se</who>
            <bug_when>2006-09-07 12:19:19 0000</bug_when>
            <thetext>Grub is version 0.96-r2.Gentoo is 2006.1 fresh install.
At boot when entering Grub in line mode autocomplete works.
But entering grub from within Linux the tab autocompletion does not work.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>janne1.andersson@chello.se</who>
            <bug_when>2006-09-07 12:24:16 0000</bug_when>
            <thetext>Just forgot.
Installation is on an AMD64 using AMD64 live-cd using a stage3 tarball.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>janne1.andersson@chello.se</who>
            <bug_when>2006-09-07 23:20:11 0000</bug_when>
            <thetext>Suggest reopening of the bug </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@dstutz.com</who>
            <bug_when>2006-09-08 03:30:50 0000</bug_when>
            <thetext>I have the same issue and have for a few versions now.  I have tried with and without static flag. Also amd64

Current version is below:
sys-boot/grub-0.97-r2  USE=&quot;-custom-cflags -netboot static&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mike@duncodin.org</who>
            <bug_when>2006-12-10 11:17:18 0000</bug_when>
            <thetext>Confirm this in amd64 2006.1
Grub version 0.97-r3

emerge --info :
Portage 2.1.2_rc3-r1 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r1lucy x86_64)
=================================================================
System uname: 2.6.19-gentoo-r1lucy x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.6
Last Sync: Sun, 10 Dec 2006 09:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS=&quot;amd64 ~amd64&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-march=k8 -pipe -O2&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c&quot;
CXXFLAGS=&quot;-march=k8 -pipe -O2&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks metadata-transfer sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;ftp://ftp.heanet.ie/pub/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/&quot;
LANG=&quot;en_GB&quot;
LC_ALL=&quot;en_GB&quot;
LINGUAS=&quot;en_GB&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.europe.gentoo.org/gentoo-portage&quot;
USE=&quot;amd64 X aac acl alsa alsa_cards_intel8x0 apache2 asf avi bash-completion berkdb bitmap-fonts bzip2 cdr cli cracklib crypt cups curl dbm dga dlloader dri dvd dvdr elibc_glibc emacs exif fbcon ffmpeg flac fortran gd gdbm ggi gif glut glx gnome gnutls gphoto2 gpm gs gstreamer gtk gtk2 hal iconv imagemagick imap imlib input_devices_keyboard input_devices_mouse ipv6 isdnlog jack java jpeg jpeg2k kde kdeenablefinal kernel_linux ldap lesstif libg++ linguas_en_GB lm_sensors mad mbox milter mmap motif mozilla mp3 mpeg ncurses nptl nptlonly nsplugin odbc ogg opengl pam pcre pdf pdflib perl plotutils png postgres ppds pppd python qt qt3 quicktime readline reflection samba scanner session slp speex spell spl ssl svg swat tcpd threads tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_fglrx video_cards_radeon vorbis wmf wxwindows xemacs xine xml xml2 xorg xpm xv xvid zlib&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mike@duncodin.org</who>
            <bug_when>2006-12-10 13:51:27 0000</bug_when>
            <thetext>OK, apologies if this is a real red herring, but.... Running ldd against the grub binary shows no ncurses or terminfo libs:-

# ldd /sbin/grub
linux-gate.so.1 =&gt;  (0xffffe000)
libc.so.6 =&gt; /lib32/libc.so.6 (0xf7e40000)
/lib/ld-linux.so.2 (0xf7f8f000)

I&apos;ve just pulled down grub-0.97 off alpha.gnu.org and tried that with the same problem - no tabs and no ncurses libs. However, the configure check for wgetch seems to be failing with lines like the following in config.log :-

configure:4638: checking for wgetch in -lncurses
configure:4668: gcc -o conftest -m32 -g  -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef  conftest.c -lncurses   &gt;&amp;5
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../libncurses.so when searching for -lncurses
.
[repeated for all other ncurses libs]
.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lncurses</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>garlicbread@ntlworld.com</who>
            <bug_when>2008-03-23 15:26:14 0000</bug_when>
            <thetext>If your installing a new system
As a temporary work around just to find out the drive numbers on amd64
I found that grub-static seems to still have autocompletion
although I think it&apos;s an old version, so it&apos;s probably best to only use it for this purpose (also I think you&apos;ll need to temporarily uninstall the main grub while doing this)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-03-23 17:46:18 0000</bug_when>
            <thetext>what exactly are you having a problem with ?  the grub when you boot up or the grub when you run on the command line ?  they arent the same thing

both however work on my amd64 system</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>garlicbread@ntlworld.com</who>
            <bug_when>2008-03-28 19:32:34 0000</bug_when>
            <thetext>grub on the command line (in the livecd in chroot) was a problem for me
as it wouldn&apos;t find the stage1 / stage2 files on the filesystem when trying to install / setup onto the disk under amd64, it would just refuse to write the bootloader, stating stage1/2 not found (although this may be a separate bug altogether). For info I&apos;ve tried nearly every ebuild under the sys-boot/grub directory with the same results

The old versions of grub did work before back when I setup a different amd64 system a long while ago. So I&apos;m not sure if one of the libs for grub has been affected in some way

I have managed to get the new system up and running, I found that the latest grub ebuild from the sabayon overlay has a patch included which seems to fix the problem when locating stage1 / stage2 / writing the boot sector

the only difference between the new / old systems was that one is a shuttle PC with the boot partition at the beginning of the disk, the other a GX700 laptop with the boot partition about 56Gb into the disk or so

For Auto-completion
with the sabayon version of grub this still doesn&apos;t work (I had to use grub-static to work out my drive numbers)
but auto-completion does appear to work at the grub menu / boot prompt

I put up a thread under here http://forums.gentoo.org/viewtopic-t-679202-highlight-.html
but I&apos;m not sure if this is something just unique to me, or others as well
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-03-28 22:03:57 0000</bug_when>
            <thetext>this bug is only about autocompletion, not any other issue.  please keep any comments limited to that.

using grub-0.97-r5, and my /boot partition is sda1 (which is hd3 to grub):
# grub

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

grub&gt; root (hd3,0)
 Filesystem type is ext2fs, partition type 0x83

grub&gt; kernel /&lt;hit tab here&gt;
 Possible files are: lost+found System.map boot vmlinuz grub vmlinuz-2.6.17.9-grsec .keep vmlinuz-2.6.20.2 vmlinuz
-work System.map-2.6.20.2 memtest86plus config-2.6.20.2 .........</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-03-28 22:12:47 0000</bug_when>
            <thetext>also verify your grub is linked against ncurses:
$ ldd /sbin/grub
        linux-gate.so.1 =&gt;  (0xffffe000)
        libncurses.so.5 =&gt; /lib32/libncurses.so.5 (0xf7efc000)
        libc.so.6 =&gt; /lib32/libc.so.6 (0xf7dbf000)
        libdl.so.2 =&gt; /lib32/libdl.so.2 (0xf7dbb000)
        /lib/ld-linux.so.2 (0xf7f80000)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>garlicbread@ntlworld.com</who>
            <bug_when>2008-03-28 23:29:18 0000</bug_when>
            <thetext>sorry I&apos;ll stick to the auto completion issue
I&apos;m using 2 machines here, one with the (unsupported) sabayon grub, the other with the default version of grub (from gentoo tree)

&quot;ldd /sbin/grub&quot; recently gave the following results

sabayon grub / GX700 machine - 0.97-r13
&quot;linux-gate.so.1 =&gt;  (0xffffe000)
libc.so.6 =&gt; /lib32/libc.so.6 (0xf7e2a000)
/lib/ld-linux.so.2 (0xf7f91000)&quot;

normal grub / Shuttle - 0.97-r4
&quot;linux-gate.so.1 =&gt;  (0xffffe000)
libc.so.6 =&gt; /lib32/libc.so.6 (0xf7df6000)
/lib/ld-linux.so.2 (0xf7f5a000)&quot;

as you can see no ncurses
I&apos;ve just re-emerged grub on both machines they both now give
&quot;linux-gate.so.1 =&gt;  (0xffffe000)
libncurses.so.5 =&gt; /lib32/libncurses.so.5 (0xf7eaa000)
libc.so.6 =&gt; /lib32/libc.so.6 (0xf7d7a000)
libdl.so.2 =&gt; /lib32/libdl.so.2 (0xf7d76000)
/lib/ld-linux.so.2 (0xf7f25000)&quot;

and auto completion now works
this only seemed to start working after emerging a load of other packages on top of the stage3 amd64 image (I&apos;m gradually building my laptop up to the same as another machine)
so perhaps this is a depend issue with something not being compiled in before grub is emerged
I think to replicate the problem maybe you could try to start with a fresh stage3 install, under amd64 then emerge grub right away on the livecd inside the chroot
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>garlicbread@ntlworld.com</who>
            <bug_when>2008-03-28 23:57:58 0000</bug_when>
            <thetext>just spotted a new ebuild in the tree 0.97-r5, I&apos;ve not tried it
but it seems to have ncurses as a option / use flag
so maybe this will fix the problem

although if this is used for new installs at some point, it may be best for something to be mentioned in the install documentation, that ncurses needs to be enabled to get auto-completion when setting up the boot loader (or perhaps it should be on by default)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-03-29 01:29:03 0000</bug_when>
            <thetext>i added USE=ncurses as an option, but that doesnt change the behavior at all.  --with-curses (USE=ncurses) is the default behavior.

amd64 needs the 32bit ncurses lib in order to build with ncurses support

http://sources.gentoo.org/sys-boot/grub/grub-0.97-r5.ebuild?r1=1.2&amp;r2=1.3</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@dstutz.com</who>
            <bug_when>2008-03-29 02:19:53 0000</bug_when>
            <thetext>I had this problem for a while and none of the grub ebuilds worked ok, including grub-static.  I don&apos;t know for sure what fixed it but I noticed it had started working ok (and still does right now) sometime after I had done an &quot;emerge -e world&quot; to rebuild my system after a glibc upgrade.  I wonder if it&apos;s somehow a dependency of a dependency.  My grub is not linked against linux-gate.so.1, but is linked against ncurses (the particular 32-bit library is from the app-emulation/emul-linux-x86-baselibs-20080316 package).

My glibc has the following use flags enabled:
USE=&quot;gd hardened nls -debug -glibc-omitfp -multilib -profile (-selinux) -vanilla&quot;

more glibc info:
# /lib32/libc.so.6
GNU C Library stable release version 2.6.1, by Roland McGrath et al.
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.4.6 (Gentoo Hardened 3.4.6-r2 p1.5, ssp-3.4.6-1.0, pie-8.7.10).
Compiled on a Linux &gt;&gt;2.6.23-gentoo-r8&lt;&lt; system on 2008-02-16.
Available extensions:
        C stubs add-on version 2.1.2
        crypt add-on version 2.1 by Michael Glad and others
        Gentoo patchset 1.1
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        Support for some architectures added on, not maintained in glibc core.
        BIND-8.2.3-T5B
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/libc/bugs.html&gt;.

BTW, I migrated my existing system to the hardened profile last month and the grub autocompletion was at that point and continues to work as it should.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-03-29 03:11:20 0000</bug_when>
            <thetext>linux-gate is a &quot;fake&quot; library ... just ignore it</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mail@patrick-nagel.net</who>
            <bug_when>2008-05-06 00:53:52 0000</bug_when>
            <thetext>That will probably cause *any* amd64 system to have emul-libs installed. We&apos;re talking about a 25 MB download here:

[ebuild  N    ] app-emulation/emul-linux-x86-baselibs-20080316  24,596 kB
[ebuild     U ] sys-boot/grub-0.97-r5 [0.97-r4] USE=&quot;ncurses%* -custom-cflags -netboot -static&quot; 1,013 kB

Is there really no other way to solve this?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-05-06 11:54:11 0000</bug_when>
            <thetext>the solution is to sacrifice functionality ... and in fact, it&apos;s already there

if you dont want the functionality, then build grub with USE=-ncurses ... seems pretty straight forward to me</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>james.georgas@yahoo.ca</who>
            <bug_when>2008-05-09 21:03:36 0000</bug_when>
            <thetext>Sorry,why does grub need a 32 bit ncurses on amd64? Why can&apos;t it use a 64 bit ncurses instead?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-05-10 09:17:38 0000</bug_when>
            <thetext>grub is a 32bit application</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>james.georgas@yahoo.ca</who>
            <bug_when>2008-05-10 14:10:28 0000</bug_when>
            <thetext>I bet you know what my next question is going to be...</thetext>
          </long_desc>
      
    </bug>

</bugzilla>