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. 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. > linux /boot/vmlinuz-3.2.6-lfs-7.1 root=/dev/sdb1 ro > } > ### END /etc/grub.d/30_os-prober ### > After rebooting select LFS 7.1 in the boot option(ubuntu can start up and run > correctly.) and appear the same errors as before. > > ...md: ... autorun DONE. > Root-NFS: on NFS server address...... > (1)Then I do a test according to what Ken said. > Copy initrd.img-2.6.32-41-generic from /boot of the ubuntuto /boot of LFS, > and change the name toinitrd.img-3.2.6-lfs-7.1, and add it to grub.cfg of > ubuntu as follows. > > ### 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 > linux /boot/vmlinuz-3.2.6-lfs-7.1 root=/dev/sdb1 ro > initrd /boot/initrd.img-3.2.6-lfs-7.1 > } > ### END /etc/grub.d/30_os-prober ### > After the same operation the error prompt changes to : > > > 1039/oom_score_adj instead. > Begin: Loading essential drivers... ... > Done. 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). Also, by labelling the ubuntu kernel as 'lfs' you will soon confuse yourself, and are very likely to confuse everyone who reads this thread! 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. > 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. ĸen -- das eine Mal als Tragödie, das andere Mal als Farce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page