Since lfs dev has switched to grub2,.I want to try it. I don't know why grub2 fails to work properly on my system. It seems to choke on partitions/filesystems on my sata hard drives. I built grub-1.97 exactly from the instructions in lfs dev. Searching google proved fruitless in solving the bizarre failure messages:
error: cannot seek `/dev/sda' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. Auto-detection of a filesystem module failed. You attempted a cross-disk install, but the filesystem containing /boot/grub does not support UUIDs. error: no such partition Here is more info with some commands and their results: # cat /etc/lfs-release 6.4 - jhalfs build # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda11 11G 6.7G 3.7G 65% / tmpfs 760M 0 760M 0% /dev/shm # mount /dev/sda11 on / type ext3 (rw) /proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=4,mode=620) tmpfs on /dev/shm type tmpfs (rw) # ./ver_linux If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes. Linux lfs 2.6.31.4-noremap #2 Sun Oct 18 17:31:07 EDT 2009 i686 pentium3 i386 GNU/Linux Gnu C 4.3.2 Gnu make 3.81 binutils 2.18 util-linux 2.14.1 mount support module-init-tools 3.4.1 e2fsprogs 1.41.3 Linux C Library 2.8 Dynamic linker (ldd) 2.8 Linux C++ Library 6.0.10 Procps 3.2.7 Kbd 1.14.1 Sh-utils 6.12 Modules Loaded usblp snd_ens1371 PKG="grub2" PKG_VERSION="1.97" PKG_FILE="grub-1.97.tar.gz" URL="ftp://alpha.gnu.org/gnu/grub/grub-1.97.tar.gz" mkdir build cd build ../configure --prefix=/usr \ --sysconfdir=/etc \ --disable-largefile \ --disable-grub-emu \ --disable-grub-emu-usb \ --disable-grub-fstest \ --disable-efiemu make make install # grub-mkdevicemap # cat /boot/grub/device.map (fd0) /dev/fd0 (hd0) /dev/sda (hd1) /dev/sdb # grub-install --grub-setup=/bin/true /dev/sda11 error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. Auto-detection of a filesystem module failed. Please specify the module with the option `--modules' explicitly. # ls /boot/grub acpi.mod datetime.mod iso9660.mod part_acorn.mod sh.mod affs.mod device.map jfs.mod part_amiga.mod sleep.mod afs_be.mod diskboot.img jpeg.mod part_apple.mod tar.mod afs.mod dm_nv.mod kernel.img part_gpt.mod terminfo.mod aout.mod drivemap.mod keystatus.mod partmap.lst test.mod ata.mod echo.mod linux16.mod part_msdos.mod tga.mod ata_pthru.mod efiemu.mod linux.mod part_sun.mod true.mod at_keyboard.mod elf.mod lnxboot.img parttool.lst udf.mod befs_be.mod ext2.mod loadenv.mod parttool.mod ufs1.mod befs.mod extcmd.mod loopback.mod password.mod ufs2.mod biosdisk.mod fat.mod lsmmap.mod pci.mod uhci.mod bitmap.mod font.mod ls.mod play.mod usb_keyboard.mod blocklist.mod fs_file.mod lspci.mod png.mod usb.mod boot.img fshelp.mod lua.mod probe.mod usbms.mod boot.mod fs.lst lvm.mod pxeboot.img usbtest.mod bsd.mod fs_uuid.mod mdraid.mod pxecmd.mod vbeinfo.mod bufio.mod gfxterm.mod memdisk.mod pxe.mod vbe.mod cat.mod gptsync.mod memrw.mod raid5rec.mod vbetest.mod cdboot.img gzio.mod minicmd.mod raid6rec.mod vga.mod chain.mod halt.mod minix.mod raid.mod vga_text.mod cmp.mod handler.lst mmap.mod read.mod video_fb.mod command.lst handler.mod moddep.lst reboot.mod video.mod configfile.mod hdparm.mod msdospart.mod reiserfs.mod videotest.mod cpio.mod hello.mod multiboot.mod scsi.mod xfs.mod cpuid.mod help.mod normal.mod search.mod xnu.mod crc.mod hexdump.mod ntfscomp.mod serial.mod xnu_uuid.mod datehook.mod hfs.mod ntfs.mod setjmp.mod date.mod hfsplus.mod ohci.mod sfs.mod # grub-install --grub-setup=/bin/true /dev/sda error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. Auto-detection of a filesystem module failed. Please specify the module with the option `--modules' explicitly. # grub-install --grub-setup=/bin/true --modules=ext2 /dev/sda error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. You attempted a cross-disk install, but the filesystem containing /boot/grub does not support UUIDs. # grub-install --grub-setup=/bin/true --modules=ext2 /dev/sda11 error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. error: cannot seek `/dev/sda' error: cannot seek `/dev/sdb' error: cannot seek `/dev/sdb' grub-probe: error: Cannot find a GRUB drive for /dev/sda11. Check your device.map. Installation finished. No error reported. This is the contents of the device map /boot/grub/device.map. Check if this is correct or not. If any of the lines is incorrect, fix it and re-run the script `grub-install'. (fd0) /dev/fd0 (hd0) /dev/sda (hd1) /dev/sdb # mke2fs /dev/fd0 mke2fs 1.41.3 (12-Oct-2008) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 184 inodes, 1440 blocks 72 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=1572864 1 block group 8192 blocks per group, 8192 fragments per group 184 inodes per group Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 38 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. # mount /dev/fd0 /mnt # mkdir /mnt/boot # cp -a /boot/grub /mnt/boot # cat /boot/grub-1-keep/menu.lst default saved timeout 10 title LFS-6.4 SYSTEM 2.6.31.4-noremap (0) root (hd0,10) kernel /boot/lfskernel-2.6.31.4-noremap root=/dev/sda11 ide_core.noprobe=0.0 ide_core.noprobe=0.1 savedefault # cat /mnt/boot/grub/grub.cfg set default=0 set timeout=10 menuentry "LFS-6.4 SYSTEM 2.6.31.4-noremap (0)" { insmod ext2 set root=(hd0,11) linux /boot/lfskernel-2.6.31.4-noremap root=/dev/sda11 ide_core.noprobe=0.0 ide_core.noprobe=0.1 } ======================================================== REBOOT ======================================================== GNU GRUB Version 0.97 grub> root (hd0,10) grub> kernel /boot/grub/core.img grub> boot -------------------- Welcome to GRUB! -------------------- ---------------------------- Entering rescue mode ... error: no such partition ---------------------------- grub rescue> help ---------------------------- Unknown command 'help' ---------------------------- grub rescue> set ----------------------------- prefix=(hd0,11)/boot/grub root=hd0,11 ----------------------------- grub rescue> insmod help ----------------------------- error: no such partition ----------------------------- grub rescue> ls ----------------------------- (hd0) (hd1) (hd127) (fd0) ----------------------------- grub rescue> set root=fd0 grub rescue> prefix=(fd0)/boot/grub grub rescue> insmod help grub rescue> help --------------------------------------------------- export ENVVAR help [PATTERN ...] insmod MODULE ls [ARG] set [ENVVAR=VALUE] unset ENVVAR --------------------------------------------------- grub rescue> insmod configfile grub rescue> configfile grub.cfg sh:grub> help --------------------------------------------------- LOTS OF TOPICS --------------------------------------------------- sh:grub> insmod cat sh:grub> cat /boot/grub/grub.cfg ------------------------------------------------------------------------ set default=0 set timeout=10 menuentry "LFS-6.4 SYSTEM 2.6.31.4-noremap (0)" { insmod ext2 set root=(hd0,11) linux /boot/lfskernel-2.6.31.4-noremap root=/dev/sda11 \ ide_core.noprobe=0.0 ide_core.noprobe=0.1 } ------------------------------------------------------------------------ sh:grub> configfile /boot/grub/grub.cfg ------------------------------------------------------------------------ GNU GRUB version 1.97 LFS-6.3 SYSTEM 2.6.31.4-noremap (0) ------------------------------------------------------------------------ error: no such partition Press any key to continue ... All above happens with grub-1.97.1 also. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
