Ken Moffat wrote:
> On Fri, May 25, 2012 at 05:07:19PM +0800, Omar wrote:
>> ### BEGIN /etc/grub.d/30_os-prober ###
>> menuentry "GNU/Linux, Linux 3.2.6-lfs-7.1 (on /dev/sdb1)" {
>> insmod ext2
>> set root='(hd1,1)'
>> search --no-floppy --fs-uuid --set 63a59ea4-b2dd-4ede-a506-14b8d0a951c5
> 
>  I believe that the fs-uuid is used by grub to find a kernel.  So,
> since you have apparently found your LFS kernel, that parameter is
> probably correct.

The search command is only used by an initrd.  For a standard LFS build, 
you can't use uuid or the search command.

>   On the other hand, and for want of a better idea, please try
> manually editing grub.cfg : copy that menuentry, give it a different
> name in the _menuentry_ e.g. -lfs-7.1-A, and remove
> --fs-uuid --set and the uuid.  I don't know, perhaps grub2 requires
> a uuid.  If that is the case, try another menu entry (-B or
> whatever).  To find the uuid for /dev/sdb1 try (in ubuntu, as root)
> vol_id --uuid /dev/sdb.
> 
>  I do note that on my machines with a shared /boot I use the same
> fs-uuid for each of the several systems on the same disk, so I'm
> doubtful that this is the right answer.

You need, e.g root=/dev/sdb1, and the fs type of /dev/sb1 must be built 
into the kernel (not a module).

If you are talking about ubuntu, then the search line will work, but you 
  need a initrd line too.

>> linux /boot/vmlinuz-3.2.6-lfs-7.1 root=/dev/sdb1 ro

>  And here you have started to run the ubuntu initrd.  Ubuntu kernels
> use initrds, LFS kernels don't (we expect you to compile everything
> needed to boot to at least runlevel 1 into the kernel, *not* as
> modules, i.e. drivers for disks / virtual disks, and drivers for
> filesystems that are always mounted).

Yes.

>  Also, by labelling the ubuntu kernel as 'lfs' you will soon confuse
> yourself, and are very likely to confuse everyone who reads this
> thread!

LOL.  Yes.

>  When a conventional system fails to finish booting, we can often
> try adding ' init=/bin/bash' to the command line in grub.  If that
> works, you will get a read-only root filesystem and can then step
> through the the initscripts (everything in rcS.d, and then rc3.d if
> you get that far).
> 
>  Note that you *must* use a self-compiled kernel, with the correct
> options for your virtual hardware, to do this.  Actually, I start to
> wonder if your original problem was partly down to not including the
> driver(s) for your virtual disks, or for the filesystems you are
> actually using.

I gets a little tricky in a virtual environment.  You have to build in 
the HW drivers as well as the fs drivers.

>> So! If the above all prompt that LFS 7.1 really need its own 
 >> initrd.img. I don't know how to generate it now because lfs7.1 book
>> doesn't contain the content. I'll search and have some other tries. 

>  No, ubuntu needs an initrd, and that has to match the kernel.  We
> don't use them.

BLFS can create a generic initrd for some uses.  See 
http://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html

But that may be premature.

   -- 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