From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JnE9F-0002hQ-GM for mharc-grub-devel@gnu.org; Sat, 19 Apr 2008 10:34:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JnE9D-0002gi-EV for grub-devel@gnu.org; Sat, 19 Apr 2008 10:34:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JnE98-0002fJ-T6 for grub-devel@gnu.org; Sat, 19 Apr 2008 10:34:34 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnE98-0002fD-NP for grub-devel@gnu.org; Sat, 19 Apr 2008 10:34:30 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JnE98-0000YP-UL for grub-devel@gnu.org; Sat, 19 Apr 2008 10:34:31 -0400 Received: from [192.168.178.23] (p54ADE87E.dip.t-dialin.net [84.173.232.126]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1JnE961TfS-0002wE; Sat, 19 Apr 2008 16:34:28 +0200 Message-ID: <480A02F3.7000504@mail.berlios.de> Date: Sat, 19 Apr 2008 16:34:27 +0200 From: Stefan Weil User-Agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080109) MIME-Version: 1.0 To: grub-devel@gnu.org References: <4807AA02.1020909@mail.berlios.de> <20080418132858.GH29226@thorin> In-Reply-To: <20080418132858.GH29226@thorin> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18GIAnvgRPxnO7W3PCazoGayN7PgoVGe0wa9Zh YXrjt6/8XobSOSYcnnUxLAEdEzLfFBMJTotP3DIDaTMp+/7dZN aPcuiHcMeXQjvIjDCf71g== X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) Subject: grub-probe fails during grub2 update (Debian) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2008 14:34:36 -0000 Robert Millan wrote: > On Fri, Apr 18, 2008 at 09:45:52PM +0200, Stefan Weil wrote: >> grub-probe fails like this: >> >> # grub-probe --target=drive --device /dev/sdb1 >> grub-probe: error: Cannot find a GRUB drive for /dev/sdb1. Check your >> device.map. >> >> # device.map is unchanged, see previous output > > Ah, right. I'll see what you mean. Maybe it'd be a good idea to start > generating device.map dynamically; although this has other disadvantages... > > Could you bring this up in grub-devel@gnu.org? I'd like to have it > discussed in upstream. > Hi, see below a test scenario of a grub2 update failure which I had sent to Debian's bug tracking system (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467127). The problem is caused by missing or invalid entries for removable media (CDROM, DVD, USB flash devices with valid OS) in device.map. Missing entries can be caused by insertion of a flash medium. Invalid entries remain after an OS installation from a boot DVD. Regards Stefan Weil Extract from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467127 I should mention a point missing in my last mails which maybe is important: the removable medium must contain a partition with an operating system. Here is my test scenario (see comments) with system output and error messages. # PC with SATA harddisk, USB card reader, no CF or SD card inserted. # grub-mkdevicemap # cat /boot/grub/device.map (hd0) /dev/sda # USB card reader, CF card now inserted. # The CF card provides an EXT3 partition /dev/sdb1 with DEBIAN Linux. # Reinstall latest grub-pc (gives same error like upgrade from older version). # LANG=C apt-get --reinstall install grub-pc Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 5 not upgraded. Need to get 0B/1101kB of archives. After this operation, 0B of additional disk space will be used. Do you want to continue [Y/n]? Preconfiguring packages ... (Reading database ... 253220 files and directories currently installed.) Preparing to replace grub-pc 1.96+20080413-1 (using .../grub-pc_1.96+20080413-1_amd64.deb) ... Unpacking replacement grub-pc ... Setting up grub-pc (1.96+20080413-1) ... Updating /boot/grub/grub.cfg ... Found Debian background: debian-blueish-wallpaper-640x480.png Found linux image: /boot/vmlinuz-2.6.24-1-amd64 Found initrd image: /boot/initrd.img-2.6.24-1-amd64 Found linux image: /boot/vmlinuz-2.6.22-3-amd64 Found initrd image: /boot/initrd.img-2.6.22-3-amd64 Found memtest86+ image: /boot/memtest86+.bin Found openSUSE 10.3 (i586) on /dev/sda5 Found Debian GNU/Linux (lenny/sid) on /dev/sda8 Found Debian GNU/Linux (4.0) on /dev/sdb1 dpkg: error processing grub-pc (--configure): subprocess post-installation script returned error exit status 1 Errors were encountered while processing: grub-pc E: Sub-process /usr/bin/dpkg returned an error code (1) The failing command hierarchy is given here: /var/lib/dpkg/info/grub-pc.postinst configure -- /usr/sbin/update-grub ---- /etc/grub.d/30_os-prober ------ grub-probe --target=drive --device /dev/sdb1 grub-probe fails like this: # grub-probe --target=drive --device /dev/sdb1 grub-probe: error: Cannot find a GRUB drive for /dev/sdb1. Check your device.map. # device.map is unchanged, see previous output