# Unable to boot 2.6.28-hardened-r9 kernel [SOLVED]

## hanj

Hello

I upgraded my hardened-sources from 2.6.28-hardened-r7 to r9 this morning. I did a `make oldconfig` and no new config options were found. After loading the kernel, I get this during boot:

```
Booting 'Gentoo (bzImage-2.6.28-hardened-r9)'

root (hd0,0)

Filesystem type is ext2fs, partition type 0x83

kernel (hd0,0)/boot/bzImage-2.6.28-hardened-r9 root=/dev/sda4

[Linux-bzImaeg, setup=0x2a00, size=0x165990]

Decompressing Linux... Parsing ELF... done.

Booting the kernel.
```

Machine is hung after this message. 

Everything works fine with 2.6.28-hardened-r7. Here is my grub line:

```
title=Gentoo (bzImage-2.6.28-hardened-r9)

root (hd0,0)

kernel (hd0,0)/boot/bzImage-2.6.28-hardened-r9 root=/dev/sda4
```

kernel tree is in /usr/src/

```
ls -al /usr/src/ | grep r9

lrwxrwxrwx  1 root root    25 May 30 08:18 linux -> linux-2.6.28-hardened-r9/

drwxr-xr-x 24 root root  1176 May 30 18:55 linux-2.6.28-hardened-r9
```

Any ideas?

Thanks!

hanji

----------

## Bones McCracker

Odd.  I made the same upgrade (simply using make oldconfig) and didn't have a problem.  Also with an ext2 boot partition.

My first thought would be to build the kernel again and reinstall it.  If you have ext2 as a module, maybe you forgot to make modules_install?

The only other that occurs to me is this: did you remember to reinstall GRUB after you last upgraded it?  I'm not sure this could even possibly be the problem, but it popped into my head, so I thought I'd mention it.

Barring that: filesystem problem?  (I.e., fragmentation or something?)

----------

## hanj

That server doesn't have module support, so no need for make modules_install in this case. I also suspected grub, so I did do a setup again on it.. and the problem persists. I just ran make again, and the bzImage is the same size as the original made this morning??

Weird?

hanji

----------

## Bones McCracker

How much free space (%) is there in your /boot partition?

----------

## hanj

 *BoneKracker wrote:*   

> How much free space (%) is there in your /boot partition?

 

```
/dev/sda1               96M    75M    17M  82% /boot
```

I deleted the source tree and re-emerged hardened-sources. Running make again.

Thanks!

hanji

----------

## hanj

I just rebuilt the kernel with fresh source, same problem. I definitely don't get it.

hanji

----------

## hanj

Interesting note in ChangeLog for this...

```
*hardened-sources-2.6.28-r9 (25 May 2009)

  25 May 2009; Gordon Malm <gengor@gentoo.org>

  -hardened-sources-2.6.28-r8.ebuild, +hardened-sources-2.6.28-r9.ebuild:

  Fix x86-32 boot failure (regression vs. 2.6.28-r7).
```

Looking further into this.

hanji

----------

## Bones McCracker

Stab in the dark: filesystem problem/fragmentation?

Above 80% things get packed pretty tight and tend to fragment, ext2 moreso than later ones.

Maybe back up your working kernel and related files from /boot, recreate /boot with a fresh filesystem, restore the working kernel files, and then run make install on your new sources.

That would clear any fragmentation or other filesystem-related problems.  Although again, I can't see how that would cause this.  Just an instinctive guess.

----------

## Bones McCracker

 *hanj wrote:*   

> Interesting note in ChangeLog for this...
> 
> ```
> *hardened-sources-2.6.28-r9 (25 May 2009)
> 
> ...

 

Aha.   I rebooted with problem though.   :Confused: 

----------

## hanj

 *BoneKracker wrote:*   

> Aha.   I rebooted with problem though.  

 

So you're not able to boot with this kernel as well?

Thanks!

hanji

----------

## hanj

 *BoneKracker wrote:*   

> Stab in the dark: filesystem problem/fragmentation?
> 
> Above 80% things get packed pretty tight and tend to fragment, ext2 moreso than later ones.
> 
> Maybe back up your working kernel and related files from /boot, recreate /boot with a fresh filesystem, restore the working kernel files, and then run make install on your new sources.
> ...

 

Hello

I removed some of my old kernel images from /boot got it down to 45%. I went ahead and tried what you said...

```
comp ~ # mount /boot

comp ~ # cp /boot/

comp ~ # cp /boot/ /root/boot.back090531 -R

comp ~ # umount /boot

comp ~ # mke2fs -j /dev/sda1

mke2fs 1.41.3 (12-Oct-2008)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

24096 inodes, 96356 blocks

4817 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=67371008

12 block groups

8192 blocks per group, 8192 fragments per group

2008 inodes per group

Superblock backups stored on blocks:

        8193, 24577, 40961, 57345, 73729

Writing inode tables: done

Creating journal (4096 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

comp ~ # mount /boot

comp ~ # cp /root/boot.back090531/* /boot/. -R
```

Still can't boot with new kernel. I also removed all PAX support, thinking that might help since there were two PAX bugs out there:

https://bugs.gentoo.org/show_bug.cgi?id=271871

https://bugs.gentoo.org/show_bug.cgi?id=264617

Thanks!

hanji

----------

## Hu

What code changed between -r7 and -r9?  Based on the original problem report, I suspect a boot regression included only on some configurations.

----------

## hanj

 *Hu wrote:*   

> What code changed between -r7 and -r9?  Based on the original problem report, I suspect a boot regression included only on some configurations.

 

Yeah.. not sure. I did a diff between r7 config and my original r9 (before I removed PAX stuff) and there are no changes between configs. As I mentioned before, I did do a make oldconfig prior to compiling this new kernel

```
diff linux-2.6.28-hardened-r7/.config /boot/config-2.6.28-hardened-r9

3,4c3,4

< # Linux kernel version: 2.6.28-hardened-r7

< # Mon Mar 30 08:38:58 2009

---

> # Linux kernel version: 2.6.28-hardened-r9

> # Sat May 30 08:19:03 2009
```

Any ideas where to look for the boot regression stuff?

Thanks for the reply!

hanji

----------

## Bones McCracker

 *hanj wrote:*   

>  *BoneKracker wrote:*   Aha.   I rebooted with problem though.   
> 
> So you're not able to boot with this kernel as well?

 

No, sorry.  That was a typo.

I have not had a problem rebooting.

----------

## Dr.Willy

Not that it helps you, but I couldnt boot hardened-r9 either. It was a different problem tho, iirc.

----------

## hanj

After spending a quiet afternoon compiling and recompiling my hardened-sources kernel, I found the problem. I went through and started to turn off various features, I started with PAX and Grsecurity since PAX had some problems according to bugs. None of that worked, and I had a flash back from a few years ago when I saw a similar message.. and it was related to power management. 

I rebuilt the kernel with Power Management disabled.. and it booted! Now, narrowing it down, it's related to ACPI Support. I disabled that, and I'm booting. I'll go ahead and submit a bug report relating to this.

Thanks for everyone's help on this!

hanji

----------

## Bones McCracker

 *hanj wrote:*   

> After spending a quiet afternoon compiling and recompiling my hardened-sources kernel, I found the problem. I went through and started to turn off various features, I started with PAX and Grsecurity since PAX had some problems according to bugs. None of that worked, and I had a flash back from a few years ago when I saw a similar message.. and it was related to power management. 
> 
> I rebuilt the kernel with Power Management disabled.. and it booted! Now, narrowing it down, it's related to ACPI Support. I disabled that, and I'm booting. I'll go ahead and submit a bug report relating to this.
> 
> Thanks for everyone's help on this!
> ...

 

Makes sense, I have power management pretty much disabled:

PM [=y]

ACPI [=y]

CPU_IDLE [=y]

(everything else under power management is "n")

----------

## jowr

Holy shit, could this be why this Xen DomU is being such a pain in the ass?!?!? I'm trying especially hard to configure a rock hard, both network-wise and locally, server that serves various things that will be under attack eventually.

The problem is...the kernel is being difficult. I'm running the PV-ops kernel using features straight from the tree. But 2.6.30-r1 refuses to work, but an equivalent config works 100% with 2.6.29-r4 [both gentoo-sources]. However another entirely equivalent config for 2.6.29 hardened sources launched the failboat as well. 

The hanging exactly mirrors mine, so if hardened-sources 2.6.28-r9 doesn't work off the bat I'm going to start nuking that stuff. I don't need it anyway.

----------

## Bones McCracker

Or you could use OpenBSD or FreeBSD.  Their stuff works.

----------

## jowr

I like Linux. Linux works. 

I just want Linux to do more, and am mystified as to why it is being a complete asshole to me. 

Removing APIC/ACPI support in both the kernel and the domU config did squat. Won't even do me the favor of showing debug messages! I think I'm going to start with the most minimal config I can [no to everything] and work up from there.

----------

## jaypeche

I have the same problem with this kernel version. Look at the ebuild logs when emerging hardened sources !

You should emerge gradm and execute gradm -P for booting kernel at the first time.

Your system must be stageX-hardened !

```
emerge -v hardened-sources

emerge -v gradm

gradm -P
```

Sorry, my english is not very well ! French user !

Good Luck !

Bye    :Wink: 

----------

