LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Frustrating problem ; LFS kernel not booting after hours work ... (https://www.linuxquestions.org/questions/linux-from-scratch-13/frustrating-problem-%3B-lfs-kernel-not-booting-after-hours-work-4175428044/)

elmiku 09-19-2012 02:55 PM

Frustrating problem ; LFS kernel not booting after hours work ...
 
I have a very frustrating problem after hours and hours spending for making my first linux from scratch system :(
Everything during building went fine untill now .. And I think it's a stupid config error somewhere.
This is an extract of the error I haven when the LFS kernel tries to boot:

VFS: Cannot open root device "sdb1" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0b00 1048575 sr0 driver : sr
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
etc ...

Here is my building story:
First of all, making the LFS was done completely in Vmware player 5.0 on a Fedora 17 host system.
For making the LFS I've added a second virtual HD.
So host is on 'sda' and the LFS system on 'sdb' on the only one and first partion
I modified the grub2 loader to make appear my LFS on the grub bootmenu as follows in the 40_custom file:

set root=(hd1,1)
menuentry "GNU/Linux Linux 3.5.2-lfs-7.2" {
linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sdb1 ro
}

As far as I know about it, this config seems to be right .. because the kernel starts booting but stucks after a few seconds
with the error described earlier.

On the LFS website I've found in the FAQ a few things that can lead to this error

Did you specify the correct partition in /boot/grub/menu.lst?
I am almost 99% sure I did (see my config)
Is support for the hard drive enabled in the kernel. For SCSI this means support for the specific SCSI adapter.
Yes I compiled the kernel with SCSI support and NOT as a module
Is support for the hard drive compiled into the kernel, not just as a module. (Modules are stored on the filesystem. If a driver needed to access the filesystem is stored as a module on that filesystem, well ... you know ... ;)
I believe it is ( Vmware is SCSI isnt it?)
Is support for the filesystem compiled into the kernel. Again, not a module. Support for ext2 is enabled by default, but others like ext3, reiser, jfs, and xfs are not.
Yes I compiles Ext2 and Ext3 support ; my LFS partition is Ext3 by the way


What the hell I am doing wrong here? Are there any specicic setting I need to compile for the kernel for Vmware?
I tried also to enable 2 vmware specific settings in the kernel but also without results.
I hope someone can help me or point me in the right direction because this is driving me nuts.

Best Regards
Kurt

stoat 09-19-2012 09:19 PM

Something similar has been caused before by "CONFIG_DEVTMPFS is not set" in the kernel configuration. Anyway, it can't hurt to check. If you still have your .config file in your kernel source directory, or if you can mount your LFS partition and examine the config file in /boot, then search or grep for CONFIG_DEVTMPFS=y. If yours "is not set" instead, then correct it and recompile the kernel...
Quote:

Originally Posted by Page 226 of LFS v7.2

Device Drivers --->
Generic Driver Options --->
Maintain a devtmpfs filesystem to mount at /dev


elmiku 09-20-2012 01:32 AM

Hi stoat

Thanks for reply
And yes I compiled the CONFIG_DEVTMPFS option in the kernel as described :-(
I had found this already in the forum before posting my question.
Do you or someone else has an other idea what's going wrong here?

greetz
Kurt

Celyr 09-20-2012 01:55 AM

Did you tried to read the kernel output? There is for sure something interesting, for example you may see if your sdb is recognised or not.

elmiku 09-20-2012 05:47 AM

Hi Celyr

There are no files in /var/log of my lfs filesystem
How and where can I find/activate this kernel output ?

K.

Celyr 09-20-2012 09:15 AM

Well, you should see it while booting, example:
Code:

[    3.473764] ahci 0000:00:1f.2: version 3.0
[    3.473778] ahci 0000:00:1f.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[    3.473958] ahci 0000:00:1f.2: irq 44 for MSI/MSI-X
[    3.474028] ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 3 ports 3 Gbps 0x5 impl SATA mode
[    3.474220] ahci 0000:00:1f.2: flags: 64bit ncq sntf pm led clo pio slum part ccc ems
[    3.474409] ahci 0000:00:1f.2: setting latency timer to 64
[    3.476725] scsi0 : ahci
[    3.476974] scsi1 : ahci
[    3.477207] scsi2 : ahci
[    3.477519] ata1: SATA max UDMA/133 abar m2048@0xfebfb800 port 0xfebfb900 irq 44
[    3.477709] ata2: DUMMY
[    3.477834] ata3: SATA max UDMA/133 abar m2048@0xfebfb800 port 0xfebfba00 irq 44
[    3.478418] ata_piix 0000:00:1f.1: version 2.13
[    3.478426] ata_piix 0000:00:1f.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    3.478590] ata_piix 0000:00:1f.1: setting latency timer to 64
[    3.479055] scsi3 : ata_piix
...

[    3.653376] ata4.00: ATAPI: TSSTcorp DVD+/-RW TS-L632H, D200, max UDMA/33
[    3.678254] ata4.00: configured for UDMA/33
[    3.783022] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    3.783176] ata3: SATA link down (SStatus 0 SControl 300)
[    3.783382] ata1.00: ATA-8: OCZ VERTEX PLUS, 3.55, max UDMA/133
[    3.783515] ata1.00: 117231408 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
[    3.783848] ata1.00: configured for UDMA/133
[    3.784098] scsi 0:0:0:0: Direct-Access    ATA      OCZ VERTEX PLUS  3.55 PQ: 0 ANSI: 5
[    3.784485] sd 0:0:0:0: [sda] 117231408 512-byte logical blocks: (60.0 GB/55.8 GiB)

If you have a VM it should be even easier to look at them, use scroll lock, take screenshots :)

Keith Hedger 09-20-2012 02:26 PM

Quote:

...set root=(hd1,1)..
Grub entry's start from zero not one so you should use root=(hd1,0), if you are using the first partition on your disk ( /dev/sdx1 )

elmiku 09-21-2012 02:18 PM

Hi Keith

I tried ur idea but everywhere on internet there is said that for grub2 partition counting starts on 1 and not on 0
for the HD it starts on 0
any other ideas? :(

Kurt

Keith Hedger 09-22-2012 05:38 AM

sorry I use grub 1 ( it's easier to config ) I didn't realize that they had changed the numbering system in grub 2 - My bad!

Have you tried using a pre-compiled kernel? at first I could not get my lfs system to boot so I tried the kernel from my host ( slackware64-13.37 ) just to get the system up and working and then tried compiling my own kernel, at least you will know then that your system is working ( or not! ) or if the problem is in the kernel.

elmiku 09-23-2012 06:10 AM

Keith

hey, this was a good tip :-)
I tried to boot the LFS system with the kernel of my host system --> same problem
I added the initrd from my host --> then it is continuing booting untill the login, but ..
there is nothing happening on the screen when I try to type 'root' as user, after ENTER it asks my for password but I am not able to login :(
no characters I type are appearing on the screen

In the meantime I tried also to make a proper initrd file as described in the BLFS manual, then it is booting a bit further then described in my first post but not untill the login screen as it does with the kernel and initrd file from my host system

I begin loosing faith in LFS .. :-(

Kurt

spiky0011 09-23-2012 06:16 AM

Hi

Dont loose the faith.

So it seems you have got it to boot, What are you faced with now.
what dose the prompt look like,

Keith Hedger 09-23-2012 06:22 AM

Glad you got it to boot!
At least now you know where ( one of )the problem is, its in your custom kernel, have a look at this web page:
http://zen-kernel.org/tutorials/crea...-configuration
which is where I started when I started to build my own kernel.

Make sure you have set a password for root from your chroot env on your host system, it is normal not to see the password as you enter it.

Keep going you're nearly there!

elmiku 09-23-2012 08:57 AM

The prompt i have is: (none) login: _
When I type there is nothing on the screen and after hitting Enter it asks for password; when I enter then my password it says Login incorrect
it is even telling me that Num Lock and Shift is ON

Keith
I've changed my password via chroot and yes I know that in Linux nothing appears when filling in the password but for the username it is different I guess; the name of the user is seen on the screen when typing right? I dont see anything ... Keyboard seems ok because hitting Enter is probably recognised
thanks for the link. I will have a look at it to build my own LFS kernel instead of my hosts one now ...

Kurt

spiky0011 09-23-2012 09:15 AM

Hi

I see you have "none login:"
Is none the name you setup in hostname chapter 7.8?
I presume that you tried using user lfs and password.

Yes the user name should show on screen

elmiku 09-23-2012 10:13 AM

spiky
indeed when booting I have some errors that can explain the "none" in my prompt; see attached file
but in fact it seems normal to me because I didn't setup anything for a network card because I don't have one
following the manual u can skip chapter 7 when u dont need a network card ..
the only user on the LFS system is root
the fact that there comes nothing on the screen when typing is disturbing me

K.


All times are GMT -5. The time now is 03:30 PM.