# 2.6 X Mess

## Apreche

So, for the past day I've been reinstalling my gentoo with a 2.6.  On the first go around I had enabled/disabled some important kernel options and I was getting a blank screen after loading linux....

I did emerge system overnight, and this morning I got x installed nicely.  Everything was going good.  I had gdm, nvidia-kernel, nvidia-glx, xfree, xfce4.  Everything compiled nice and happy.  I did a nice xf86config that was nearly identical to the working one I had in 2.4.  I got all the nvidia modules in order and everything was happy.  my kernel was happy too, it detected all my hardware and didn't complain about anything.  SATA, emu10k1 and forcedeth were all working great. 

Nothing could go wrong!  Think again, hahaha.  I typed the dreaded startx.  I was greeted with my happy nvidia splash screen.  yay!  Then I saw my beloved X mouse cursor and about half a second later, the end.  The screen went blarg and threw me back to the console.  There were some messages about the keyboard, but it said they weren't fatal to X, just warnings.  

There were also some messages about not enough ptys.  I discovered in other posts that with 2.6 you need to enable 

```
[ ] /dev/pts file system for Unix98 PTYs
```

So I typed in genkernel --config and changed only that single option.  After the kernel recompiled I restarted.  The new kernel had simply overwritten my old one, so I don't think anything else needed changing.  It started up again just fine.  But startx had the same results.  

Next I think I made a grave mistake.  I did genkernel --config again.  I found the space where you set the number of ptys, and I double the number from 256 to 512.  It was the next logical number, and since I had not enough ptys, I think I would need more, yeah?  This is big trouble.  I rebooted, and lilo is still there, that how I booted into this windows install.  But if I choose linux it complains about how something is too large and the kernel overwrote the second stage of lilo or something like that.  This isn't good.  

Is there a way to save this install, or do I have to start again from stage 2 and start overnight compiling again?  Is there a list of kernel options I absolutely need and options I absolutely must not use in order to make gentoo-dev-sources work correctly?  Whether I save this install or not, what do I need to do to make X work in 2.6?  

Need help soon, thanks all.

----------

## cyrillic

After changing your kernel, you need to rerun /sbin/lilo for the changes to take effect.

You can boot with the LiveCD, mount your partitions, chroot, and rerun LILO from there to rescue your system.

----------

## NeddySeagoon

Apreche,

You need to learn about multiple kernels, so you can have one that works, one to play with and more.

You only need fix the kernel - no need for a whole reinstall.

Boot from the liveCD, mount your partitions, and get into the chroot environment. Do not partition or make filesystems. You are back in the position your were before you built your kernel.

To have multiple kernels, do the configute as normal then edit the  EXTRAVERSION = at the top of /usr/src/linux/Makefile. This will cause a whole new /lib/modules/<kernel_version>/ to be created for the modules.

When you copy the bzImage to /boot rename it. (2.6.0_broken) Likewise its initrd file if you need one.

Edit /boot/grub/grub.conf and add a whole new section but change the title (so you know what kernel you will boot) and the additional kernel and initrd file names. Lilo is the same, the file is /etc/lilo.conf. Remember to rerun lilo.

Heres my grub.conf

```
default 0

timeout 30

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

                                                                                                                                        

# This one is broken

# title=Gentoo

# root (hd0,0)

# kernel (hd0,0)/boot/bzImage  root=/dev/hda5 hdc=ide-scsi hdd=ide-scsi

                                                                                                                                        

title=Gentoo-Webcam

root (hd0,0)

kernel (hd0,0)/boot/linux-2.4.20-gentoo-r7 root=/dev/hda5 hdc=ide-scsi hdd=ide-scsi

                                                                                                                                        

title=Kernel 2.6.0 Test-5

root (hd0,0)

kernel (hd0,0)/boot/linux-2.6.0-test5  root=/dev/hda5 hdc=ide-scsi hdd=ide-scsi

```

I build kernels that dont need initrd files, hence they are not listed.

Regards,

NeddySeagoon

----------

## Apreche

Thanks guys.  Running lilo again fixed everything.  If it weren't for that livecd I'd be screwed.  I'm typing this right now in Firebird in XFCE4, oh yeah.

----------

## pjp

Moved from Installing Gentoo.

----------

## camresu

 *NeddySeagoon wrote:*   

> Apreche,
> 
> You need to learn about multiple kernels, so you can have one that works, one to play with and more.
> 
> To have multiple kernels, do the configute as normal then edit the  EXTRAVERSION = at the top of /usr/src/linux/Makefile. This will cause a whole new /lib/modules/<kernel_version>/ to be created for the modules.
> ...

 

Is there a way to pass the symbolic link to the system at boot time with grub?

I want to boot into 2.4 & 2.6 at times.

----------

## mlsfit138

 *camresu wrote:*   

>  *NeddySeagoon wrote:*   Apreche,
> 
> You need to learn about multiple kernels, so you can have one that works, one to play with and more.
> 
> To have multiple kernels, do the configute as normal then edit the  EXTRAVERSION = at the top of /usr/src/linux/Makefile. This will cause a whole new /lib/modules/<kernel_version>/ to be created for the modules.
> ...

 

Pass what symbolic link to the system at boot time?  Are you talking about /usr/src/linux?  You don't need to update the link everytime you boot, only when you compile the kernel (or modules attached to the kernel like xfree-drm).  You can configure grub to allow you to choose from a list of kernels at boot time.  

I switch back and forth between 2.4 and 2.6 too.  It's not a problem with my lilo setup.  No symlink changing is involved.  :Wink: 

I can't remember how to configure grub, but I remember that following the docs was pretty easy.  (don't get me wrong, this is not an RTFM post!  I'm a n00b!)

----------

## mlsfit138

 *Apreche wrote:*   

> Thanks guys.  Running lilo again fixed everything.  If it weren't for that livecd I'd be screwed.  I'm typing this right now in Firebird in XFCE4, oh yeah.

 

Yeah, shortly after the first time I installed gentoo the first time, I borked my system by installing a new kernel, and not running lilo.  

I had no access to any documentation (couldn't even get on the net) except for what was on the install cd.  I was an almost complete n00b (I'd used mandrake off and on for a couple of years but didn't learn anything), but I remembered what chroot did from the install, and i thought it was cool, and worth a try to save my system.  I chrooted, mounted my boot partition, and ran lilo.  I was so proud of myself!  That was one of those moments in the learning process that I won't forget.

----------

