LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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

Reply
 
Search this Thread
Old 11-14-2011, 03:37 PM   #46
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7

Code:
What happens if you press "SHIFT" during boot?
nothing
 
Old 11-14-2011, 03:50 PM   #47
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
one question.should i install grub in /dev/sdb1.(i have grub installed in /dev/sda1)?
 
Old 11-14-2011, 04:54 PM   #48
Roken
Member
 
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 252

Rep: Reputation: 40
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
 
Old 11-14-2011, 05:00 PM   #49
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
i built the lfs with trisquel and i got the same error(kernel-panic...)again
 
Old 11-15-2011, 01:28 AM   #50
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
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'
 
Old 11-15-2011, 02:24 AM   #51
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
guys, when i chroot and cat /etc/mtab it's empty.isn't it weird?
it shoud show the file systems that is mounted!!!
 
Old 11-15-2011, 06:11 AM   #52
Roken
Member
 
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 252

Rep: Reputation: 40
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.
 
Old 11-15-2011, 07:14 AM   #53
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
yes i did.i replaced =m with =y in .config
 
Old 11-15-2011, 08:00 AM   #54
liquidkaleidoscopes
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Rep: Reputation: Disabled
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.
 
Old 11-15-2011, 08:28 AM   #55
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Hi,
Quote:
Originally Posted by devilboy09 View Post
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.

Hope this helps.
 
Old 11-15-2011, 09:09 AM   #56
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
Code:
Secondly, is your GRUB installation still broken?
no,it's working again
 
Old 11-15-2011, 09:16 AM   #57
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
Code:
It seems you have fixed your boot problem, or did you reinstall everything?
i fixed that in rescue mode
Code:
Is you host still on /dev/sda1 and LFS on /dev/sdb1?
yes
Code:
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)
yes.they're there
 
Old 11-15-2011, 10:22 AM   #58
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
Code:
 If you need to, take pictures of them, and post the pictures to a free picture-sharing site.
here is the picture that shows where i am stuck:
http://hotfile.com/dl/135110488/60e6a4e/lfs.png.html
 
Old 11-15-2011, 10:59 AM   #59
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
So now you got host running maybe post grub.cfg from lfs and host grub.cfg I,m sure this will help ppl.
 
Old 11-15-2011, 11:11 AM   #60
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
Code:
 maybe post grub.cfg from lfs
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 11:12 AM.
 
  


Reply

Tags
grub, kernel, lfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Good but sorta easy guide to Kernel compiling/Re-Compiling? linus72 Linux - General 1 07-13-2009 01:37 PM
Compiling a module separately without compiling entire kernel kushalkoolwal Linux - Kernel 8 08-06-2008 01:45 AM
compiling kernel problem --- Kernel panic: unable to mount root fs ........ anthonymts123 Linux - General 5 07-31-2006 02:29 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM


All times are GMT -5. The time now is 04:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration