On 28/10/12 17:09, Alan Feuerbacher wrote:
> I'm trying to boot my shiny new LFS 7.2 system for the first time. I
> think I followed the LFS book carefully, but I get boot errors no matter
> what I try in configuring the boot script grub.cfg.
>
> My system is an older custom one with an Intel motherboard and
> processor, and three hard disks:
> /dev/sda for fedora
> /dev/sdb for debian
> /dev/sdc for LFS
>
> I'm using this system to play around with Linux.
>
> In trying to figure out what's going wrong, I found an apparent conflict
> between what grub manuals say and what the LFS book says about grub's
> partition numbering scheme. The book says that grub numbers the
> partitions starting from one, but the online info I've read says that it
> starts from zero. Since I don't know better, I've tried both ways. I've
> also tried different combinations of parameters in the grub.cfg file, as
> shown below.
>
> Here's the grub.cfg file set up according to the LFS book:
>
> root:/boot/grub# cat grub.cfg
> # Begin /boot/grub/grub.cfg
> set default=0
> set timeout=5
>
> insmod ext2
> set root=(hd2,1)
>
> menuentry "GNU/Linux, Linux 3.5.2-lfs-7.2" {
> linux /vmlinuz-3.5.2-lfs-7.2 root=/dev/sdc1 ro
> }
>
> Here are the variations I've tried, and the errors produced upon trying
> to boot:
>
> According to the LFS book and the above grub.cfg:
>
> With set root=(hd2,1)
> linux /vmlinuz-3.5.2-lfs-7.2 root=/dev/sdc1 ro
> error: file '/vmlinuz-3.5.2-lfs-7.2' not found.
>
> Several variations:
>
> With set root=(hd2,1)
> linux vmlinuz-3.5.2-lfs-7.2 root=/dev/sdc1 ro
> error: invlaid file name 'vmlinuz-3.5.2-lfs-7.2'.
>
> With set root=(hd2,0)
> linux /vmlinuz-3.5.2-lfs-7.2 root=/dev/sdc0 ro
> linux /vmlinuz-3.5.2-lfs-7.2 root=/dev/sdc1 ro
> linux vmlinuz-3.5.2-lfs-7.2 root=/dev/sdc0 ro
> linux vmlinuz-3.5.2-lfs-7.2 root=/dev/sdc1 ro
> error: no such partition
>
> Here are printouts showing relevant info about what's in the system:
>
> # As root in the Fedora system:
>
> [root@alan-fedora ~]# fdisk -l
> . . .
> Disk /dev/sdc: 500.1 GB, 500107862016 bytes
> . . .
> Device Boot Start End Blocks Id System
> /dev/sdc1 * 2048 602111 300032 83 Linux
> /dev/sdc2 602112 976773119 488085504 5 Extended
> /dev/sdc5 610470 17382329 8385930 82 Linux swap /
> Solaris
> /dev/sdc6 17383424 59326463 20971520 83 Linux
> /dev/sdc7 59328512 101271551 20971520 83 Linux
> /dev/sdc8 101273600 206131199 52428800 83 Linux
> /dev/sdc9 206133248 310990847 52428800 83 Linux
> /dev/sdc10 310992896 520708095 104857600 83 Linux
> /dev/sdc11 520710144 531195903 5242880 83 Linux
> /dev/sdc12 531197952 552169471 10485760 83 Linux
> /dev/sdc13 552171520 976773119 212300800 83 Linux
>
> Here I change over to the LFS system:
>
> [root@alan-fedora grub]# su - lfs
> lfs:~$ source ~/.bash_profile
> lfs:~$ su root
> Password:
> root:/home/lfs# mount -v --bind /dev $LFS/dev
> root:/home/lfs# mount -vt devpts devpts $LFS/dev/pts
> root:/home/lfs# mount -vt proc proc $LFS/proc
> root:/home/lfs# mount -vt sysfs sysfs $LFS/sys
> root:/home/lfs# if [ -h /dev/shm ]; then
>> rm -f $LFS/dev/shm
>> mkdir $LFS/dev/shm
>> fi
> root:/home/lfs# mount -vt tmpfs shm $LFS/dev/shm
> root:/home/lfs# mount -v --bind /dev $LFS/dev
> root:/home/lfs# /usr/sbin/chroot "$LFS" /tools/bin/env -i \
>> HOME=/root \
>> TERM="$TERM" \
>> PS1='\u:\w\$ ' \
>> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
>> /tools/bin/bash --login +h
> root:/#
>
> root:/# mount -l
> /dev/sdc1 on /boot type ext3 (rw)
> /dev/sdc8 on /opt type ext3 (rw,user_xattr)
> shm on /dev/shm type tmpfs (rw)
> /dev on /dev type none (rw,bind)
>
> root:/# cd /boot
> root:/boot# ls -l
> total 7376
> -rw-r--r-- 1 root root 84618 Oct 28 06:41 config-3.5.2
> drwxr-xr-x 4 root root 4096 Oct 28 07:57 grub
> -rw-r--r-- 1 root root 2078325 Oct 28 06:41 System.map-3.5.2
> -rw-r--r-- 1 root root 5359664 Oct 28 06:41 vmlinuz-3.5.2-lfs-7.2
>
> root:/boot# cd grub
> root:/boot/grub# ls -l
> total 24
> -rw-r--r-- 1 root root 190 Oct 28 07:57 grub.cfg
> -rw-r--r-- 1 root root 1024 Oct 28 06:45 grubenv
> drwxr-xr-x 2 root root 12288 Oct 28 06:45 i386-pc
> drwxr-xr-x 2 root root 4096 Oct 28 06:45 locale
>
> root:/boot/grub# cat grub.cfg
> # Begin /boot/grub/grub.cfg
> set default=0
> set timeout=5
>
> insmod ext2
> set root=(hd2,1)
>
> menuentry "GNU/Linux, Linux 3.5.2-lfs-7.2" {
> linux /vmlinuz-3.5.2-lfs-7.2 root=/dev/sdc1 ro
> }
>
>
> Any help will be very much appreciated.
> Alan
>
>
Do you have a boot partition if not you might want to try linux
/boot/vmlinuz
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page