LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-04-2012, 03:31 AM   #1
swatch
LQ Newbie
 
Registered: Nov 2012
Posts: 14

Rep: Reputation: Disabled
About booting of LFS7.2


First,I just do the LFS7.2 in the USB.
After I had done the LFS7.2 system ,I rebooted the system and chose the LFS7.2 system.It booted but sometime it stopped.The screen happens:
No filesystem could mount root,tried :ext3 vfat msdos iso9660
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,5)
Pid:1,comm:swapper/0 Not tainted 3.5.2 #1
Call Trace
Could anyone help me ?

Last edited by swatch; 12-04-2012 at 04:07 AM.
 
Old 12-04-2012, 04:50 AM   #2
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
Hi

Can you post your grub.cfg file and
Fstab
 
Old 12-04-2012, 06:49 AM   #3
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
What filesystem do you have? I remember I had to add ext4 to the kernel. If you don't use an initrd, you should include it in the kernel(y) not as module(m). And then recompile the kernel.
 
Old 12-04-2012, 06:55 AM   #4
swatch
LQ Newbie
 
Registered: Nov 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

Can you post your grub.cfg file and
Fstab
sure.fstab:# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/sda5 / ext3 defaults 1 1
/dev/sda1 swap swap pri=1 0 0
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
noauto,user,quiet,showexec,iocharset=utf8,codepage=936
# End /etc/fstab
grub.cfg:# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext3
set root=(hd0,5)
menuentry "GNU/Linux, Linux 3.5.2-lfs-7.2" {
linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sda5 ro
}
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	28
Size:	78.6 KB
ID:	11341   Click image for larger version

Name:	Screenshot-1.png
Views:	24
Size:	83.4 KB
ID:	11342  

Last edited by swatch; 12-04-2012 at 06:58 AM.
 
Old 12-04-2012, 07:12 AM   #5
swatch
LQ Newbie
 
Registered: Nov 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Lennie View Post
What filesystem do you have? I remember I had to add ext4 to the kernel. If you don't use an initrd, you should include it in the kernel(y) not as module(m). And then recompile the kernel.
My filesystem is ext3.

Last edited by swatch; 12-04-2012 at 07:45 AM.
 
Old 12-04-2012, 07:15 AM   #6
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
Hi

Is lfs on usb and where did you install
Grub. Are you booting from usb.
When I built mine on a usb I had to put a delay
When booting usb. Im not at pc at moment but will
Look later and post
 
Old 12-04-2012, 07:25 AM   #7
swatch
LQ Newbie
 
Registered: Nov 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

Is lfs on usb and where did you install
Grub. Are you booting from usb.
When I built mine on a usb I had to put a delay
When booting usb. Im not at pc at moment but will
Look later and post
Yes,I install my lfs on my usb .The grub is in /boot/grub.I booted from usb.It was really booted.But it didn't come into LFS system impartially.
 
Old 12-04-2012, 07:38 AM   #8
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
Are you sure your usb is called sda? You can use uuid in fstab, it's more reliable. Grub thinks it is always on the first disc, but the kernel counts different than grub. Even if you change boot order in bios and boot from usb, it doesn't change your usb to sda if you have an internal drive.
 
Old 12-04-2012, 07:47 AM   #9
swatch
LQ Newbie
 
Registered: Nov 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Lennie View Post
Are you sure your usb is called sda? You can use uuid in fstab, it's more reliable. Grub thinks it is always on the first disc, but the kernel counts different than grub. Even if you change boot order in bios and boot from usb, it doesn't change your usb to sda if you have an internal drive.
I had tried sdb and sdc ,but it doesn't work.
 
Old 12-04-2012, 11:33 AM   #10
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
Hi

You need to find out as Lennie pointed out what your usb is mounted as.
The output of
Code:
sudo blkid
Puts mine as sdc1.
so my fstab looks like this
Code:
# Begin /etc/fstab

# file system  mount-point  type   options         dump  fsck
#                                                        order

/dev/sdc1      /            ext4   defaults        1     1
/dev/sdc2       swap        swap   pri=1           0     0
/dev/sdc5      /home/spiky/Spiky        ext4   defaults        0     2
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
Although grub will look at the drive as the 1st drive, my grub.cfg
Code:
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5


insmod ext2
set root=(hd0,1)

menuentry "Planet-Spike7" {
        linux   /boot/vmlinuz-3.2-lfs-7.0 root=/dev/sdc1 rootdelay=5 ro 
}

set default=0
set timeout=5


insmod ext2
set root=(hd0,1)

menuentry "Panic-Button" {
        linux    /boot/vmlinuz-3.1-lfs-7.0-org root=/dev/sdc1 rootdelay=5 ro
}
Hence (hd0,1) and root is set as sdc1.
I had to add the rootdelay=5 as the usb takes time to be recognised maybe set yours to 10,
 
1 members found this post helpful.
Old 12-04-2012, 11:30 PM   #11
swatch
LQ Newbie
 
Registered: Nov 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

You need to find out as Lennie pointed out what your usb is mounted as.
The output of
Code:
sudo blkid
Puts mine as sdc1.
so my fstab looks like this
Code:
# Begin /etc/fstab

# file system  mount-point  type   options         dump  fsck
#                                                        order

/dev/sdc1      /            ext4   defaults        1     1
/dev/sdc2       swap        swap   pri=1           0     0
/dev/sdc5      /home/spiky/Spiky        ext4   defaults        0     2
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
Although grub will look at the drive as the 1st drive, my grub.cfg
Code:
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5


insmod ext2
set root=(hd0,1)

menuentry "Planet-Spike7" {
        linux   /boot/vmlinuz-3.2-lfs-7.0 root=/dev/sdc1 rootdelay=5 ro 
}

set default=0
set timeout=5


insmod ext2
set root=(hd0,1)

menuentry "Panic-Button" {
        linux    /boot/vmlinuz-3.1-lfs-7.0-org root=/dev/sdc1 rootdelay=5 ro
}
Hence (hd0,1) and root is set as sdc1.
I had to add the rootdelay=5 as the usb takes time to be recognised maybe set yours to 10,
Thank you very much.I do it as you had said.Then it come into system.So this problem must be solved.But I have another question.That is when it check file systems ..,the screen happened:
/dev/sdc5: UNEXPECTED INCONSISTENCY ;RUN fsck MANUALLY.
(i.e., without -a or -p options)
 
Old 12-04-2012, 11:32 PM   #12
swatch
LQ Newbie
 
Registered: Nov 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Lennie View Post
Are you sure your usb is called sda? You can use uuid in fstab, it's more reliable. Grub thinks it is always on the first disc, but the kernel counts different than grub. Even if you change boot order in bios and boot from usb, it doesn't change your usb to sda if you have an internal drive.
Thank you very much.The problem must be solved.But I have another question.That is when it check file systems ..,the screen happened:
/dev/sdc5: UNEXPECTED INCONSISTENCY ;RUN fsck MANUALLY.
(i.e., without -a or -p options)

Last edited by swatch; 12-05-2012 at 04:05 AM.
 
Old 12-05-2012, 07:21 AM   #13
swatch
LQ Newbie
 
Registered: Nov 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

You need to find out as Lennie pointed out what your usb is mounted as.
The output of
Code:
sudo blkid
Puts mine as sdc1.
so my fstab looks like this
Code:
# Begin /etc/fstab

# file system  mount-point  type   options         dump  fsck
#                                                        order

/dev/sdc1      /            ext4   defaults        1     1
/dev/sdc2       swap        swap   pri=1           0     0
/dev/sdc5      /home/spiky/Spiky        ext4   defaults        0     2
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
Although grub will look at the drive as the 1st drive, my grub.cfg
Code:
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5


insmod ext2
set root=(hd0,1)

menuentry "Planet-Spike7" {
        linux   /boot/vmlinuz-3.2-lfs-7.0 root=/dev/sdc1 rootdelay=5 ro 
}

set default=0
set timeout=5


insmod ext2
set root=(hd0,1)

menuentry "Panic-Button" {
        linux    /boot/vmlinuz-3.1-lfs-7.0-org root=/dev/sdc1 rootdelay=5 ro
}
Hence (hd0,1) and root is set as sdc1.
I had to add the rootdelay=5 as the usb takes time to be recognised maybe set yours to 10,
Hello,spiky0011.The problem had been solved.But I have another problem when system checking filesystem,the screen happened :/dev/sdc5 :unexpected inconsistency, run fsck manuallyCan you tell me what I should do ?Thank you.

Last edited by swatch; 12-05-2012 at 07:39 AM.
 
Old 12-05-2012, 07:40 AM   #14
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
You must boot to a live cd or a different partition from the one to check and run as root
Code:
e2fsck -C0 /dev/sdc5
 
Old 12-05-2012, 02:45 PM   #15
erkant
Member
 
Registered: Oct 2012
Posts: 51

Rep: Reputation: Disabled
Try using make defconfig while compiling the kernel, and try using it.
 
  


Reply

Tags
boot, grub, lfs



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
libmpfr error in GCC compilation (LFS7.2) Prabhu.Are Linux From Scratch 27 02-01-2013 09:29 AM
blfs : I Install successfully rpm on my lfs7.2 but there are problems :( k84834 Linux From Scratch 3 12-03-2012 04:26 AM
are these warnings harmful for building LFS7.1 ? k84834 Linux From Scratch 2 08-18-2012 06:43 AM
[SOLVED] seeking information regarding glibc for lfs7.1 install ankit0301 Linux From Scratch 3 04-08-2012 04:37 AM
LXer: Installing Backtrack5 (Ubuntu) using a Thumbdrive for Dual-booting or Solo-booting LXer Syndicated Linux News 0 08-04-2011 02:11 AM

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

All times are GMT -5. The time now is 10:22 AM.

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