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.
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.
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?
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.
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?
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.
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.
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
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.
@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).
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.