Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If you mean the repair install for Debian put it back where it was originally, which will give you a clean slate to start with (i.e. back to your original error condition) but should be booting Debian
If we go back to when you built your kernel, did you include your block controllers as static or as modules (=y or =m)? This would include any SATA, PATA, ATA entries that you have made. If you built them as modules then you should really build those in particular as static so that the kernel can actually find your block devices during boot (modules are loaded from the filesystem, which the kernel can't find without the modules being loaded if they are not static. Catch 22 situation).
That was why I recommended building everything as static rather than as modules. To avoid this issue, but at the very least those drivers mentioned should be static.
I know that you posted some of your error messages, and reiterated that, but would you please post more of them? Ten lines before and ten lines after the actual error might be enough to help us understand the real cause. If you need to, take pictures of them, and post the pictures to a free picture-sharing site.
Secondly, is your GRUB installation still broken? I wish that I could help with GRUB2, but I honestly find it difficult to understand, and still prefer GRUB 1. I want to recommend that you get a GRUB 1 disc and try booting with that, but it would probably be counterproductive in the long run.
i think i should have /dev/sdb1 entry in my host system fstab.because when system is booting there is message that saying 'no such a device /dev/sdb1'
Nope, your host doesn't need the lfs partition in its fstab file (see post #11).
You really need to start with a clean slate and systematically tackle this problem, it seems that you are going around in circles at the moment.
Some clarity might also help, at the moment we don't have a clue about your current situation:
- It seems you have fixed your boot problem, or did you reinstall everything?
- If you reinstalled: Did you follow the LFS book this time?
- If you reinstalled: Is you host still on /dev/sda1 and LFS on /dev/sdb1?
- Did you make sure that the LFS kernel/system.map/config files are present in /mnt/lfs/boot (or /boot from within the chrooted environment)
- Have you tried the LFS grub entry in post #11 (assuming /dev/sdb1 still holds LFS)
- This might be a kernel configuration problem: Post the LFS kernel .config file that was created after you edited the kernel, maybe we see something that can be improved.
i don't have any grub.cfg in my lfs.but thi is the content of /boot:
config-3.1 System.map-3.1 vmlinuz-3.1-lfs-7.0
Code:
and host grub.cfg
here's the grub.cfg:
Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 9d23a708-c101-428e-9443-77455bd0e1de
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 9d23a708-c101-428e-9443-77455bd0e1de
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 9d23a708-c101-428e-9443-77455bd0e1de
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=9d23a708-c101-428e-9443-77455bd0e1de ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 9d23a708-c101-428e-9443-77455bd0e1de
echo 'Loading Linux 3.0.0-12-generic ...'
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=9d23a708-c101-428e-9443-77455bd0e1de ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.0.0-12-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 9d23a708-c101-428e-9443-77455bd0e1de
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 9d23a708-c101-428e-9443-77455bd0e1de
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Linux From Scratch (7.0) (on /dev/sdb1)" {
insmod ext2
set root='(hd1,1)'
linux /boot/vmlinuz-3.1-lfs-7.0 root=/dev/sdb1 ro
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
BTW did you see the picture in the previous post?
i'm sure that my problem is that i should enable something in kernel compilation, but i don't know what?
Last edited by devilboy09; 11-15-2011 at 12:12 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.