LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-04-2011, 03:23 AM   #1
HybridFR
Registered User
 
Registered: May 2011
Distribution: Debian
Posts: 10

Rep: Reputation: 1
My LFS does not boot


Hello everybody, I have a problem at the boot of my LFS (6.6). The trace is:

Populating /dev with device nodes
[ 4.7497771] modprobe used greatest stack depth: 6044 bytes left
[ 5.1244071] mkdir used greatest stack depth: 6024 bytes left [ ok]
Activating all swap files/partitions
swapon: /dev/sda3: stat failed: No such file or directory [ Fail ]
Mounting root file system in read-only mode [ ok ]
Checking file systems
fsck.ext3 No such file or directory while trying to open /dev/sda2
/dev/sda2:
The sperblock could not be read or dose not describe a correct ext2
file system. If the device is valid and it really contains an ext2
file system (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternative superblock:
e2fsck -b 8193 <device>

FAILURE

I am working on virtual machine VMWare workstaion 7, I'm using an SCSI disque and my kernel version is 2.6.32.8. (the construction of my system LFS 6.6 is well).
My host is debian 5.

Thank you for your answers (and sorry for my english).
 
Old 05-04-2011, 03:38 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

First thing that comes to mind: I see sdaX failing (both swap and the root partition). Have you tried switching those entries to hdaX in /etc/fstab?

Code:
This:
/dev/sda2      swap                    swap      pri=1            0     0
/dev/sda3      /                       ext3      defaults         1     1

becomes:
/dev/hda2      swap                    swap      pri=1            0     0
/dev/hda3      /                       ext3      defaults         1     1

/dev/sda3      swap                    swap      pri=1            0     0
/dev/sda2      /                       ext3      defaults         1     1

becomes:
/dev/hda3      swap                    swap      pri=1            0     0
/dev/hda2      /                       ext3      defaults         1     1
Hope this helps.

Last edited by druuna; 05-04-2011 at 01:36 PM. Reason: Fixed mix-up/error.
 
Old 05-04-2011, 01:06 PM   #3
HybridFR
Registered User
 
Registered: May 2011
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: 1
Hi, thank you for your answer druuna,
Yes I tried, there are the same problem. The trace talk about ext2 but I am in ext3 !
May be have I forgotten a module in the kernel configuration, or an bad configuration ?

If you have any ideas ...
 
Old 05-04-2011, 01:35 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

First: I just noticed I swapped sda2 and sda3 in the example in post #2: swap is on sda3 and root on sda2. I'll edit post #2 to reflect the correct situation.
I do hope you tried with the correct settings....

I don't think this is related to the FS being ext2 or ext3. Both partitions are not found, one holds a FS the other is swap. Can you post the output generated by this command:
Code:
fdisk -l
And also your /etc/fstab.

You could be correct about missing a kernel setting. Check if Device Drivers -> Serial ATA... is set and if the correct settings in that sub-menu are present (ATA SFF and the appropriate controller option?).

Hope this helps.
 
Old 05-04-2011, 03:07 PM   #5
HybridFR
Registered User
 
Registered: May 2011
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: 1
Hi,

Yes I used the correct parameter. Otherwise, here my fstab:

Quote:
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/sda2 / ext3 defaults 1 1
/dev/sda3 swap swap pri=1 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 /dev/shm tmpfs defaults 0 0
# End /etc/fstab
Here the output of the commande fdisk -l (from my host):

Quote:
Disk /dev/sda: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier: 0x000acd22

Device Boot Start End Blocks Id System
/dev/sda1 1 12158 97659103+ 83 Linux
/dev/sda2 12223 21145 71673997+ 83 Linux
/dev/sda3 21146 21400 2048287+ 82 Linux swap / Solaris
I set the module to yes in Device Drivers -> Serial ATA...

thank you.
 
Old 05-05-2011, 02:12 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Do you have any hdaX entries in your grub.cfg file? If so; Change these to sdaX

If you are unsure about what to edit in the above file, post it so we can have a look and possibly point you in the right direction.

Both your fstab file and the output of the fdisk command look ok.

Hope this helps.
 
Old 05-05-2011, 02:54 AM   #7
HybridFR
Registered User
 
Registered: May 2011
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: 1
Hi Druuna,

My LFS boot.
To start, in my fstab, I use the UUID of my hard drive instead /dev/sda2.
Then, I set to '0' the last parameter of the first line of my fstab. My fstab looks like this:

Quote:
# Begin /etc/fstab
# file system mount-point type options dump fsck order
/dev/sda2 / ext3 defaults 0 0
#/dev/sda3 swap swap pri=1 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 /dev/shm tmpfs defaults 0 0
# End /etc/fstab
For moment, I commented the swap. In your opinion, is this normal ?
Thank you.

Last edited by HybridFR; 05-05-2011 at 04:46 AM.
 
Old 05-05-2011, 03:23 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by HybridFR View Post
Hi Druuma,
It is druuna, not druuma....

Quote:
To start, in my fstab, I use the UUID of my hard drive instead /dev/sda2.
And you tell this now? And why isn't that visible in your previous and current examples?

If you do not follow the LFS book you should mention that fact, otherwise we assume you did. Did you deviate from the book in any other way?

Quote:
Then, I set to '0' the last parameter of the first line of my fstab. My fstab looks like this:
Quote:
# Begin /etc/fstab
# file system mount-point type options dump fsck order
/dev/sda2 / ext3 defaults 0 0
#/dev/sda3 swap swap pri=1 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 /dev/shm tmpfs defaults 0 0
# End /etc/fstab
So you did change the uuid's into /dev/sdaX entries?

Quote:
For moment, I commented the swap. In your opinion, is this normal ?
Nope, it is not. The fstab as mentioned by you in post #5 is correct and works (it has for me and others).

Did you have a look at my previous reply? If so; Did that solve anything?

Hope this helps.
 
Old 05-05-2011, 01:28 PM   #9
HybridFR
Registered User
 
Registered: May 2011
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: 1
Hi,

Sorry for my mistake druuna, I made ​​the modification of my fstab this morning (before your post). The modification of the fstab is the only one
(without this modification (in post 7), LFS doesn't boot), I understand that it's strange.

Quote:
# Begin /etc/fstab
# file system mount-point type options dump fsck order
/dev/sda2 / ext3 defaults 1 1
/dev/sda3 swap swap pri=1 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 /dev/shm tmpfs defaults 0 0
# End /etc/fstab
and I have the same problem:

Quote:
Populating /dev with device nodes
[ 4.7497771] modprobe used greatest stack depth: 6044 bytes left
[ 5.1244071] mkdir used greatest stack depth: 6024 bytes left [ ok]
Activating all swap files/partitions
swapon: /dev/sda3: stat failed: No such file or directory [ Fail ]
Mounting root file system in read-only mode [ ok ]
Checking file systems
fsck.ext3 No such file or directory while trying to open /dev/sda2
/dev/sda2:
The sperblock could not be read or dose not describe a correct ext2
file system. If the device is valid and it really contains an ext2
file system (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternative superblock:
e2fsck -b 8193 <device>

FAILURE ... ... ...
Here, the grub.cfg (he is correct I think)

Quote:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /usr/etc/grub.d and settings from /usr/etc/default/grub
#

### BEGIN /usr/etc/grub.d/00_header ###
set default=0
set timeout=5
### END /usr/etc/grub.d/00_header ###

### BEGIN /usr/etc/grub.d/10_linux ###
menuentry "GNU/Linux, with Linux 2.6.32.8-lfs-6.6" {
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set d7ba99c5-dfb2-473e-99f2-2a2a1d7131c5
linux /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/sda2 ro
}
menuentry "GNU/Linux, with Linux 2.6.32.8-lfs-6.6 (recovery mode)" {
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set d7ba99c5-dfb2-473e-99f2-2a2a1d7131c5
linux /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/sda2 ro single
}
### END /usr/etc/grub.d/10_linux ###

### BEGIN /usr/etc/grub.d/30_os-prober ###
### END /usr/etc/grub.d/30_os-prober ###

### BEGIN /usr/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 /usr/etc/grub.d/40_custom ###
To summarize:

I have one SCSI hard drive:
- /dev/sda1 -> the root partition of my host
- /dev/sda2 -> the root partition of my LFS
- /dev/sda3 -> my swap partition

After the configuration, the make, the make modules_install of the kernel and the differents copy in /boot I install the grub:
- grub-install --grub-setup=/bin/true /dev/sda, here the output:

Quote:
root:/sources/linux-2.6.32.8# grub-install --grub-setup=/bin/true /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/sda
and grub-mkconfig -o /boot/grub/grub.cfg:

Quote:
root:/sources/linux-2.6.32.8# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinux-2.6.32.8-lfs-6.6
done
To finish I made grub-setup '(hd0)'.

Then, logout, umount the file system and restart. But I have alwase the same problem.

Thank you for your answers.
 
Old 05-05-2011, 03:39 PM   #10
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,667
Blog Entries: 1

Rep: Reputation: 243Reputation: 243Reputation: 243
what is the outpt of
Code:
mount
when in chroot enviroment
 
Old 05-06-2011, 02:58 AM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Looking at /etc/fstab you posted in post #9 I do not see anything out of the ordinary.

Your /boot/grub/grub.cfg file looks ok in regard to LFS. I do wonder why your host (/dev/sda1 - (hd0,1) ) isn't picked up and present, but I'm fairly sure that this is not causing the problem you are having.

A few questions:

- How do you boot into your host (debian)? If grub was set up correctly during the LFS build it would have overwritten the grub entry (MBR) that was present to boot debian and booting debian should not work any more.

- You mention the following in post #5: I set the module to yes in Device Drivers -> Serial ATA... That is a bit vague and it looks like you only set the main option and none of the sub options. There are a lot of options to choose from once you enter the Serial ATA section....

- If you are able to boot into your debian host can you post the output of the following commands: lspci and dmesg | egrep -i "scsi|[bps ]ata"

There is one other thing that comes to mind: You mention using VMWare in post #1. I'm definitely not a virtual machine expert, but are you sure its configuration is ok?
 
Old 05-07-2011, 07:26 AM   #12
HybridFR
Registered User
 
Registered: May 2011
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: 1
Hi,

Hi,

I can start on my host because before to instal the grub, I took a snapshot of my virtual machine.
Like this, if I have an problem after the grub installation, I can return to the situation before the
grub installation.

With respect to the module Device Drivers -> Serial ATA..., I selected all submenu.

I don't think there are something special to configure in my virtual machine.

Here, from my host debian, the output of lspci:

Quote:
debianOSBuilder:/home/hudson# lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:07.7 System peripheral: VMware Inc Virtual Machine Communication Interface (rev 10)
00:0f.0 VGA compatible controller: VMware Inc Abstract SVGA II Adapter
00:10.0 SCSI storage controller: BusLogic BT-946C (BA80C30) [MultiMaster 10] (rev 01)
00:11.0 PCI bridge: VMware Inc Device 0790 (rev 02)
00:15.0 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:15.1 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:15.2 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:15.3 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:15.4 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:15.5 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:15.6 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:15.7 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:16.0 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:16.1 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:16.2 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:16.3 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:16.4 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:16.5 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:16.6 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:16.7 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:17.0 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:17.1 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:17.2 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:17.3 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:17.4 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:17.5 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:17.6 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:17.7 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:18.0 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:18.1 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:18.2 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:18.3 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:18.4 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:18.5 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:18.6 PCI bridge: VMware Inc Device 07a0 (rev 01)
00:18.7 PCI bridge: VMware Inc Device 07a0 (rev 01)
02:00.0 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB
02:01.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)
02:02.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 02)
02:03.0 USB Controller: VMware Inc Abstract USB2 EHCI Controller
And of dmesg | egrep -i "scsi|[bps ]ata

Quote:
nothing on my host and on my chroot environement
With respect to the spiky0011's post, the output of mount in chroot environement;

Ther are nothing

Thank you very much.
 
Old 05-07-2011, 07:36 AM   #13
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Before I have a more detailed look: The below command is not what I posted, you are missing a closing "
Quote:
Originally Posted by HybridFR View Post
And of dmesg | egrep -i "scsi|[bps ]ata
Is this a typo while posting to LQ or did you forget that double quote when executing this command on your host too?
 
Old 05-07-2011, 09:50 AM   #14
HybridFR
Registered User
 
Registered: May 2011
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: 1
Hi,

No no, it is a mistake , I used dmesg | egrep -i "scsi|[bps ]ata" sorry.
 
Old 05-07-2011, 10:14 AM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
I used dmesg | egrep -i "scsi|[bps ]ata"
Ok, thanks for clearing that up. I'm a bit surprised it didn't show any output at all.....


The lspci output shows this line:
Quote:
00:10.0 SCSI storage controller: BusLogic BT-946C (BA80C30) [MultiMaster 10] (rev 01)
Check to see if the appropriate options are set in the kernel:
Device Drivers -> SCSI device support -> SCSI disk support + SCSI generic support + SCSI low-level drivers
and
Device Drivers -> SCSI device support -> SCSI low-level drivers -> BusLogic SCSI support

You should also check your kernel options to see if the appropriate options are set for the entries shown by the lspci output. A lot of them are part of the Device Drivers section. If you are unsure about an option check the help section (sometimes a setting is suggested, go with that), if that doesn't help: Just ask here.

Hope this helps.
 
  


Reply

Tags
boot, grub, 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
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
Horrible ordeal trying to boot LFS. Tried older version - won't boot either Lyle Linux From Scratch 9 05-20-2010 08:56 PM
Can't boot LFS ( kernel panic - not syncing ) LFS 6.6 Lyle Linux From Scratch 14 05-15-2010 03:22 AM
LFS can not boot slim.chen Linux From Scratch 1 07-24-2009 06:42 AM
lfs first boot slack-penguin Linux From Scratch 7 06-15-2002 07:22 AM


All times are GMT -5. The time now is 06:35 PM.

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