2011-02-09 22:01:20

by Amirali Shambayati

[permalink] [raw]
Subject: ubuntu boot problem after compiling new kernel

Hello all,
I compiled a new kernel according to
http://www.howtoforge.com/kernel_compilation_ubuntu instructions. The
kernel version is 2.6.18.1 and I did it in ubuntu 10.04 installed on
Virtualbox. But by choosing this kernel at grub, it gives this error:

libudev: udev_monitor_new_from_netlink: error getting socket: Invalid argument
Segmentation fault
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/sda1 does not exist. Dropping to a shell!

I googled it and I looked for solution in many forums. I found some
solutions, but none of them worked for me :(
Such as checking if root device in grub is right for this kernel...
adding rootdelay=... to kernel line ... update-initramfs, adding
all_generic_ide to kernel line,...

My main kernel version is 2.6.32.21

Your help is appreciated. It's more than a week that I'm looking for a
solution. :-s


--
Amirali Shambayati
Bachelor Student
Computer Engineering Department
Sharif University of Technology
Tehran, Iran


2011-02-09 22:11:10

by Chris Ball

[permalink] [raw]
Subject: Re: ubuntu boot problem after compiling new kernel

Hi,

On Thu, Feb 10, 2011 at 01:30:56AM +0330, Amirali Shambayati wrote:
> Hello all,
> I compiled a new kernel according to
> http://www.howtoforge.com/kernel_compilation_ubuntu instructions. The
> kernel version is 2.6.18.1 and I did it in ubuntu 10.04 installed on
> Virtualbox. But by choosing this kernel at grub, it gives this error:
>
> libudev: udev_monitor_new_from_netlink: error getting socket: Invalid argument

2.6.18.1 is more than 4 years old. Ubuntu 10.04 requires 2.6.32 or higher.
You need to use a newer kernel.

--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child

2011-02-10 08:11:04

by Anca Emanuel

[permalink] [raw]
Subject: Re: ubuntu boot problem after compiling new kernel

On Thu, Feb 10, 2011 at 12:00 AM, Amirali Shambayati
<[email protected]> wrote:
> Hello all,
> I compiled a new kernel according to
> http://www.howtoforge.com/kernel_compilation_ubuntu instructions. The
> kernel version is 2.6.18.1 and I did it in ubuntu 10.04 installed on
[snip]
> Your help is appreciated. It's more than a week that I'm looking for a
> solution. :-s

Use this tutorial: https://wiki.ubuntu.com/KernelTeam/GitKernelBuild

2011-02-11 16:56:01

by Amirali Shambayati

[permalink] [raw]
Subject: Re: ubuntu boot problem after compiling new kernel

Thanks Chris and Anca,

I tried to compile latest kernel(2.6.37). but I receive an assembly
error: /include/trace/events/kmem.h:45: undefined reference to
'.L1747'. I didn't have any error at linux-2.6.18.1 compilation. I
read somewhere that kernel should be compiled by gcc-3.4 . Thus I
used gcc-3.4 to compile. Do you think it's a compiler issue? Should I
use another gcc version?
Sorry for asking stupid questions from you experts. I'm a newbie at
working with kernel.

Thanks in advance

On Thu, Feb 10, 2011 at 11:41 AM, Anca Emanuel <[email protected]> wrote:
> On Thu, Feb 10, 2011 at 12:00 AM, Amirali Shambayati
> <[email protected]> wrote:
>> Hello all,
>> I compiled a new kernel according to
>> http://www.howtoforge.com/kernel_compilation_ubuntu instructions. The
>> kernel version is 2.6.18.1 and I did it in ubuntu 10.04 installed on
> [snip]
>> Your help is appreciated. It's more than a week that I'm looking for a
>> solution. :-s
>
> Use this tutorial: https://wiki.ubuntu.com/KernelTeam/GitKernelBuild
>



--
Amirali Shambayati
Bachelor Student
Computer Engineering Department
Sharif University of Technology
Tehran, Iran

2011-02-11 23:00:17

by Matt

[permalink] [raw]
Subject: Re: ubuntu boot problem after compiling new kernel

>Thanks Chris and Anca,

>I tried to compile latest kernel(2.6.37). but I receive an assembly
>error: /include/trace/events/kmem.h:45: undefined reference to
>'.L1747'. I didn't have any error at linux-2.6.18.1 compilation. I
>read somewhere that kernel should be compiled by gcc-3.4 . Thus I
>used gcc-3.4 to compile. Do you think it's a compiler issue? Should I
>use another gcc version?
>Sorry for asking stupid questions from you experts. I'm a newbie at
>working with kernel.

>Thanks in advance

Hi Amirali,

perhaps for 2.6.18* gcc-3.4* is used

but with 2.6.37 you could use the included gcc-4.4.3 (in Ubuntu 10.04)
and gcc-4.4.4
(according to http://distrowatch.com/table.php?distribution=ubuntu)

that worked fine for me in the past.

I don't know if you have full access to it but:

help.ubuntu.com - which is a sort of wiki for Ubuntu can be very
helpful in those things :)


https://help.ubuntu.com/community/Kernel/Compile

might help


If a pre-built vanilla-kernel is alright for you, you can also use the
ones provided by Ubuntu:

http://lwn.net/Articles/321473/
https://wiki.ubuntu.com/Kernel/MainlineBuilds?action=show&redirect=KernelMainlineBuilds


I hope that's what you're looking for


Regards

Matt

2011-02-13 10:05:32

by Amirali Shambayati

[permalink] [raw]
Subject: Re: ubuntu boot problem after compiling new kernel

Thanks Matt,

https://help.ubuntu.com/community/Kernel/Compile worked for me :)

On Sat, Feb 12, 2011 at 2:30 AM, Matt <[email protected]> wrote:
>>Thanks Chris and Anca,
>
>>I tried to compile latest kernel(2.6.37). but I receive an assembly
>>error: /include/trace/events/kmem.h:45: undefined reference to
>>'.L1747'. I didn't have any error at linux-2.6.18.1 compilation. I
>>read somewhere that kernel should be compiled by gcc-3.4 . ?Thus I
>>used gcc-3.4 to compile. Do you think it's a compiler issue? Should I
>>use another gcc version?
>>Sorry for asking stupid questions from you experts. I'm a newbie at
>>working with kernel.
>
>>Thanks in advance
>
> Hi Amirali,
>
> perhaps for 2.6.18* gcc-3.4* is used
>
> but with 2.6.37 you could use the included gcc-4.4.3 (in Ubuntu 10.04)
> and gcc-4.4.4
> (according to http://distrowatch.com/table.php?distribution=ubuntu)
>
> that worked fine for me in the past.
>
> I don't know if you have full access to it but:
>
> help.ubuntu.com - which is a sort of wiki for Ubuntu can be very
> helpful in those things :)
>
>
> https://help.ubuntu.com/community/Kernel/Compile
>
> might help
>
>
> If a pre-built vanilla-kernel is alright for you, you can also use the
> ones provided by Ubuntu:
>
> http://lwn.net/Articles/321473/
> https://wiki.ubuntu.com/Kernel/MainlineBuilds?action=show&redirect=KernelMainlineBuilds
>
>
> I hope that's what you're looking for
>
>
> Regards
>
> Matt
>



--
Amirali Shambayati
Bachelor Student
Computer Engineering Department
Sharif University of Technology
Tehran, Iran