LinuxQuestions.org
Help answer threads with 0 replies.
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 05-18-2014, 07:28 AM   #1
oblo
Member
 
Registered: May 2014
Location: Rome, Italy
Distribution: LFS 7.6
Posts: 55

Rep: Reputation: Disabled
Boot problem


Well, after my first boot i have a problem and i'm stuck: rest_init+0x60/0x60

Looking on internet i have found a patch (i think is for my case) but i'm not sure about the right way:

http://patchwork.ozlabs.org/patch/245576/


I think i have to do:

- put the patch in /sources
- cd/sources/linux-3.13.3
- patch -Np1 -i ../x86-PCI-setup-data-may-be-in-highmem.patch
- Now i have to compile again?

Attached Thumbnails
Click image for larger version

Name:	boot.jpg
Views:	152
Size:	93.7 KB
ID:	15529  
 
Old 05-18-2014, 09:05 AM   #2
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
Before you start patching the kernel source make sure it is a problem with the kernel and not just a config problem, if possible use a working config ie the slackware huge config ( there are plenty of links on this forum about it).

I have never had to patch the kernel, just get the config right.
 
Old 05-18-2014, 10:57 AM   #3
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Sounds more like a problem with your init ram disk.

I know nothing about LFS, I'm only in here because I was curious....

But I was having a similar problem with Slackware, and solved it by generating/re-installing a new initrd file.

Also, if you can, make sure your init is specified in your boot loader.

I was getting the exact same errors. You're getting a kernel panic, which likely means that the ram disk isn't being loaded or isn't working.

If you could post an "ls" of your /boot directory and the entry for LFS in your boot loader, we could likely rule-out if the problem is there.

Last edited by Sumguy; 05-18-2014 at 11:04 AM.
 
Old 05-18-2014, 02:45 PM   #4
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Never use a RAMDisk (initrd) with B/LFS until you fully understand your system and hardware. To be perfectly honest with you, using the larger memory footprint feature-filled style kernels like Slackware-Huge with B/LFS is actually recommended. After you learn how to trim your kernel of non-required drivers, modules, and features you don't need, using an initrd really becomes questionable. You're only reducing the size of the kernel itself and assigning more to loadable modules, not the memory footprint.
 
Old 05-19-2014, 04:00 AM   #5
oblo
Member
 
Registered: May 2014
Location: Rome, Italy
Distribution: LFS 7.6
Posts: 55

Original Poster
Rep: Reputation: Disabled
Of course i'm in this situation due to my inexperience but this is also the reason of this try (i could install a user friendly distro but i don't want it). I want to make my life difficult and learn.
I was not able to patch the kernel or use a huge config file but i can work on it reading some documentation. I skipped also the 8.4 step of lfs book (Using GRUB to Set Up the Boot Process) because i prefer boot from an usb pen drive (i installed supegrub2 on it via xp). I remember many years ago i put lilo on a floppy and i had never a problem in this way, but if this is the problem i can put grub on the mbr. Any suggestion is welcome.

root:/# ls /boot/
config-3.13.3 System.map-3.13.3 vmlinuz-3.13.3-lfs-7.5
 
Old 05-19-2014, 09:23 AM   #6
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by oblo

...but if this is the problem i can put grub on the mbr.
That's not a requirement, so that by itself shouldn't really help. Something else is wrong. I too have seen that console output before, but I can't remember specifically what I was doing at the time.

If you don't figure this out on your own, I recommend returning to post more detail such as the output of fdisk -l, the contents of /etc/fstab, the actual grub commands being used to attempt booting. You also can upload that config-3.13.3 file as an attachment (append .txt to it). If it's not obvious from the fdisk output, is the drive external? If you are choosing the Super Grub Disk pendrive from a splashscreen menu, consider the possibility that your drive enumeration may be different from what you expect. Consider using UUIDs or LABELs in /etc/fstab instead of device names. I imagine the issue will be found buried somewhere in that kind of information. Maybe somebody will be able to see it.
 
Old 05-19-2014, 10:40 AM   #7
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by oblo View Post
Of course i'm in this situation due to my inexperience but this is also the reason of this try (i could install a user friendly distro but i don't want it). I want to make my life difficult and learn.
I was not able to patch the kernel or use a huge config file but i can work on it reading some documentation. I skipped also the 8.4 step of lfs book (Using GRUB to Set Up the Boot Process) because i prefer boot from an usb pen drive (i installed supegrub2 on it via xp). I remember many years ago i put lilo on a floppy and i had never a problem in this way, but if this is the problem i can put grub on the mbr. Any suggestion is welcome.

root:/# ls /boot/
config-3.13.3 System.map-3.13.3 vmlinuz-3.13.3-lfs-7.5
O-K, there is no initrd file in your boot directory- and from the screenshot you posted, it looks as though you are having a kernel panic because of that fact.

I wouldn't fool with the kernel; the kernel is not the problem. If it's not a huge kernel, you need a initrd [ram disk] file for the kernel to boot successfully. Did you somehow skip the step where the inti file is built? (Just looking through the table of contents of the LFS book, I see that there is an entry for "initool"- I have a feeling that the answer to your problem has to do with the use of that)

Where are all the LFS users, here? I'll bet someone who is familiar with the intimacies of LFS could figure this out 1-2-3.

EDIT: Looking at the sample GRUB configuration in the LFS book, it doesn't look as though the standard kernel needs an init. Maybe just check the configuration of your boot loader, and make sure it points to the proper place and that the kernel is specified correctly- if nothing else, to at least rule-out the possibility of there being an error there.

Last edited by Sumguy; 05-19-2014 at 10:59 AM.
 
Old 05-19-2014, 02:30 PM   #8
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by Sumguy

...it doesn't look as though the standard kernel needs an init.
The BLFS book provides for a way to create an initial ram filesystem, but it generally is not needed. Since an LFS builder knows in advance what hardware and filesystems exist, there is no need to provide modules for the thousands of possible things like that and copy them all into an initial ram filesystem so they all can be available to the kernel before the root filesystem is mounted (like a typical distro has to do). Instead, an LFS builder configures the things needed by the kernel at boot time for the particular hardware to be built-in to the kernel. All that's really needed at this early point in booting are storage and filesystem drivers. Usually, a few particular drivers in the SCSI, SATA, and PATA sections of the kernel config are needed. If the drive is USB, then the USB core, port, and mass storage stuff should be built in. And the filesystem drivers should be built in. Anyway, most of that stuff can be discovered by studying what modules the host system loads and uses. The LFS book's kernel chapter gives advice on getting started and some links to additional detail.

P.S.: I had to recompile my first LFS kernel probably thirty times because of things like what's going on right here. I hate to sound negative, but there's no use pretending either. See, this booting thing is only the beginning. Once it boots, then comes video.

Last edited by stoat; 05-19-2014 at 02:53 PM.
 
1 members found this post helpful.
Old 05-19-2014, 03:08 PM   #9
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by stoat View Post
The BLFS book provides for a way to create an initial ram filesystem, but it generally is not needed. Since an LFS builder knows in advance what hardware and filesystems exist, there is no need to provide modules for the thousands of possible things like that and copy them all into an initial ram filesystem so they all can be available to the kernel before the root filesystem is mounted (like a typical distro has to do). Instead, an LFS builder configures the things needed by the kernel at boot time for the particular hardware to be built-in to the kernel. All that's really needed at this early point in booting are storage and filesystem drivers. Usually, a few particular drivers in the SCSI, SATA, and PATA sections of the kernel config are needed. If the drive is USB, then the USB core, port, and mass storage stuff should be built in. And the filesystem drivers should be built in. Anyway, most of that stuff can be discovered by studying what modules the host system loads and uses. The LFS book's kernel chapter gives advice on getting started and some links to additional detail.

P.S.: I had to recompile my first LFS kernel probably thirty times because of things like what's going on right here. I hate to sound negative, but there's no use pretending either. See, this booting thing is only the beginning. Once it boots, then comes video.
Thank you for taking the time to explain that to me. It makes sense. (I like the idea of LFS very much. Just have what you want/need; tailored specifically to your machine. But I'm not going anywhere near LFS- I'll be lucky if I can successfully figger[sic]-out how to install packages in Slackware! )

What I don't understand, is why a typical distro can't install what one's specific machine needs...and then discard the 98% of the other junk that it doesn't need. It's like when you install printer support on Crunchbang. It downloads EVERY printer driver known to man, for every printer ever made since Gutenberg- all to install one lowly driver! What is the point of that? I mean, why can't it just determine what driver you need, and just download ONE- or at least discard the 99,999 ones you don't need, after it installs the one you do need? Maybe I'm mising something- or my understanding is still too simplistic- but some of these things just don't make sense.
 
Old 05-19-2014, 03:56 PM   #10
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
The Linux kernel is generally very good at loading the modules needed by the hardware it discovers. We rarely have to give it any help with that. But the modules needed by the hardware have to be present for the kernel to load them. They exist in /lib/modules. Since the distros are aiming at everybody out there, they have to build a lotta lotta modules. The kernel figures out which modules are needed and loads them. All of the others sit there in /lib/modules waiting for something that is never coming (a call to be loaded and used). That's just the way it has to be for a distro intended to be installed as is by just anybody out there. But people who know how to compile a custom kernel can decide to build something into the kernel, or build it as a module, or not build it at all. For example, I build my Ethernet driver as a module and unselect all of the others. Same for all the wireless drivers. And so on. I like modules where possible. I like seeing that stuff listed in lsmod. I build stuff into the kernel when it's needed before the root filesystem is mounted. I try not to build things at all if I will never need them. But there is so much stuff in there nowadays that I will probably never stop learning how to configure a kernel. I keep detailed notes (sort of a diagram) and it has never stopped growing.

Last edited by stoat; 05-19-2014 at 05:04 PM.
 
Old 05-19-2014, 05:06 PM   #11
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
Quote:
Originally Posted by stoat View Post
...I like modules where possible....
Just to show we are all different here I don't use modules if at all possible, I like to compile it directly into the kernel, of course I only select what I need.
 
Old 05-19-2014, 06:58 PM   #12
oblo
Member
 
Registered: May 2014
Location: Rome, Italy
Distribution: LFS 7.6
Posts: 55

Original Poster
Rep: Reputation: Disabled
Today was a day away from home .. next days i will start working on it. I think the problem is in the config file, probably i need something for my hardware that i haven't now; i'm not sure but i would start from here and i need time for some tests.
No external hd. I have 2 hd, i created a partition in the first hard drive where i hold xp.

[root@paldo:/]# fdisk -l

Disk /dev/sdb: 279.5 GiB, 300090728448 bytes, 586114704 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000001

Device Boot Start End Blocks Id System
/dev/sdb1 16065 586099394 293041665 f W95 Ext'd (LBA)
/dev/sdb5 16128 586099394 293041633+ 7 HPFS/NTFS/exFAT


Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0e2f0e2e

Device Boot Start End Blocks Id System
/dev/sda1 * 63 881534744 440767341 7 HPFS/NTFS/exFAT
/dev/sda2 881534745 974422574 46443915 83 Linux
/dev/sda3 974422575 976773167 1175296+ 82 Linux swap / Solaris


Disk /dev/sdc: 3.8 GiB, 4020240384 bytes, 7852032 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x04030201

Device Boot Start End Blocks Id System
/dev/sdc1 * 1104 7852031 3925464 b W95 FAT32


[root@paldo:/mnt/lfs/etc]# cat fstab
# Begin /etc/fstab

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

/dev/sda2 / ext4 defaults 1 1
/dev/sda3 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=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0

# End /etc/fstab
Attached Files
File Type: txt config.txt (89.6 KB, 21 views)

Last edited by oblo; 05-19-2014 at 07:05 PM.
 
Old 05-20-2014, 12:26 PM   #13
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by oblo

I think the problem is in the config file...
Maybe. I looked through the config file, and to me you have built-in what you probably need to boot. This also could be a simple GRUB issue.

A simple and quick experiment (if you want to do it) would be to boot with the pendrive again. At the Super Grub Disk boot menu, press the "c" key to get the grub> prompt. Then enter these commands at the prompt...
Code:
grub> linux (hd0,2)/boot/vmlinuz-3.13.3-lfs-7.5 root=/dev/sda2 ro
grub> boot
If the same thing happens again, then try again with this (change only the red part)...
Code:
grub> linux (hd0,2)/boot/vmlinuz-3.13.3-lfs-7.5 root=/dev/sdb2 ro
grub> boot
Then this...
Code:
grub> linux (hd0,2)/boot/vmlinuz-3.13.3-lfs-7.5 root=/dev/sdc2 ro
grub> boot
What I'm getting at is that it's at least possible that the operating system is enumerating the partition in a way that GRUB and you don't expect. Anyway, it's completely harmless and changes nothing in the system to try.


P.S.: If none of those three tries succeeded, then take a moment to confirm that the GRUB device (hd0,2) was right for the experiment (I guessed at that). This at the grub> prompt will answer that...
Code:
grub> search -f /boot/vmlinuz-3.13.3-lfs-7.5
If that reveals something other than (hd0,2), then try the three tests again with the new GRUB device name to see if one boots the system. If that happens, then I recommend that you stop using the pendrive to boot and install a permanent boot loader (your choice) to boot XP and LFS. Just my opinion.

Last edited by stoat; 05-20-2014 at 04:45 PM.
 
Old 05-21-2014, 12:27 PM   #14
oblo
Member
 
Registered: May 2014
Location: Rome, Italy
Distribution: LFS 7.6
Posts: 55

Original Poster
Rep: Reputation: Disabled
Ok friends, i have an update.
As i said i started with a config file and my choise was for a .config paldo linux (i used this live cd for lfs). At boot i have good informations.. "cannot open root device UUID="4ec08b33-ec9e-4a2e-b01b-a767796973b4" Please append a correct "root=" boot option.
"I have a bootloader problem" i think and i edit my fstab:

UUID=4ec08b33-ec9e-4a2e-b01b-a767796973b4 / ext4 defaults 1 1
UUID=3c4e542e-4b85-4cb5-b120-618e8101ac97 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=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0

I don't like it, i never used a similar fstab but ok.. "if it works no problem" i think. I also create a /boot/grub/grub.cfg

set default=0
set timeout=5
insmod ext2
set root=(hd1,2)
menuentry "GNU/Linux, Linux 3.13.3-lfs-7.5" {
linux /boot/vmlinuz-3.13.3-lfs-7.5 root=4ec08b33-ec9e-4a2e-b01b-a767796973b4 ro

After reboot i have a cpu warning and so i would try a second option, the slack config file.
With this file the boot happens but i have many "fail", i upload some screenshots (the first three are related to boot, the last after shutdown). It happened a while ago and i had no time yet to investigate solutions (i will do it) but of course if meanwhile you have any suggestions i'm here!
Well, many problems but i'm very happy!
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	90
Size:	76.0 KB
ID:	15555   Click image for larger version

Name:	2.jpg
Views:	56
Size:	58.7 KB
ID:	15556   Click image for larger version

Name:	3.jpg
Views:	56
Size:	55.8 KB
ID:	15557  
 
Old 05-21-2014, 12:28 PM   #15
oblo
Member
 
Registered: May 2014
Location: Rome, Italy
Distribution: LFS 7.6
Posts: 55

Original Poster
Rep: Reputation: Disabled
Shutdown..
Attached Thumbnails
Click image for larger version

Name:	4.jpg
Views:	49
Size:	74.6 KB
ID:	15558  
 
  


Reply



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 problem - lilo runs ok, but get the infamous screen of 99s on boot. Ook Slackware - Installation 2 05-26-2012 02:39 AM
[SOLVED] Can't select XP OS in a dual boot with Isadora at boot screen (grub problem) faby1321 Linux Mint 10 08-10-2010 06:07 PM
Fedora 9x64 AHCI problem - no boot (only CD Rom boot) after install sandaili Fedora 1 06-06-2008 02:33 PM
boot to GUI problem want grub boot to single user mode. hocheetiong Linux - Newbie 1 09-26-2007 06:41 PM
solaris boot problem boot error loading interpreter(misc/krtld) Johncy_j Solaris / OpenSolaris 5 08-18-2005 01:47 AM

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

All times are GMT -5. The time now is 08:25 PM.

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