Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
OK, here is the situation. I've built endless kernels for a few different systems, most notably that being Gentoo, prior to that it was CORE, LFS and Slackware kernels (all using vanilla sources).
The Stats:
Code:
This system is a P4 1.6Ghz box w/ 512MB of PC800 (RAMBUS) RAM. 3 40GB HD's running in a software LVM.
The Scenario:
Code:
"/", /boot and swap are not part of the LVM. /boot is ext2, "/" is XFS (as is the rest of the LVM)
Code:
(chroot) livecd linux # pwd
/usr/src/linux
(chroot) livecd linux # grep -i etx2 .config
(chroot) livecd linux # grep -i ext2 .config
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT2_FS_XIP=y
(chroot) livecd linux #
(chroot) livecd linux # grep -i xfs .config
CONFIG_XFS_FS=y
# CONFIG_XFS_QUOTA is not set
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
# CONFIG_XFS_DEBUG is not set
# CONFIG_VXFS_FS is not set
(chroot) livecd linux #
(chroot) livecd linux # df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 976M 285M 692M 30% /
/dev/hdc 976M 285M 692M 30% /mnt/cdrom
df: `/mnt/livecd': No such file or directory
sysfs 976M 285M 692M 30% /sys
udev 10M 220K 9.8M 3% /dev
devpts 10M 220K 9.8M 3% /dev/pts
/dev/hda3 976M 285M 692M 30% /
/dev/hda1 190M 23M 158M 13% /boot
/dev/mapper/vg-ebuild
10G 561M 9.5G 6% /ebuild
/dev/mapper/vg-home 30G 4.2M 30G 1% /home
/dev/mapper/vg-opt 5.0G 4.2M 5.0G 1% /opt
/dev/mapper/vg-usr 20G 1006M 20G 5% /usr
/dev/mapper/vg-local 5.0G 4.3M 5.0G 1% /usr/local
/dev/mapper/vg-portage
2.0G 303M 1.8G 15% /usr/portage
/dev/mapper/vg-var 508M 46M 462M 10% /var
/dev/mapper/vg-log 5.0G 35M 5.0G 1% /var/log
/dev/mapper/vg-tmp 508M 23M 485M 5% /var/tmp
udev 10M 220K 9.8M 3% /dev
shm 252M 0 252M 0% /dev/shm
shm 252M 0 252M 0% /dev/shm
(chroot) livecd linux #
The Problem:
Code:
Grub loads and I can select a kernel just fine. The problem arises when the kernel is actually executed by grub. The box will inexplicably reboot, every time, every kernel.
My most recent kernel config file (for which the above snippets were taken from) can be found here.
If anyone has suggestions as to why this happens, by all means, please let me know ....
Last edited by raven.sorrow; 07-16-2009 at 03:13 PM.
None, as soon as I hit enter, the screen goes blank (assuming for a refresh from GRUB to the kernel's execution. But instead of seeing kernel output, I see my video cards BIOS.
Quote:
Originally Posted by jhwilliams
is your init.d/rc scripts working good?
System is getting far enough for the INIT scripts to take over.
Quote:
Originally Posted by jhwilliams
Specify a path to the init on the kernel line in grub.
init="" isn't a mandatory option, in this case it isn't needed as there isn't one. I'm of an older school of thought were I prefer to build in as much as I can into the kernel to prevent issues. In the past this hasn't caused any issues.
Also, wtf?:
Code:
Filesystem Size Used Avail Use% Mounted on
tmpfs 976M 285M 692M 30% /
...
/dev/hda3 976M 285M 692M 30% /
[/QUOTE]
wtf indeed, I should have trimmed that. This is a Gentoo Chroot, /etc/mtab is present inside the chroot so it's picking up the livecd's mount points. I don't know why they are the same size though ....
init="" isn't a mandatory option, in this case it isn't needed as there isn't one. I'm of an older school of thought were I prefer to build in as much as I can into the kernel to prevent issues. In the past this hasn't caused any issues.
Well, that's cool -- I'm not in your school of thought, but the school is integrated and accepted into the community.
Code:
920 init= [KNL]
921 Format: <full_path>
922 Run specified binary instead of /sbin/init as init
923 process.
...
929 initrd= [BOOT] Specify the location of the initial ramdisk
I meant legit init ... but it sounds like you're getting there, at least. I was thinking the system was just passing through to rc6 perhaps, or that you didn't have init going atall
Try changing to just boot into runlevel 1 see if you get that far?
Last edited by jhwilliams; 07-16-2009 at 04:23 PM.
I meant legit init ... but it sounds like you're getting there, at least. I was thinking the system was just passing through to rc6 perhaps, or that you didn't have init going atall
Try changing to just boot into runlevel 1 see if you get that far?
Well I'm not getting that far, as soon as grub passes control from the MBR to the kernel, that's when it reboots.
POST
Grub Menu
Select Kernel
Uncontrolled Reboot (as I didn't phsyically hard/soft-reboot the machine)
I did try and pass init=/bin/bb (BusyBox) using each kernel I built. Each standard kernel line and BB line all do the same thing. The reboot happened regardless of what INIT was passed or if one was even passed at all. So this leads me to think that it's the kernel itself, not the handoff from the kernel to the system RC scripts.
Ironically ... I sent and setup a similar kernel (from scratch) on a friends P4 that is not all that dissimilar then mine and it did the exact same thing. My guess is that I am selecting something that doesn't like being in the kernel .... and that's what's causing the reboots ... still at a loss though ....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.