Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to boot 2.6.28-hardened-r9 kernel [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1317

PostPosted: Sun May 31, 2009 1:03 am    Post subject: Unable to boot 2.6.28-hardened-r9 kernel [SOLVED] Reply with quote

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:

Code:
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:
Code:
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/
Code:
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
_________________
Server Admin Blog - Uno-Code.com | Gentoo Hosting at Rackspace!


Last edited by hanj on Mon Jun 01, 2009 1:20 am; edited 1 time in total
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1585
Location: U.S.A.

PostPosted: Sun May 31, 2009 4:02 am    Post subject: Reply with quote

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?)
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1317

PostPosted: Sun May 31, 2009 4:19 am    Post subject: Reply with quote

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
_________________
Server Admin Blog - Uno-Code.com | Gentoo Hosting at Rackspace!
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1585
Location: U.S.A.

PostPosted: Sun May 31, 2009 4:35 am    Post subject: Reply with quote

How much free space (%) is there in your /boot partition?
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1317

PostPosted: Sun May 31, 2009 4:43 am    Post subject: Reply with quote

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


Code:
/dev/sda1               96M    75M    17M  82% /boot


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

Thanks!
hanji
_________________
Server Admin Blog - Uno-Code.com | Gentoo Hosting at Rackspace!
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1317

PostPosted: Sun May 31, 2009 4:52 am    Post subject: Reply with quote

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

hanji
_________________
Server Admin Blog - Uno-Code.com | Gentoo Hosting at Rackspace!
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1317

PostPosted: Sun May 31, 2009 4:56 am    Post subject: Reply with quote

Interesting note in ChangeLog for this...
Code:
*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
_________________
Server Admin Blog - Uno-Code.com | Gentoo Hosting at Rackspace!
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1585
Location: U.S.A.

PostPosted: Sun May 31, 2009 4:56 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1585
Location: U.S.A.

PostPosted: Sun May 31, 2009 4:57 am    Post subject: Reply with quote

hanj wrote:
Interesting note in ChangeLog for this...
Code:
*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


Aha. I rebooted with problem though. :?
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1317

PostPosted: Sun May 31, 2009 2:04 pm    Post subject: Reply with quote

BoneKracker wrote:
Aha. I rebooted with problem though. :?


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

Thanks!
hanji
_________________
Server Admin Blog - Uno-Code.com | Gentoo Hosting at Rackspace!
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1317

PostPosted: Sun May 31, 2009 2:08 pm    Post subject: Reply with quote

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.

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.


Hello

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

Code:
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
_________________
Server Admin Blog - Uno-Code.com | Gentoo Hosting at Rackspace!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 10403

PostPosted: Sun May 31, 2009 5:05 pm    Post subject: Reply with quote

What code changed between -r7 and -r9? Based on the original problem report, I suspect a boot regression included only on some configurations.
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1317

PostPosted: Sun May 31, 2009 5:11 pm    Post subject: Reply with quote

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

Code:
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
_________________
Server Admin Blog - Uno-Code.com | Gentoo Hosting at Rackspace!
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1585
Location: U.S.A.

PostPosted: Sun May 31, 2009 8:59 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 396
Location: NRW, Germany

PostPosted: Sun May 31, 2009 9:40 pm    Post subject: Reply with quote

Not that it helps you, but I couldnt boot hardened-r9 either. It was a different problem tho, iirc.
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1317

PostPosted: Mon Jun 01, 2009 1:20 am    Post subject: Reply with quote

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
_________________
Server Admin Blog - Uno-Code.com | Gentoo Hosting at Rackspace!
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1585
Location: U.S.A.

PostPosted: Mon Jun 01, 2009 1:47 am    Post subject: Reply with quote

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!
hanji

Makes sense, I have power management pretty much disabled:

PM [=y]
ACPI [=y]
CPU_IDLE [=y]

(everything else under power management is "n")
Back to top
View user's profile Send private message
jowr
n00b
n00b


Joined: 27 Dec 2008
Posts: 51

PostPosted: Thu Jun 18, 2009 7:45 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1585
Location: U.S.A.

PostPosted: Thu Jun 18, 2009 8:31 pm    Post subject: Reply with quote

Or you could use OpenBSD or FreeBSD. Their stuff works.
Back to top
View user's profile Send private message
jowr
n00b
n00b


Joined: 27 Dec 2008
Posts: 51

PostPosted: Fri Jun 19, 2009 12:17 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
jaypeche
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jun 2007
Posts: 146
Location: France

PostPosted: Sat Sep 19, 2009 7:23 am    Post subject: Solution Reply with quote

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 !

Code:
emerge -v hardened-sources
emerge -v gradm
gradm -P


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

Good Luck !

Bye :wink:
_________________
:-) Gentoo Linux Rullez !
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum