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-01-2014, 08:41 AM   #1
leopold75
LQ Newbie
 
Registered: Nov 2014
Distribution: Ubuntu 14.10
Posts: 9

Rep: Reputation: Disabled
Kernel Panic during first boot for fresh system


Hello there!

Please, can You help with my problem?
I want to learn more how Linux works and made own distro with manual
"LSF - Version 7.6-systemd"

All went OK but for 1st boot I see Kernel Panic after ~ 2-3 sec for booting process.

Only hard reset can help.

Please, assist me how to "catch" kernel error messages for investigation?
And what is next steps?

Thank You!
 
Old 12-01-2014, 11:28 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

Abit more info might help, have you built in a VM or anything like that Is it on a usb drive, and what partition lfs is installed on.
post
Code:
fdisk -l
and maybe your "fstab", grub.cfg. That should do for now
 
Old 12-02-2014, 06:45 AM   #3
leopold75
LQ Newbie
 
Registered: Nov 2014
Distribution: Ubuntu 14.10
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hello, Spiky0011!

Thank You for reply.

So, below please find my answers:

1) I use native (not VM) OS and partitions. Host system - Ubuntu 14.10 x64
2) In my PC I have 3 HDD. /dev/sda used for Windows OSes, /dev/sdb - for diff Ubunty releases, I trying install LFS to /dev/sdc3 (dev/sdc1 pointed to swap)

fstab:
Quote:
# Begin /etc/fstab
# file system mount-point type options dump fsck order

/dev/sdc3 / ext4 defaults 1 1
/dev/sdc1 swap swap pri=1 0 0

# End /etc/fstab
 
Old 12-02-2014, 10:16 AM   #4
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
Ok what dose grub.cfg look like, is sdc a usb drive?
 
Old 12-02-2014, 03:49 PM   #5
leopold75
LQ Newbie
 
Registered: Nov 2014
Distribution: Ubuntu 14.10
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hello! No, sdc typical HDD (not like USB)

Quote:
/dev/sdc1: UUID="87fbd173-8875-4a20-8ce5-5e5952813af5" TYPE="swap" PARTUUID="975f975f-01"
/dev/sdc2: UUID="0064c6e7-f263-46d3-ad1b-6ff55afd85f7" TYPE="ext4" PARTUUID="975f975f-02"
/dev/sdc3: UUID="5ba0805b-1cab-4330-abe7-dc9e636ee754" TYPE="ext4" PARTUUID="975f975f-03"
Quote:
Disk /dev/sdc: 37.3 GiB, 40020664320 bytes, 78165360 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: 0x975f975f

Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 5785599 5783552 2.8G 82 Linux swap / Solaris
/dev/sdc2 5785600 36763647 30978048 14.8G 83 Linux
/dev/sdc3 36763648 78165359 41401712 19.8G 83 Linux
grub.cfg (part)

Quote:
menuentry 'Linux From Scratch (7.6-systemd) (on /dev/sdc3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5ba0805b-1cab-4330-abe7-dc9e636ee754' {
insmod part_msdos
insmod ext2
set root='hd2,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos3 --hint-efi=hd2,msdos3 --hint-baremetal=ahci2,msdos3 5ba0805b-1cab-4330-abe7-dc9e636ee754
else
search --no-floppy --fs-uuid --set=root 5ba0805b-1cab-4330-abe7-dc9e636ee754
fi
linux /boot/vmlinuz-3.16.2-lfs-7.6-systemd root=/dev/sdc3 ro
}
submenu 'Advanced options for Linux From Scratch (7.6-systemd) (on /dev/sdc3)' $menuentry_id_option 'osprober-gnulinux-advanced-5ba0805b-1cab-4330-abe7-dc9e636ee754' {
menuentry 'GNU/Linux, Linux 3.16.2-lfs-7.6-systemd (on /dev/sdc3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.16.2-lfs-7.6-systemd--5ba0805b-1cab-4330-abe7-dc9e636ee754' {
insmod part_msdos
insmod ext2
set root='hd2,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos3 --hint-efi=hd2,msdos3 --hint-baremetal=ahci2,msdos3 5ba0805b-1cab-4330-abe7-dc9e636ee754
else
search --no-floppy --fs-uuid --set=root 5ba0805b-1cab-4330-abe7-dc9e636ee754
fi
linux /boot/vmlinuz-3.16.2-lfs-7.6-systemd root=/dev/sdc3 ro
}
}
I saw message _not syncing: VFS: Unable to mount root fs on unknown-block(0,0)_
 
Old 12-02-2014, 04:38 PM   #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
Only thing I can think of is something in the kernel not configured hard drive type maybe. File system, although ext4 I found is enabled as is dvtmpfs, did you check, I presume your fstab is complete as it is in the book.

The other parts look ok to me
 
Old 12-02-2014, 06:29 PM   #7
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by leopold75 View Post
I saw message _not syncing: VFS: Unable to mount root fs on unknown-block(0,0)_
Mostly this error occurs due to missed SATA controller driver, or driver was built as loadable module. Driver should be built in kernel. Check out your kernel config.
Another possible reason - DEVTMPFS not enabled or enabled as module. Should be built in as well.
If you do not know which driver you have to enable for your sata controller, there is a good site with instructions:
http://kmuto.jp/debian/hcl/
 
1 members found this post helpful.
Old 12-03-2014, 03:53 AM   #8
leopold75
LQ Newbie
 
Registered: Nov 2014
Distribution: Ubuntu 14.10
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank You for advise.
No luck, I just copied config file from host system, had it configured it with "menuconfig" as mentioned in Manual.
vmlinuz-3.16.2-lfs-7.6-systemd increased up to 1M, and alot of new modules were inslalled.
The same message occured _not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

So, better way I guess - remove all disks from PC, and try prepare LFS from null with 1 HDD and separated /boot on clear SATA.
Also I'll retry the same under x86 arch.

Thank You for help!
 
Old 12-03-2014, 04:37 AM   #9
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
do you have boot on a seperate drive?
 
Old 12-03-2014, 05:07 AM   #10
leopold75
LQ Newbie
 
Registered: Nov 2014
Distribution: Ubuntu 14.10
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
do you have boot on a seperate drive?
No, whole LSF dir structure located on /dev/sdc3
Main GRUB boot loader installed on /dev/sda (I made grub-install /dev/sda --force --recheck)

I already unplugged /dev/sda and /dev/sdb , booted from CD and installed GRUB to /dev/sdc , fixed /etc/fstab

No luck. The same. I guess issue in old HDD (he plugged via IDE cable)

Anyway goint to install from zero on fresh PC with 14.04.1 x86 and then x86_64

Will report later.
 
Old 12-03-2014, 05:27 AM   #11
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Using Ubuntu's kernel config may mis-orient you. Because Ubuntu uses initrd, and some of modules there, not built in kernel, so using Ubuntu config is not a way to go.
What is your mobo model?

Though there is another way to configure kernel:
Quote:
make localmodconfig
this command searches for your devices and creates config depending on it. Keep in mind: all the devices you planned to use should be attached: usb stick, usb hdd, camera, hid devices.
Using this config will lead to a bit bloated kernel, but it should be loadable and might be taken as a good start point. You can compare this config to your current one, especially for "Device drivers" section to get idea whats wrong with your config

If your drive is IDE, it will require PATA drivers as well.

Last edited by Teufel; 12-03-2014 at 05:34 AM.
 
1 members found this post helpful.
Old 12-03-2014, 05:39 AM   #12
leopold75
LQ Newbie
 
Registered: Nov 2014
Distribution: Ubuntu 14.10
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
what is your mobo model?
asus p5kc
 
Old 12-03-2014, 06:41 AM   #13
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Your mobo operates with JMB363 PATA and SATA controllers. BTW as one of mine mobos.
Do you have enabled JMicron PATA/SATA support? it is a PATA_JMICRON option.
Run make menuconfig and press "/" key to get into search mode. Type "jmicron" to search and press Enter. It will show do you have jmicron support enabled. Options should be set to [y], not [m].

Or it can be checked this way:
Code:
# cat .config | grep JMICRON
CONFIG_PATA_JMICRON=y
P.S.
it would be nice to check these options as well:
Code:
# cat .config |grep DEVTMP
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y

Last edited by Teufel; 12-03-2014 at 06:46 AM.
 
1 members found this post helpful.
Old 12-03-2014, 06:49 AM   #14
leopold75
LQ Newbie
 
Registered: Nov 2014
Distribution: Ubuntu 14.10
Posts: 9

Original Poster
Rep: Reputation: Disabled
Ah so! You are right! I have jmicron support enabled via BIOS and use /dev/sdc within.
I thought jmicron will be populated with devices...Ok, thank You very much! Will try asap.
 
Old 12-03-2014, 01:22 PM   #15
leopold75
LQ Newbie
 
Registered: Nov 2014
Distribution: Ubuntu 14.10
Posts: 9

Original Poster
Rep: Reputation: Disabled
Talking

YES!!! I am able to boot!!!!
Issue was really in JMICRON kernel settings

By default this option marked as "not set"

Once I fixed up to CONFIG_PATA_JMICRON=y system had soared!

Teufel, VIELEN DANK!

Btw, "make localmodconfig" not working in chroot, issue with some .pl file.
I dig more. Also internet not available, but this is ganz andere Geschichte.

Issue solved, thank You very much for help.
 
  


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
Fedora 16 Kernel upgrade broke system - kernel panic and unable to boot itsjustarumour Fedora 7 05-15-2012 09:51 AM
Kernel panic on system boot kaplan71 Red Hat 1 04-27-2009 04:10 PM
Can't Boot Slack 12 From Fresh Install - Kernel Panic GuyWhoKilledBear Slackware - Installation 3 10-14-2007 02:04 AM
Changed Motherboard: System Won't boot - Kernel Panic n1wil Red Hat 1 06-16-2006 09:45 AM
Kernel Panic / System wont boot phatboyz Linux - Hardware 5 01-25-2005 07:39 AM

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

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