LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-16-2011, 10:42 AM   #76
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10

i'm stuck guys.please help

Last edited by devilboy09; 11-16-2011 at 11:16 AM.
 
Old 11-16-2011, 10:55 AM   #77
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
There's no reason that this should make a difference, but I'm running out of ideas.

In grub.cfg where you have your menuentry for lfs, I'm assuming that is still looks like:

Code:
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
}
Try changing it to:
Code:
menuentry "Linux From Scratch (7.0) (on /dev/sdb1)"  {
	insmod ext2
        insmod part_msdos
	set root='(hd1,msdos1)'
	linux /boot/vmlinuz-3.1-lfs-7.0 root=/dev/sdb1 ro
}
EDIT: BTW, I still much prefer to use 40_custom and update-grub rather than amending grub.cfg directly. for a couple of reasons:

1. Less chance of breaking grub.cfg
2. If you update your kernel on the host using either apt or dpkg it will reconfigure grub and leave you back at having to manually reconfigure.

Last edited by Roken; 11-16-2011 at 10:58 AM.
 
Old 11-16-2011, 11:26 AM   #78
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
Code:
Try changing it to:
Code:
menuentry "Linux From Scratch (7.0) (on /dev/sdb1)"  {
	insmod ext2
        insmod part_msdos
	set root='(hd1,msdos1)'
	linux /boot/vmlinuz-3.1-lfs-7.0 root=/dev/sdb1 ro
}
Nope.didn't work.what does 'insmod part_msdos' do, by the way?
 
Old 11-16-2011, 11:40 AM   #79
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
It simply makes the filesystem available. On your system I'm not sure why it's being used but your host boot entries all use it. insmod ext2 and (hd1,x) should be sufficient. That's why I wasn't confident that it would make any difference. It was very much a shot in the dark.
 
Old 11-16-2011, 11:43 AM   #80
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
After the changes to your kernel build (ignoring that grub.cfg change, which you can reverse now) - are you still getting exactly the same kernel panic at boot?
 
Old 11-16-2011, 12:07 PM   #81
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
this is the output of bootinfoscript :
Code:
                  Boot Info Script 0.60    from 17 May 2011


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for ?? on this drive.
 => No boot loader is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 11.10
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sda5: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sdb1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files:        /etc/fstab

sdb2: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048    61,466,623    61,464,576  83 Linux
/dev/sda2          61,468,670    62,912,511     1,443,842   5 Extended
/dev/sda5          61,468,672    62,912,511     1,443,840  82 Linux swap / Solaris


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1               2,048    52,430,847    52,428,800  83 Linux
/dev/sdb2          52,430,848    62,914,559    10,483,712  83 Linux


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        9d23a708-c101-428e-9443-77455bd0e1de   ext4       
/dev/sda5        f85bafa5-e848-47a3-8422-e5f2a790699c   swap       
/dev/sdb1        b63652fc-a69d-462b-9fbf-637514180bb6   ext4       
/dev/sdb2        a237a081-8cf5-4a71-955f-4c79043812d0   swap       

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,errors=remount-ro,commit=0)


=========================== sda1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# 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)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos1)'
	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 ###
--------------------------------------------------------------------------------

=============================== sda1/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=9d23a708-c101-428e-9443-77455bd0e1de /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=f85bafa5-e848-47a3-8422-e5f2a790699c none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

--------------------------------------------------------------------------------

=================== sda1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

   8.461952209 = 9.085952000    boot/grub/core.img                             1
  20.386268616 = 21.889589248   boot/grub/grub.cfg                             1
   0.646472931 = 0.694145024    boot/initrd.img-3.0.0-12-generic               1
   8.395706177 = 9.014820864    boot/vmlinuz-3.0.0-12-generic                  1
   0.646472931 = 0.694145024    initrd.img                                     1
   8.395706177 = 9.014820864    vmlinuz                                        1

=============================== sdb1/etc/fstab: ================================

--------------------------------------------------------------------------------
# Begin /etc/fstab
# file system  mount-point    type     options            dump  fsck
/dev/sdb1   /  ext4     defaults                           1      1          
/dev/sdb2      swap     swap                               0      0           
proc        /proc      proc            defaults            0      0  
sysfs       /sys        sysfs         defaults             0      0    
devpts      /dev/pts        devpts         gid=4,mode=620  0      0
tmpfs       /run          tmpfs      defaults              0      0     
#

# End /etc/fstab
--------------------------------------------------------------------------------

=================== sdb1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

   0.345539093 = 0.371019776    boot/vmlinuz-3.1-lfs-7.0                       2

=============================== StdErr Messages: ===============================

To be able to see for which directory Grub2 (v1.99) looks for, install "unlzma".
and fsck /dev/sdb1
Code:
root@ubuntu:/home/devilboy# fsck /dev/sdb1
fsck from util-linux 2.19.1
e2fsck 1.41.14 (22-Dec-2010)
/dev/sdb1: recovering journal
/dev/sdb1 has been mounted 29 times without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sdb1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdb1: 285314/1638400 files (0.1% non-contiguous), 1523582/6553600 blocks

Last edited by devilboy09; 11-16-2011 at 12:20 PM.
 
Old 11-16-2011, 01:25 PM   #82
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

First of all: bootinfoscript: Nice script! Never seen it before and just downloaded it from sourceforge, thanks for the (indirect) tip!!

As far as I can tell, all is in place. This does strengthen my feeling that the kernel still isn't correct.

- The /dev/sdb1 entry might look bare compared to the /dev/sda1 one, but the same is shown on my box for the other partitions that aren't the actuall partition grub was installed/configured on.

- There is a 83 linux Id System tag on /dev/sdb2, which should be 82] Linux swap / Solaris. But this isn't a show stopper.

- The change Roken wisely suggested about the grub.cfg LFS entry is still present. You might want to take Roken's advise and return it to what it was before.

- The Location of files loaded by Grub section shows less info for sdb1 then sda1: Same is true for me, so that should be OK.


If you boot into LFS the process stops at a certain point.
Could you post the following (2 or 3 screen-shots is probably easiest) if at all possible:
- the screen shown
- a page up
- another page up

The screen shown isn't the one I'm particularly interested in, the other 2 (3 if you want) are. I do believe clue's can be found in what the kernel (doesn't) load or incorrectly loads in the part that has scrolled of the visible screen.

Hope this helps.
 
Old 11-16-2011, 01:49 PM   #83
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
this is a recording from my screen when i power on my machine.(in the video you see that the distribution is ubuntu, but i got the same error in debian and trisquel too)
http://hotfile.com/dl/135216605/0143...ure-1.rar.html
 
Old 11-16-2011, 02:12 PM   #84
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Well, that was enlightening!

Although I'm not sure how to solve this from the top of my head I do know why your boot stops: No hard-drives/partitions are seen by your kernel.

Can you post your current LFS .config file? (using pastbin, not hotfile...).
 
Old 11-16-2011, 02:25 PM   #85
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Is it possible to move the lfs to a dual boot instead of vm would that help in anyway?
 
Old 11-16-2011, 02:29 PM   #86
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
Just had a thought. Try booting and at grub highlight the LFS entry and press "e" to enter edit mode. In edit mode change the line

Code:
linux /boot/vmlinuz-3.1-lfs-7.0 root=/dev/sdb1 ro
to

Code:
linux /vmlinuz-3.1-lfs-7.0 root=/dev/sdb1 ro
Then press ctrl-x to continue with the boot. Let us know if it makes any difference. NOTE that this does NOT make any permanent change to grub, and on the next boot grub will be as it was before.

It may also be useful for us to see the output of
Code:
ls -l /boot

Last edited by Roken; 11-16-2011 at 02:31 PM.
 
Old 11-16-2011, 02:35 PM   #87
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

@Roken: I don't think that will help: The kernel is found at the correct location and initialized, but it does not see/detect any HD's (have a detailed look at the posted avi).
 
Old 11-16-2011, 02:42 PM   #88
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
Code:
Code:
linux /vmlinuz-3.1-lfs-7.0 root=/dev/sdb1 ro
Then press ctrl-x to continue with the boot. Let us know if it makes any difference. NOTE that this does NOT make any permanent change to grub, and on the next boot grub will be as it was before.
i got the same error
 
Old 11-16-2011, 02:46 PM   #89
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
Code:
Can you post your current LFS .config file?
http://pastebin.com/NZXttitK
 
Old 11-16-2011, 02:46 PM   #90
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
A suggestion at grub select c type set root=(hd then tab what is the output
 
  


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 02:37 PM
Compiling a module separately without compiling entire kernel kushalkoolwal Linux - Kernel 8 08-06-2008 02:45 AM
compiling kernel problem --- Kernel panic: unable to mount root fs ........ anthonymts123 Linux - General 5 07-31-2006 03:29 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration