Theodore Papamarkou wrote:

>    Device Boot Start     End   #cyls    #blocks   Id  System
> /dev/sda1   *      0+   7649-   7649-  61440000   83  Linux
> /dev/sda2      14020+  14593-    574-   4603905    5  Extended
> /dev/sda3       7649+  14019-   6371-  51174400   83  Linux
> /dev/sda4          0       -       0          0    0  Empty
> /dev/sda5      14020+  14593-    574-   4603904   82  Linux swap / Solaris

> ls (hd0,msdos3)/

I've never seen this.  What does 'ls (hd0,3)' give the same?

> which printed out the following:
> 
> lost+found sources sys

> This apparently means that /boot, as well as the rest of directories in
> /mnt/lfs, are not mounted. If I boot to Kubuntu and give

> ls /mnt/lfs

> bin  boot  dev  device.map  etc  home  lib  media  mnt  opt  proc  root
>  sbin  sources  srv  sys  tmp  usr  var

What does the 'mount' command give?  From the above, it looks like you 
built LFS without mounting /dev/sda3 on /mnt/lfs.

> Finally, I tried the following while on Kubuntu 10.10:
> su - root 
> mount -v --bind /dev $LFS/dev
> 
> mount -vt devpts devpts $LFS/dev/pts
> mount -vt tmpfs shm $LFS/dev/shm
> mount -vt proc proc $LFS/proc
> mount -vt sysfs sysfs $LFS/sys
> 
> chroot "$LFS" /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ '
> PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login
> 
> /sbin/reboot

You should not be rebooting from chroot.

If you followed the book precisely, the kernel should be on 
(hda0,3)/boot, but GRUB needs to be able to find menu.cfg.  That's why I 
recommend installing /boot on a partition of about 100M by itself.  All 
distros can then access that.

You should be using the procedures in the book's Section 8.4.3 to test:

First exit chroot and sudo /sbin/reboot.  Then go to the GRUB2 command 
line and run:

grub> ls (hd0,3)/boot

This should list your kernels.

Then you should just do:

linux (hd0,3)/boot/my-kernel-name root=/dev/hda3
boot

I note that the instructions in the book can be misread.  8.4.3 says:
"you will need to exit the chroot environment and re-enter it to finish 
the few remaining portions of the book."   What that means is that you 
ned to return to your host system for the instructions in 8.4.3 and 
return back to chroot for section 8.4.4 until section 9.3.

   -- Bruce

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to