LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Kernel Assistance (https://www.linuxquestions.org/questions/linux-software-2/kernel-assistance-378668/)

DigiCrime 10-31-2005 12:59 PM

Kernel Assistance
 
When updating to 2.6.14 kernel all seems to go well then...

Warning: unable to open an initial console.

I was reading up on google, didnt find much of anything, I found something that looked interesting http://wiki.archlinux.org/index.php/...nitial_console but didnt help any.

Now the error goes away when I put initrd /initrd-2.6.14.img in grub.conf... do I specifically need initrd with this newest kernel? im trying to build a non modular kernel

GrueMaster 10-31-2005 02:23 PM

Yes, you need an initrd file, even with a non-modular kernel. The initrd not only contains modules for booting devices on your system, but also has the init script that the kernel executes after it has finished booting. The init script mounts your local root file system, then jumps to the init script in /etc. From there, it mounts the rest of your file systems, starts background services, etc.

Hope this helps.

Tobin

P.S. Despite my title, I have been working with Linux since Slackware 4.0. I have extensive experience with Redhat (5.0 on up), Mandrake/Mandriva (7.0 to latest, current desktop of choice), Suse 9.3, Gentoo 1.4 (ok, this is a little dated), and a few others I've played around with. In short, while not an "Expert", I'm also not a "Newbie"

DigiCrime 10-31-2005 02:27 PM

I have monolithic kernels on other servers that dont have initrd in grub, these were prebuilt kernels not by me so Im not sure how they were built which confuses me...

GrueMaster 10-31-2005 02:42 PM

You could also use the kernel command lines to get past this. Use "root=/dev/<hard drive partition>" to point to the drive partition that / & /etc are on (you really don't want to separate them).

For example:

root=/dev/hda1 would point to the first partition on the first IDE drive in your system.
root=/dev/sda1 " " SCSI/SATA drive.

There has been talk over the last few years of integrating the IDE subsystem into the SCSI subsystem through the years, which would eliminate the /dev/hd[a-z] drive designations, among other things. This hasn't happened yet, but the SATA drivers are working off the SCSI subsystem, even though they are technically IDE.

If you have the kernel source, there is a text file describing all the kernel parameters (kernel-parameters.txt in the kernel Documentation directory). It has other parameters you can use, like noinitrd, rootfs, etc.

Hope this helps.

DigiCrime 10-31-2005 02:46 PM

Not completed but config file, does work

http://stlhosting.com/.config

and grub
http://stlhosting.com/grub.conf

Take out initrd and it wont boot, put it in, boots just fine

GrueMaster 10-31-2005 03:01 PM

Try changing your grub config like this:

title CentOS 4.0 (2.6.14)
root (hd0,0)
kernel /boot/vmlinuz-2.6.14 ro root=/dev/hda1 noinitrd

See if that fixes it.

DigiCrime 10-31-2005 03:10 PM

Quote:

Originally posted by GrueMaster
Try changing your grub config like this:

title CentOS 4.0 (2.6.14)
root (hd0,0)
kernel /boot/vmlinuz-2.6.14 ro root=/dev/hda1 noinitrd

See if that fixes it.

Nope, get the same message heres a pic so you can see what I see
http://www.hostmypiconline.com/images/PA310006.JPG

GrueMaster 10-31-2005 03:45 PM

Try also adding console=tty0. See if that helps. If not, I'll have to scramble a test system together to see if I can reproduce this and work around it.

DigiCrime 10-31-2005 04:00 PM

Same error

GrueMaster 10-31-2005 07:45 PM

Ok, I'm back. Had to build a system from spare parts, image it (Mandriva 2005LE), download the 2.6.14 kernel, build it with your config file, and finally install it on the test system.

I am able to boot w/o problems, although I have lilo instead of grub. Should not make any difference, though.

Here's some info from my system:

[root@gruebuild ~]# uname -a
Linux gruebuild 2.6.14 #1 Mon Oct 31 17:12:37 PST 2005 i686 Pentium Pro unknown GNU/Linux
[root@gruebuild ~]# cat /proc/cmdline
BOOT_IMAGE=test ro root=301 acpi=ht resume=/dev/hda5 noinitrd

I am not able to reproduce your problems, even when I manually delete /dev/console and /dev/null before rebooting, although you might try booting with a rescue disk and see if these exist.

Also, could you dump a list of your partitions and mount points (use df -h)? It might shed some light on the problem.

What distribution are you using?

DigiCrime 10-31-2005 07:53 PM

Dell Poweredge 350 1/2 rack (850Mhz 720 megs of ram, 80 gig drive) CentOS 4.0 During install selected server install then selected minimal install.

The pre made up kernels I use on our servers the 2.6.13SMP works but on my system I get the same exact error with the 2.6.14 grrr their setup is somewhat similar. Fedora, CentOS and Redhat 7.3 someone said it had something to do with udev bug or something I dunno im lost thats for sure

My df
/dev/hda1 72G 2.7G 66G 4%. /
none 379m 0 379 , 0% /dev/shm
/dev/hda2 2.0G 35M 1.8G 2% /swap

GrueMaster 11-01-2005 02:34 AM

SOLUTION!!!!!

After downloading the 4 iso's for CentOS 4.0, re-imaging (twice, first time it created a LVT volume for root), rebuilding the 2.6.14 kernel and installing it, I managed to reproduce your problem. It is exactly as you originally suspected in your first post. The problem is, the kernel that ships with the CentOS uses the devfs, which automatically populates /dev on boot. This is now depreciated in the 2.6.14 kernel, having been replaced with udev. The problem is, udev needs /dev/console and /dev/null to boot.

The solution:

Boot from your installation CD.
At the boot prompt, type "linux rescue".
At the next user prompts, select your language and country preferences, and no network (not needed for this).
The next prompt will ask if it should search and mount the root file system for you. DO NOT LET IT!! It again will automatically populate the dev directory, making this process useless (I discovered that the hard way). Just select "SKIP", and it will dump you down to a shell prompt.

The next steps are simple. Type the following exactly (without the # comment):
mkdir /mnt/sysimage
mount /dev/hda1 /mnt/sysimage
cd /mnt/sysimage/dev
ls # this should return nothing. If so, great.
mknod -m 660 console c 5 1
mknod -m 660 null c 1 3

reboot and enjoy your new kernel!

The above steps worked for me without problem. I first discovered that /dev wasn't populated by booting a Mandriva rescue disk, which doesn't mount the devfs. Thanks for the opportunity to polish my skills. I'll check back in the morning to see if you are working again.

Tobin

DigiCrime 11-01-2005 04:49 AM

Yep think your onto something I read something similar while I tried it, didnt work so ill re-try again tommorrow after ive had a nights rest haha

let ya know, thanks for the help :)

DigiCrime 11-01-2005 12:37 PM

That worked :) Thanks much for your help

Now to go back thru and tweak kernek config


All times are GMT -5. The time now is 11:40 PM.