Page 1 of 1

Need help configuring kernel correctly

PostPosted: Sat May 16, 2009 1:06 pm
by mikeeusa2
[Linux-bzImage, setup=0x3000, size=0x334730]
...

WARNING bootdevice may be renamed. Try root=/dev/sda1
Gave up waiting for root device. Common problems:
-Boot args (cat /proc/cmdline)
-Check rootdelay= (did the system wait long enough
-Check root= (did the system wait for the right device?)
-Missing Modules (cat /proc/modules; ls /dev)
ALERT! /dev/hda1 does not exist. Dropping to a shell!

Re:Need help configuring kernel correctly

PostPosted: Sat May 16, 2009 1:56 pm
by spender
A vanilla kernel with the same exact configuration as you used for the grsec kernel is able to boot?

-Brad

Re: Need help configuring kernel correctly

PostPosted: Sat May 16, 2009 2:43 pm
by mikeeusa2
Here is part of grubs menu.list. Everything other than the grsec kernel works:

## ## End Default Options ##

title Debian GNU/Linux, kernel 2.6.29.3-grsec
#lock
root (hd0,0)
kernel /boot/vmlinuz-2.6.29.3-grsec root=/dev/hda1 ro quiet
#initrd /boot/initrd-2.6.29.3.img

title Debian GNU/Linux, kernel 2.6.26-2-686
#lock
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda1 ro quiet
initrd /boot/initrd.img-2.6.26-2-686

title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
lock
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.26-2-686

title Debian GNU/Linux, kernel 2.6.26-1-686
lock
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-1-686 root=/dev/hda1 ro quiet
initrd /boot/initrd.img-2.6.26-1-686

Re: Need help configuring kernel correctly

PostPosted: Sat May 16, 2009 2:48 pm
by mikeeusa2
I've not compiled anything other than the grsec kernel, as it took an entire day to compile.

Code: Select all
cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 6
model name      : Celeron (Mendocino)
stepping        : 0
cpu MHz         : 399.134
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr up
bogomips        : 799.94
clflush size    : 32
power management:


The .config is here: https://caethaver2.optus.nu/nexuizserv/ ... all.config

Re: Need help configuring kernel correctly

PostPosted: Sat May 16, 2009 3:51 pm
by spender
You've got a bunch of things compiled into the kernel that you don't need, and have many of them compiled as modules. If you cut down on these things, it wouldn't take a day to compile. I don't know what your system configuration is, but you must have something required for the kernel to see your harddrives compiled as a module instead of built-in. You also have your initrd line commented out.

-Brad

Re: Need help configuring kernel correctly

PostPosted: Sat May 16, 2009 5:30 pm
by mikeeusa2
I commented out the initrd line after the thing failed to boot to try to boot w/o initrd.

What do I need to compile in to get the hdd to work?

I really do no know what to compile into the kernel because if I don't compile stuff then nothing works (as linux seems to need random things to work).

Also if I change the config and recompile will it take forever to recompile again?

Re: Need help configuring kernel correctly

PostPosted: Sun May 17, 2009 5:20 am
by tjh
I don't mean to be rude, but really the grsec forum isn't the best place to be asking the very basics of kernel compilation.

There's a large number of guides out there that deal with it, as well as all the potential pitfalls.

Your best bet is to boot a working kernel and then, looking at the output from dmesg, figure out what drivers have actually be loaded for the hardware you have. lspci -v can also help with understanding what modules you'll need.

If, as it sounds, you built all the HDD drivers as modules, then didn't use initrd, the kernel will never be able to boot. You must always statically compile in disk drivers when not using initrd.

If I was you, I'd first of all start with getting your basic, plain, vanilla kernel up and working. Ensure you understand what all the drivers you're building are and why you're building them. Then add on the grsec patch.

Again, I don't mean to be rude or discourage you, but there are much better forums out there to help with this sort of stuff, once you've got the basics figured out, come back and we'll go from there.

Re: Need help configuring kernel correctly

PostPosted: Mon May 18, 2009 1:53 pm
by mikeeusa2
I did not set the topic to be "need help configuring kernel correctly".

The problem I have is the grsec kernel CANNOT FIND hda1!!!
Every OTHER kernel can!
But not grsec.
Every OTHER grsec kernel made from this config working on _OTHER_ computers works fine ( which is good :) )
And this is from using a kernel config that DID work on my other computers where hda1 __WAS__ found. So I don't think it is a kernel configuration problem.

I reconfigured the grsec kernel, never the less, adding built in support for everything related to a block device or harddrive I could find.
Compile took a full day again. Kernel STILL could not find hda1 .

Here is the config:
https://cat2.optus.nu/nexuizserv/otherm ... ll2.config
http://cat2.optus.nu:81/nexuizserv/othe ... ll2.config

Here is a screenshot of the failure to boot:
Image
http://pics.nexuizninjaz.com/images/mqs ... 4fj6y2.jpg

Here is the menu.list of grub:
Code: Select all
## ## End Default Options ##

title           Debian GNU/Linux, kernel 2.6.29.3-grsec
#lock
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.29.3-grsec root=/dev/hda1 ro quiet
initrd          /boot/initrd-2.6.29.3.img

title           Debian GNU/Linux, kernel 2.6.26-2-686
#lock
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.26-2-686 root=/dev/hda1 ro quiet
initrd          /boot/initrd.img-2.6.26-2-686

title           Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
lock
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.26-2-686 root=/dev/hda1 ro single
initrd          /boot/initrd.img-2.6.26-2-686

title           Debian GNU/Linux, kernel 2.6.26-1-686
lock
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.26-1-686 root=/dev/hda1 ro quiet
initrd          /boot/initrd.img-2.6.26-1-686

title           Debian GNU/Linux, kernel 2.6.26-1-686 (single-user mode)
lock
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.26-1-686 root=/dev/hda1 ro single
initrd          /boot/initrd.img-2.6.26-1-686


Remeber: this works fine on other computers, and I have set the processor type correctly (this is a celeron medecino box, I set it to pre-coppermine celeron/pentium II etc)

Should I try sda1? Everything else uses it as hda1.

Also I don't know how to boot a non-initrd kernel.

Re: Need help configuring kernel correctly

PostPosted: Mon May 18, 2009 2:05 pm
by tjh
This is getting rather stupid now, don't you think? Again, why don't you spent some time understanding what it is you're actually doing, before you blame grsec.

You almost certainly have a SATA drive, it is therefore being recognised as a /dev/sda1. The answer is even there on the screen, looking at you.
This has nothing to do with grsecurity and everything to do with the machine you're using.

Edit your boot linux in grub while booting.

Re: Need help configuring kernel correctly

PostPosted: Mon May 18, 2009 8:43 pm
by mikeeusa2
I'll try sda1, however I doubt I have a Serial ATA hard drive given that the 399MHZ celeron computer that the harddrive is pluged into predates Serial ATA and the HDD is connected to the motherboard via a flat IDE ribbon cable.

Re: Need help configuring kernel correctly

PostPosted: Mon May 18, 2009 8:47 pm
by mikeeusa2
Ok trying with:

title Debian GNU/Linux, kernel 2.6.29.3-grsec
#lock
root (hd0,0)
kernel /boot/vmlinuz-2.6.29.3-grsec root=/dev/sda1 ro quiet
initrd /boot/initrd-2.6.29.3.img

Re: Need help configuring kernel correctly

PostPosted: Mon May 18, 2009 8:58 pm
by mikeeusa2
Ok worked :D
Dunno why :P.