Package: grub Version: 0.95+cvs20040624-17 Followup-For: Bug #264506 I've just seen this problem before, but i've just come across it again.
For the benefit of other people struggling with this, IIRC, last time I worked around this by using a grub-floppy and typing (from the grub prompt) grub> root (hd0,4) grub> setup (hd0,4) Background ========== I'm installing a new (larger) hard-disk, and restoring my system from backups. I'm adding a additional debian partition hda5 (cloned from my sarge install (hda2) for upgrading to etch). One debian partition is also moving from hda7 -> hda6. The system is booted from Knoppix 4.0.2 [EMAIL PROTECTED] uname -a Linux Knoppix 2.6.12 #2 SMP Tue Aug 9 23:20:52 CEST 2005 i686 GNU/Linux All partitions are formatted ext3 [EMAIL PROTECTED] sudo sfdisk -l /dev/hda Disk /dev/hda: 19457 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/hda1 * 0+ 1529 1530- 12289693+ 7 HPFS/NTFS /dev/hda2 1530 3059 1530 12289725 83 Linux /dev/hda3 3060 4589 1530 12289725 83 Linux /dev/hda4 4590 19456 14867 119419177+ 5 Extended /dev/hda5 4590+ 6119 1530- 12289693+ 83 Linux /dev/hda6 6120+ 6164 45- 361431 83 Linux /dev/hda7 6165+ 6229 65- 522081 82 Linux swap / Solaris /dev/hda8 6230+ 14102 7873- 63239841 b W95 FAT32 /dev/hda9 14103+ 19456 5354- 43005973+ b W95 FAT32 The following procedure worked for hda2 and hda3. (These parttiions where restored to their previous locations). hda5 and hda6 failed. /dev/hda5 ========= chroot into hda5 (running from Knoppix 4.0.2 CD) check /boot/grub/device.map edit /boot/grub/menu.lst .... # kopt=root=/dev/hda5 ro .... # groot=(hd0,4) .... run update-grub check /boot/grub/menu.lst run grub-install Knoppix:/# grub-install /dev/hda5 The file /boot/grub/stage2 not read correctly. Knoppix:/# grub-install --recheck --no-floppy /dev/hda5 Probing devices to guess BIOS drives. This may take a long time. The file /boot/grub/stage2 not read correctly. Knoppix:/# grub-install "(hd0,4)" The file /boot/grub/stage2 not read correctly. Knoppix:/# ls -al /lib/grub/i386-pc/stage? -rw-r--r-- 1 root root 512 Apr 19 2005 /lib/grub/i386-pc/stage1 -rw-r--r-- 1 root root 108168 Apr 19 2005 /lib/grub/i386-pc/stage2 Knoppix:/# cat /tmp/grubfbwUvU GNU GRUB version 0.95 (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> dump (hd0,1)/boot/grub/stage2 /tmp/grub8X4OmU grub> quit ------------------^^^ hda2 is the partition that hda5 was cloned from. Knoppix:/# ls -al /tmp/grub8X4OmU -rw------- 1 root root 108168 Jan 1 20:26 /tmp/grub8X4OmU /dev/hda6 ========= chroot into hda6 (still running from Knoppix 4.0.2 CD) checked /grub/device.map edited /grub/boot/menu.lst .... # kopt=root=/dev/hda6 ro .... # groot=(hd0,5) .... run update-grub Knoppix:/# grub-install /dev/hda6 The file /boot/grub/stage1 not read correctly. Knoppix:/# ls -al /lib/grub/i386-pc/stage? -rw-r--r-- 1 root root 512 Apr 19 2005 /lib/grub/i386-pc/stage1 -rw-r--r-- 1 root root 108168 Apr 19 2005 /lib/grub/i386-pc/stage2 Knoppix:/# cat /tmp/grubfcNC6G GNU GRUB version 0.95 (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> dump (hd0,6)/boot/grub/stage1 /tmp/grubIT7NiJ Error 17: Cannot mount selected partition grub> quit ------------------^^^ this partition was moved from hda7 Knoppix:/# ls -al /tmp/grubIT7NiJ -rw------- 1 root root 0 Jan 1 19:55 /tmp/grubIT7NiJ Neither re-installing grub nor purging/installing fixes the problem. Upgrading grub to sid does not fix the problem. I won't need to fix this for a few days, so if you want more info just ask. Andrew V. -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.12 Note that this is the Knoppix kernel that I'm running under Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C) Versions of packages grub depends on: ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libncurses5 5.4-4 Shared libraries for terminal hand -- no debconf information -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.8-2-686 Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1) Versions of packages grub depends on: ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libncurses5 5.4-4 Shared libraries for terminal hand -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]