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 12-16-2013, 09:05 AM   #16
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by druuna View Post
You've talked about and been using different machines and different configurations.

To stay on the right track can you post the error(s) shown (as much as possible, like post #12) from the machine you are having problems with?
I *think* I am having the same problems on all machines. But to be on the safe side I will stick to the virtual machine for now and try to find the error there.

Quote:
First thing that comes to mind without seeing any errors: This one needs to be selected
Device Drivers -> Generic Driver Options -> Maintain a devtmpfs filesystem to mount at /dev
Yes, that one is important and it may have caused some of the errors. But not all.

What I did is the following:
- correct /etc/fstab
- compile kernel (3.10.10) with defconfig and the above option
--> it boots ok!

- disable modules
--> ok!

- disable 64bit, change processor family and a few other CPU-related
--> kernl panic - no init found.

So that narrows it down.
I will need to make more tests to find out exactly which option it is.
But I think the "could not mount root fs" kernel panic is solved by either fixing fstab or checking "Maintain a devtmpfs filesystem..." (or both).

I will post further results!
 
Old 12-17-2013, 02:14 AM   #17
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lich000king View Post
- disable 64bit, change processor family and a few other CPU-related
--> kernl panic - no init found.
It's the 64bit kernel. As soon as I disable it, I get kernel panic...
Do I need to use a different kernel image?
I used
Code:
cp -v arch/x86/boot/bzImage /boot/vmlinuz-3.10.10...
which worked for the 64 bit kernel. Why should it nor work for the 32 bit one?
 
Old 12-17-2013, 03:06 AM   #18
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
You don't mention how you build this 32 bit kernel.

It isn't as simple as un-setting the [*] 64-bit kernel option when running make menuconfig

Assuming a x86_64 based system: If you follow the below steps the build process looks for the current architecture used and it will end up setting options for x86_64
Code:
$ cd /usr/src/linux-3.10.10
$ make mrproper
$ make defconfig  # I always use this one to force the current architecture. You can leave it out.
$ make menuconfig
You could try this to force x86 instead of x86_64:
Code:
$ cd /usr/src/linux-3.10.10
$ make mrproper
$ make i386_defconfig
$ make menuconfig
Never tried it myself, but it might be worth looking into.
 
Old 12-17-2013, 03:28 AM   #19
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Defconfig more or less builds against your host and current toolchain system with common hardware on minimum activated. If you want a 32-bit kernel you have to build with either oldconfig, menuconfig, or other GUI driven kernel configure utility and disable 32-bit.

You also have to make sure you built for 32-bit software earlier on, especially for GCC during the Toolchain building stage. If you're trying to build a 32-bit kernel for 64-bit software it will panic.
 
Old 12-17-2013, 05:22 AM   #20
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
It isn't as simple as un-setting the [*] 64-bit kernel option when running make menuconfig
Oops...


Quote:
You could try this to force x86 instead of x86_64:

Code:
$ cd /usr/src/linux-3.10.10
$ make mrproper
$ make i386_defconfig
$ make menuconfig
I tried this. It still panics.
Which kernel image is the correct one, the one from the /arch/x86 or the one from the /arch/i386 directory?
x86 works for the 64 bit kernel. None of them work for the i386_defconfig kernel.

Quote:
Originally Posted by ReaperX7 View Post
You also have to make sure you built for 32-bit software earlier on, especially for GCC during the Toolchain building stage. If you're trying to build a 32-bit kernel for 64-bit software it will panic.

In this case I might need to start over completely.
In the end I want to build a system with a hard-rt kernel. This requires the high precision timer to be activated which is not available in a 64 bit kernel.
 
Old 12-17-2013, 05:42 AM   #21
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
Quote:
Originally Posted by lich000king View Post
I tried this. It still panics.
Maybe it would be wise to post the error message the lines leading up to it.

Quote:
Which kernel image is the correct one, the one from the /arch/x86 or the one from the /arch/i386 directory?
One is a link to the other. I.e. they are the same.
Code:
$ ls -l arch/i386/boot/bzImage 
lrwxrwxrwx 1 druuna jd 22 dec 17 12:40 arch/i386/boot/bzImage -> ../../x86/boot/bzImage
$ ls -l arch/x86/boot/bzImage 
-rw-r----- 1 druuna jd 5475360 dec 17 12:40 arch/x86/boot/bzImage
BTW: Just curious, but why do you want to do this?
 
Old 12-17-2013, 06:43 AM   #22
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
Maybe it would be wise to post the error message the lines leading up to it.
http://postimg.org/image/p9l7nfal5/
That's when I build the kernel from the 64bit virtual machine (i.e. not from the Debian host) using i386_defconfig and "Maintain a devtmpfs filesystem to mount at /dev".
The machine freezes, I can't get any more output.

Quote:
BTW: Just curious, but why do you want to do this?
Once the LFS system is finished I want to use it as audio convolution engine. I will do realtime digital room correction. I.e. I want to correct the audio of my gear for bad effects from the room as it plays.
 
Old 12-17-2013, 06:59 AM   #23
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
Quote:
Originally Posted by lich000king View Post
http://postimg.org/image/p9l7nfal5/
That's when I build the kernel from the 64bit virtual machine (i.e. not from the Debian host) using i386_defconfig and "Maintain a devtmpfs filesystem to mount at /dev".
The machine freezes, I can't get any more output.
Not much to go on and no clues that might help.

Quote:
Once the LFS system is finished I want to use it as audio convolution engine. I will do realtime digital room correction. I.e. I want to correct the audio of my gear for bad effects from the room as it plays.
That's a goal, not a reason. Why wouldn't this work on a x86_64 platform?

Anyway: Maybe you are looking for CLFS instead of LFS (Cross-Compiled Linux From Scratch). Specifically the x86_64 Multilib Builds. This would also be in line with ReaperX7's reply.
 
Old 12-17-2013, 07:10 AM   #24
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
That's a goal, not a reason. Why wouldn't this work on a x86_64 platform?
In this case I misunderstood your question.
For a hard-RT kernel to perform well the high presicion timer (HPET) should be activated in the kernel. But this feature is only available for a 32 bit kernel.
The option disappears in the kernel menuconfig as soon as 64 bit is deactivated.
If it was not for this option, I would go with 64 bit.

Edit:
Apparently it is not so easy to build a pure x86 system from the LFS 7.4 book.
In any event jhalfs can't handle this out of the box.

druuna, why did you suggest the x86_64 Multilib Builds, isn't the 32 Bit Builds what I want?

Last edited by lich000king; 12-17-2013 at 07:28 AM.
 
Old 12-17-2013, 07:48 AM   #25
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
Quote:
Originally Posted by lich000king View Post
For a hard-RT kernel to perform well the high presicion timer (HPET) should be activated in the kernel. But this feature is only available for a 32 bit kernel.
The option disappears in the kernel menuconfig as soon as 64 bit is deactivated.
If it was not for this option, I would go with 64 bit.
HPET _is_ activated when using x86_64.

This from the .config file for a x86_64 platform:
Code:
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
HPET entries in output of dmesg on my Intel x86_64 box:
Code:
[    0.000000] ACPI: HPET 00000000bf78f4b0 00038 (v01 022410 OEMHPET  20100224 MSFT 00000097)
[    0.000000] ACPI: HPET id: 0x8086a301 base: 0xfed00000
[    1.065417] HPET: 4 timers in total, 0 timers will be used for per-cpu timer
 
Old 12-17-2013, 08:44 AM   #26
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
HPET _is_ activated when using x86_64.
Well that changes everyting.
The setting disappears from the menuconfig when activating 64 bit. But in this case I can use x86_64 and everything is fine.
 
Old 12-17-2013, 09:17 PM   #27
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Okay, let's narrow this down:

Questionnaire time:

1. What architecture is your host OS? x86_32 (iX86) or x86_64 (AMD/EM64T)?

If your host OS is 64-bit, building the standard LFS will require you built for AMD64/EM64T x86_64 architecture.

2. If your host computer or virtual machine, not the OS, is 64-bit, and you are running a 32-bit OS, provided you are running a 32-bit Host OS, did you make sure you used this command at the start of Chapter 6.14 GMP-5.1.2?

Code:
ABI=32 ./configure --prefix=/usr --enable-cxx
If you didn't pass this command when building GMP-5.1.2, then you might have to rebuild again.

Running defconfig on a 32-bit OS will result in a standard 32-bit kernel configuration, where-as on a 64-bit OS, running defconfig will result in a standard 64-bit kernel configuration.

So basically that's the jist of it.
 
Old 12-18-2013, 08:57 AM   #28
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
1. What architecture is your host OS? x86_32 (iX86) or x86_64 (AMD/EM64T)?
Code:
root@debian:/# uname -a
Linux Debian 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
So the host is x86_64 (it's Debian 7.1 64 bit.

Quote:
If you didn't pass this command when building GMP-5.1.2, then you might have to rebuild again.
Jhalfs takes the code directly from the books sources, so the command was used correctly.

I think, given that the Hith Presicion timer is actually active when I build a defconfig (x86_64) kernel, I can go with that.
I erroneously concluded there is no HPET in 64 bit because the option disappeared when I checked the 64 bit flag in the kernel config.
 
Old 12-18-2013, 04:17 PM   #29
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
The ABI=32 trigger is only to be used for a 32-bit OS on 64-bit PC, not a 64-bit OS. If JHALFS used this trigger, then it failed completely.

Plus, last to my knowledge ALFS has not been updated for quite some time against the newer books documentation.

You really should maintain your own build scripts for LFS and BLFS. I've been writing my own based on the Slackware SlackBuild scripts scheme, dubbed by me as LFSBuild scripts. It's not completely all automated yet to where a full system can be built to my specifications, but it's just something to keep from having to screw up entering longwinded commands all the time.

You may actually want to recheck your scripts to make sure JHALFS did not pass this trigger on a 64-bit OS, because if it did, your build is completely screwed up and you'll have to start all over.
 
Old 12-19-2013, 01:14 AM   #30
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
You may actually want to recheck your scripts to make sure JHALFS did not pass this trigger on a 64-bit OS, because if it did, your build is completely screwed up and you'll have to start all over.
Ok, I found the command used in /jhalfs/077-gmp:
Code:
./configure --prefix=/usr --enable-cxx
I.e. the ABI=32 bit is not passed (this is the default setting from the book, I misread earlier).

With the correct fstab file the system boots successfully in a virtual machine when I build the kernel with 64 bit.
So far everything looks good.

Then I restored the same system on a physical machine (HP workstation with Xeon CPU), the one I run virtual box on) and I get:

Code:
kernel panic - not syncing: VFS: Unable to mount root fs on unknown block (0,0)
I had Core2/Newer Xeon selected as CPU type, but it also happens with generic x86_64.

I am surprised about this. In particular, I get the same message when I rebuild the kernel on the physical machine.
The system freezes, I can't get any more useful info from the screen...
 
  


Reply


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
Boot problems, LFS Kernel Panic BrandonJ Linux From Scratch 7 05-20-2010 12:37 PM
Can't boot LFS ( kernel panic - not syncing ) LFS 6.6 Lyle Linux From Scratch 14 05-15-2010 03:22 AM
LFS will not boot: kernel panic Bliepo Linux From Scratch 2 06-16-2009 03:30 PM
Unable to boot LFS... Kernel Panic - not syncing lfs_rocks Linux From Scratch 5 04-13-2008 02:37 AM
Kernel panic on first boot -- LFS 6.2 on i686 PC. creativename Linux From Scratch 3 06-16-2007 03:32 AM

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

All times are GMT -5. The time now is 06:46 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