# can't set up new kernel...

## john-doe

my ordeal continues,now can not set up new kernel,lost seconds ago my gentoo entry on grub but now recovered and running the old kernel[3.2.12]

```
grub.conf

default 0

timeout 5

gentoo

root (hd0,2)

kernel /boot/linux-3.4.0-gentoo root=/dev/sda3

title Gentoo Linux

root (hd0,2)

kernel /boot/linux-3.2.12-gentoo root=/dev/sda3

title Windows XP

rootnoverify (hd0,0)

makeactive

chainloader +1 
```

```
menu.lst

default 0

timeout 5

gentoo

root (hd0,2)

kernel /boot/linux-3.4.0-gentoo root=/dev/sda3

title Gentoo Linux

root (hd0,2)

kernel /boot/linux-3.2.12-gentoo root=/dev/sda3

title Windows XP

rootnoverify (hd0,0)

makeactive

chainloader +1 

```

Last edited by john-doe on Wed Jun 13, 2012 9:31 pm; edited 2 times in total

----------

## NeddySeagoon

john-doe,

```
gentoo 

root (hd0,2) 

kernel /boot/linux-3.4.0-gentoo root=/dev/sda3 
```

close 

```
title gentoo
```

in the first line would be better.

----------

## john-doe

Thx man! do I need to comment the old kernel? don't want loose it if some goes wrong...

what about /boot? btw I don't have it...

```
Then copy new kernel in to the boot directory: cp /usr/src/linux/arch/i386/boot/bzImage /boot/YourKernelName_with_BuildDate_if_you_wish
```

----------

## NeddySeagoon

john-doe,

Leave your old grub entry. With your present settings grub will give you 5 seconds to choose it from the menu.

You must have a directory called /boot. It could be a partition too but need not be.

Your 

```
root (hd0,2)
```

tells that boot is probably in /dev/sda3

That

```
 kernel /boot/linux-3.2.12-gentoo root=/dev/sda3 
```

works tells that /boot does exist and that is is a directory on your root partition.

IF that is not true, you old kernel could not get started.

```
cp /usr/src/linux/arch/i386/boot/bzImage /boot/YourKernelName_with_BuildDate_if_you_wish
```

may not work any more.

The problem is the /i386/ part.  Around kernel 2.6.24 the source trees for the 32 bit and 64 bit kernels were merged. At that time i386 became a symbolic link to /x86/ which is correct for 32 bit and 64 bit Intel/AMD systems.  The symlink has been removed. You are a victim of out of date documentation.

Change the /i386/ to /x86/ and the command will work.

----------

## john-doe

Booting        'Gentoo Linux'

root (hd0,2)

Filesystem type is ext2fs,partittion type 0x83

kernel /boot/linux-3.4.0-gentoo root=/dev/sda3

Error 15: File mot found

Press any key o continue...

```
# ls                                                                                       

System.map-3.2.12-gentoo  config-3.2.12-gentoo  linux-3.2.12-gentoo                               

boot                      grub                  vmlinuz-3.2.12-gentoo        
```

----------

## NeddySeagoon

john-doe

```
/boot/linux-3.4.0-gentoo
```

is what grub is trying to load and it doesn't exist, so you get Error 15, which means file not found.

Boot the old kernel and run 

```
readlink /usr/src/linux
```

IF that shows a 3.4.0 kernel, continue with 

```
cp /usr/src/linux/arch/x86/boot/bzImage /boot/linux-3.4.0-gentoo
```

Now reboot and run 

```
uname -a
```

 if the system starts. What kernel version does that show?

----------

## john-doe

Needy...how much  I owe U till now?  :Razz: 

```
$ uname -r                                                                                   

3.4.0-gentoo  
```

```
Local time zone must be set--see zic 
```

----------

## NeddySeagoon

john-doe,

If we ever meet, you can buy me a beer :)

----------

## john-doe

Bet U @_s!

now a little one:

```
Performing Global Updates:

(Could take a couple of minutes if you have a lot of binary packages.)                            

  .='update pass'  *='binary update'  #='/var/db update'  @='/var/db move'

  s='/var/db SLOT move'  %='binary move'  S='binary SLOT move'

  p='update /etc/portage/package.*'

/usr/portage/profiles/updates/2Q-2012.................

```

----------

## NeddySeagoon

john-doe,

Thats not a problem ... its a feature.

Its a part of 

```
emerge --sync
```

that runs when it needs to.

----------

## john-doe

Endless,speechless

http://i.imgur.com/OHZnN.gif

why SO PAIN every upgrade of kernel  :Question:   :Mad:   :Evil or Very Mad:  ??

I'm getting now why win$UCK$ is used 4 thousand of millions...

----------

## John R. Graham

Probably because people like blue so much better. You have a working kernel, which is a good thing to fall back to. Learning to properly configure the kernel takes time. Read, think, configure, compile, install, try, repeat.   :Wink: 

In the reading category, the kernel says couldn't mount the root. It tried several filesystems. Is the one you actually have among them? What root filesystem do you have?

Just to make sure, your working kernel is one that you configured or is it a Genkernel-made "kitchen sink" kernel? Once you've successfully configured one kernel, you can often copy that configuration file to the new kernel source directory to use as a starting point. This is explained in the Gentoo Linux Kernel Upgrade Guide, Section 11.

- John

----------

## john-doe

Let me get back to penguin(writing from winBUG$) to show U grub.conf

EXT4

 *Quote:*   

> What root filesystem do you have? 

 

----------

## John R. Graham

Don't believe I need to see grub.conf. It seems clear that the drivers for the Ext4 filesystem were omitted from the kernel when you configured it. Make that change, recompile, reinstall, and let's see what happens.

- John

----------

## john-doe

 *NeddySeagoon wrote:*   

> The symlink has been removed. You are a victim of out of date documentation

 

someone should do something!

----------

## John R. Graham

Gentoo is an all volunteer organization, depending on its user's support to evolve and improve. All Gentoo developers, council members, board of trustee members, and lowly forum moderators are unpaid volunteers. The somebody that should do something is you. Your part here, as a member of the Gentoo community, is to file a bug in Gentoo Bugzilla, citing the documentation that's in error and (if possible) the correction that needs to be applied.

- John

----------

## John R. Graham

@john-doe, if you don't understand something, please just ask for clarification. We don't mind.   :Wink:  If you don't want to do something that we suggest, then tell us why and we will clarify. But jumping around from method to method and thread to thread is actually making it harder on yourself.

NeddySeagoon has given the same advice that I did. This is actually a pretty simple problem. Are you able to try that advice?

- John

----------

## john-doe

John: U will not believe this:

tried to install new kernel ==> 3.4.3 but 'to vary' some error on kernel: config devtmpfs so  = = > NO KEYBOARD NO MOUSE!  :Mad: 

the ordeal ...  :Evil or Very Mad: 

----------

## John R. Graham

You mean you got the new kernel to boot but you don't have a keyboard or mouse inside the desktop environment?

- John

----------

## john-doe

Yep! some related to UDEV or so...

same thing: https://forums.gentoo.org/viewtopic-t-923956-highlight-.html

----------

## John R. Graham

No, not related to udev. When you build and run a new kernel, you need to rebuild the kernel device drivers that are not part of the kernel source tree. Prominent examples of these out-of-kernel drivers are: xorg-drivers and nvidia-drivers.

Are you by chance running Portage 2.2? There's a useful feature that helps rebuild the correct packages in Portage 2.2.

Also, are you starting X automatically on boot (and thus you have no keyboard at all) or are you still starting it manually with startx?

Finally, don't go off and try something else. Let's debug this issue one step at a time, methodically, until we get it solved. Deal?   :Wink: 

- John

----------

## john-doe

how do I get .config file?

----------

## John R. Graham

I don't understand the question. Could explain a little more thoroughly, please?

Also, could you answer my previous questions? It's pretty hard to help you if you don't give us what we need to know to help you.

- John

----------

## john-doe

 *John R. Graham wrote:*   

> I don't understand the question 

 

Pappys asking 4 his kernel!  :Idea: Last edited by john-doe on Wed Jun 20, 2012 4:12 pm; edited 1 time in total

----------

## John R. Graham

Trade you an answer for an answer.   :Wink: 

- John

----------

## john-doe

 *Quote:*   

> Are you by chance running Portage 2.2? There's a useful feature that helps rebuild the correct packages in Portage 2.2.

 

Installed version:2.1.10.65 (Testing)

 *Quote:*   

> Also, are you starting X automatically on boot (and thus you have no keyboard at all) or are you still starting it manually with startx?

 

I'm old fashioned so use startx :Cool: 

----------

## John R. Graham

Okay, the .config file will be under "/usr/src/<kernel-name>" where <kernel-name> is the name of the kernel you're currently working on. If you need to send this .config file to someone, the easiest way is probably through wgetpaste. If you don't already have that installed, just emerge it:

```
emerge -v wgetpaste
```

After that, just run

```
wgetpaste /usr/src/<kernel-name>/.config
```

(be sure to substitute the actual kernel directory name). You will get a line back with a URL where Pappy (or anyone else) can retrieve it. For example:

```
$ wgetpaste /usr/src/linux-2.6.38-reiser4-r6/.config

Your paste can be seen here: https://gist.github.com/2961035
```

Just give Pappy that URL.

Now for the reason you don't have keyboard and mouse. After a kernel update, you must rebuild the x11 hardware drivers. To be able to tell you what you need to rebuild, could you post the output of 

```
emerge -1vp xorg-drivers
```

please?

- John

----------

## john-doe

 *John R. Graham wrote:*   

> 
> 
> ```
> emerge -1vp xorg-drivers
> ```
> ...

 

```
 $ emerge -1vp xorg-drivers

These are the packages that would be merged, in order:                                            

                                                                                                  

Calculating dependencies... done!                                                                 

[ebuild   R    ] x11-base/xorg-drivers-1.12  INPUT_DEVICES="evdev keyboard mouse -acecad -aiptek -elographics -fpit -hyperpen -joystick -mutouch -penmount -synaptics -tslib -vmmouse -void -wacom" VIDEO_CARDS="intel vesa -apm -ark -ast -cirrus -dummy -epson -fbdev -fglrx -geode -glint -i128 -i740 -mach64 -mga -modesetting -neomagic (-newport) -nouveau -nv -nvidia (-omapfb) -qxl -r128 -radeon -s3 -s3virge -savage -siliconmotion -sis (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -v4l -via -virtualbox -vmware (-voodoo)" 0 kB                 

                                                                                                  

Total: 1 package (1 reinstall), Size of downloads: 0 kB   
```

----------

## John R. Graham

Run this command:

```
emerge -1v xf86-input-{keyboard,mouse,evdev} xf86-video-{intel,vesa}
```

and I'll bet you have your keyboard and mouse back.   :Wink: 

(Later on, we'll get you upgraded to the Portage 2.2 branch where this is much easier. Better to change one thing at a time, though.)

- John

----------

## john-doe

U r wrong 'pal'(thus between quotes):

http://i.imgur.com/so0Lp.jpg

http://i.imgur.com/YdrNX.jpg

 *Quote:*   

> No, not related to udev

 

----------

## kurly

 *john-doe wrote:*   

> U r wrong 'pal'(thus between quotes):
> 
> http://i.imgur.com/so0Lp.jpg
> 
> http://i.imgur.com/YdrNX.jpg
> ...

 Is there any particular reason you're being rude to someone who is trying very nicely to help you?   :Confused: 

----------

## NeddySeagoon

john-doe,

Please fix your kernel following the instructions at the top of this link

Its a little hard to read due to the flash but I'm sure you can make it out. Its easier to read in here

----------

## john-doe

 *kurly wrote:*   

> Is there any particular reason you're being rude to someone who is trying very nicely to help you?  

 

 *Quote:*   

> @john-doe, if you don't understand something, please just ask for clarification. We don't mind.  If you don't want to do something that we suggest, then tell us why and we will clarify

 

----------

## john-doe

 *NeddySeagoon wrote:*   

> 
> 
> Please fix your kernel following the instructions at the top of this link
> 
> Its a little hard to read due to the flash but I'm sure you can make it out. Its easier to read in here

 

I have configured that! the error continues...

----------

## John R. Graham

Which error? The boot up error message about missing devtmpfs support? Or, the lack of keyboard / mouse in your desktop environment?

- John

----------

## john-doe

easy fellows...I'm on gentoo with kernel 3.4.2!

if I switch to k3.4.3 got that message on kernel so when I get inside the desktop environment no mouse no keyboard...

getting sick I mean it...every upgrade of kernel...is there a way to do it automatically?

----------

## John R. Graham

In short, no. Show me the contents of your /usr/src directory, please, like this

```
ls -l /usr/src
```

as I want to manually walk you through checking your kernel config for certain items.

Well, I take that back, at least partly. Are you satisfied with the way your system works under the 3.4.2 kernel? 3.4.3 is close enough in version that you can usually successfully copy over the old kernel configuration and modify it automatically. Would you like to try that? If so, I can walk you through it.

- John

----------

## john-doe

```
ls -l /usr/src

total 16

lrwxrwxrwx  1 root root   18 Jun 18 16:03 linux -> linux-3.4.3-gentoo                             

drwxr-xr-x 20 root root 4096 Jun 13 19:49 linux-3.2.12-gentoo                                     

drwxr-xr-x 24 root root 4096 May 25 09:04 linux-3.4.0-gentoo                                      

drwxr-xr-x 24 root root 4096 Jun 13 18:56 linux-3.4.2-gentoo                                      

drwxr-xr-x 24 root root 4096 Jun 20 16:16 linux-3.4.3-gentoo 
```

----------

## John R. Graham

Okay, the following command will check whether or not you actually changed the .config as NeddySeagoon (and your kernel) recommended. Post the output of

```
grep CONFIG_DEVTMPFS /usr/src/linux/.config
```

please.

- John

P.S.: Heading home from work now so I'll be AFK for a good while.

P.P.S.: I edited my previous post somewhat with another option. Look at the last paragraph and let me know what you think.

----------

## john-doe

```
grep CONFIG_DEVTMPFS /usr/src/linux/.config

CONFIG_DEVTMPFS=y

CONFIG_DEVTMPFS_MOUNT=y

```

----------

## John R. Graham

Okay, so next questions:Did you build the kernel? That would be

```
cd /usr/src/linux

make

make modules_install
```

Did you copy your new kernel to the /boot directory? Would you check the timestamp of the file to make sure?

Did you ensure that your grub.conf properly refers to the new kernel so that you're sure that you're launching it?- John

----------

## BillWho

Also make sure /boot is mounted before copying bzImage   :Exclamation: 

----------

## John R. Graham

Yup. Good point.   :Smile: 

- John

----------

## john-doe

I pass 4 now! [aint got time] I'll wait 4 some new one kernel in few days...then we'll see if the 'ordeal' continues...  :Razz: 

----------

## john-doe

 *BillWho wrote:*   

> Also make sure /boot is mounted before copying bzImage  

 

Aint got /boot (partition) :Idea: 

----------

## john-doe

 *John R. Graham wrote:*   

> (Later on, we'll get you upgraded to the Portage 2.2 branch where this is much easier. Better to change one thing at a time, though.)

 

I want it ASAP...

----------

## John R. Graham

Tell you what. File that documentation bug and I'll tell you how.

Then again, you could discover how by reading the Handbook and the portage man page, which would also be a good thing.   :Wink: 

- John

----------

## NeddySeagoon

john-doe,

Your 

```
grep CONFIG_DEVTMPFS /usr/src/linux/.config 

CONFIG_DEVTMPFS=y 

CONFIG_DEVTMPFS_MOUNT=y 
```

and your own images which I referenced, taken together show that the kernel you were booting did not come from the .config file you grepped.

----------

## john-doe

 *NeddySeagoon wrote:*   

> john-doe

 

Needy:

how to upgrade to portage 2.2 branch?

----------

## krinn

 *john-doe wrote:*   

> 
> 
> Needy:
> 
> how to upgrade to portage 2.2 branch?

 

Honestly this question is a proof that you shouldn't get the answer for your safety  :Smile: 

----------

## john-doe

Dude...I ask cause aint an expert on 'gentoo'system'...I ask cause I'm newbie... got it?

----------

## NeddySeagoon

john-doe,

I will teach you to fish - but not give you a fish.  If you cannot help yourself given a few pointers, Gentoo is probably not for you.

To follow up on  *John R. Graham wrote:*   

> Then again, you could discover how by reading the Handbook and the portage man page, which would also be a good thing.

 

portage-2.2 is both hard masked and not keyworded. First of all, you must understand what that means. The net effect is that you don't get portage-2.2 by accident.

So ... do your homework and tell me what hard masked and not keyworded means. Then I'll give you another pointer, if you still need one.

----------

## john-doe

 *John R. Graham wrote:*   

> Did you copy your new kernel to the /boot directory? Would you check the timestamp of the file to make sure?
> 
> [*]Did you ensure that your grub.conf properly refers to the new kernel so that you're sure that you're launching it?[/list]

 

HOW?

HOW?

----------

## John R. Graham

Have you filed that documentation bug? Have you done Neddy's assigned homework?   :Wink: 

In all candor, asking these types of questions shows that you need to find and study a general Linux tutorial. I made a recent recommendation of a couple of good tutorials in this post, which you saw. If you feel you have a language barrier, you could ask in one of the language specific forums for a recommendation of a tutorial written in your native language.

- John

----------

