# cannot open /dev/tty[0-11]

## zgredek

I booted a brand new kernel (2.6.20), everything went fine except of these messages:

```
Cannot open /dev/tty0

Cannot open /dev/tty1

Cannot open /dev/tty2

Cannot open /dev/tty3

...
```

and so on.

I suppose there's something wrong with my kernel config. The config is huge and I don't want to post it all...

If anyone knows a possible solution of this problem please post!  :Wink: 

Thank you.

----------

## piewie

Do you have:

Device Drivers  --->

Character devices  --->

[*] Legacy (BSD) PTY support

----------

## zgredek

Yes, 

```
CONFIG_UNIX98_PTYS=y

CONFIG_LEGACY_PTYS=y

CONFIG_LEGACY_PTY_COUNT=256
```

----------

## piewie

permissions on my mashine:

```
crw-rw-rw- 1 root tty  5,   0  8. Mär 18:59 /dev/tty

crw-rw---- 1 root root 4,   0  8. Mär 18:59 /dev/tty0

crw------- 1 root root 4,   1  8. Mär 18:00 /dev/tty1

crw------- 1 root root 4, 3  8. Mär 18:00 /dev/tty3

crw------- 1 root root 4, 3  8. Mär 18:00 /dev/tty4"
```

----------

## zgredek

Look - I can't even get to the login prompt, let's leave permissions and such for later on...

What else should I look for? Other kernels work just fine, so it's quite obvious I must have messed up the config. But what exactly?

Thanks.

----------

## eccerr0r

are you using an initrd and is that up to date?

the permissions can be important, but more likely the devices aren't there... also make sure you have "virtual terminals" on consoles enabled (under character devices)

you should start with a fresh .config for 2.6.20, I ran into some weird issues for this particular version, which cleared right up when I created a new .config.

----------

## zgredek

 *eccerr0r wrote:*   

> 
> 
> are you using an initrd and is that up to date?
> 
> 

 

I think no:

```
title Gentoo Linux 2.6.20

        root (hd1,0)

        kernel (hd1,0)/kernel-2.6.20 root=/dev/hda2 vga=0x31B video=vesafb:ywrap,mttr,1024x768-24@75 quiet udev 
```

 *eccerr0r wrote:*   

> 
> 
> the permissions can be important, but more likely the devices aren't there... also make sure you have "virtual terminals" on consoles enabled (under character devices)
> 
> 

 

Virtual terminals? There's no such thing under character devices. Do you know what's the option name?

 *eccerr0r wrote:*   

> 
> 
> you should start with a fresh .config for 2.6.20, I ran into some weird issues for this particular version, which cleared right up when I created a new .config.
> 
> 

 

And I did! Clean, shiny new config   :Crying or Very sad: 

I will try again but the errors in new kernels are just killing me!   :Twisted Evil: 

Thanks guys for helping   :Wink: 

----------

## piewie

How about copying a good .config to the new source and doing make oldconfig?

----------

## zgredek

 *piewie wrote:*   

> How about copying a good .config to the new source and doing make oldconfig?

 

Tried that already. The last working config is from early 2.6's and it's totally differrent from what it's now...

----------

## piewie

do you have in /etc/inittab:

c1:12345:respawn:/sbin/agetty 38400 tty1 linux

c2:2345:respawn:/sbin/agetty 38400 tty2 linux

c3:2345:respawn:/sbin/agetty 38400 tty3 linux

c4:2345:respawn:/sbin/agetty 38400 tty4 linux

c5:2345:respawn:/sbin/agetty 38400 tty5 linux

c6:2345:respawn:/sbin/agetty 38400 tty6 linux

----------

## zgredek

 *piewie wrote:*   

> do you have in /etc/inittab:
> 
> c1:12345:respawn:/sbin/agetty 38400 tty1 linux
> 
> c2:2345:respawn:/sbin/agetty 38400 tty2 linux
> ...

 

This is what I have:

```

id:3:initdefault:

si::sysinit:/sbin/rc sysinit

rc::bootwait:/sbin/rc boot

l0:0:wait:/sbin/rc shutdown 

l1:S1:wait:/sbin/rc single

l2:2:wait:/sbin/rc nonetwork

l3:3:wait:/sbin/rc default

l4:4:wait:/sbin/rc default

l5:5:wait:/sbin/rc default

l6:6:wait:/sbin/rc reboot

#z6:6:respawn:/sbin/sulogin

# TERMINALS

c1:12345:respawn:/sbin/agetty 38400 tty1 linux

c2:12345:respawn:/sbin/agetty 38400 tty2 linux

c3:12345:respawn:/sbin/agetty 38400 tty3 linux

c4:12345:respawn:/sbin/agetty 38400 tty4 linux

c5:12345:respawn:/sbin/agetty 38400 tty5 linux

c6:12345:respawn:/sbin/agetty 38400 tty6 linux

ca:12345:ctrlaltdel:/sbin/shutdown -r now

x:a:once:/etc/X11/startDM.sh
```

----------

## widremann

 *zgredek wrote:*   

>  *piewie wrote:*   How about copying a good .config to the new source and doing make oldconfig? 
> 
> Tried that already. The last working config is from early 2.6's and it's totally differrent from what it's now...

 

Once you copy the config, make sure to run "make oldconfig" to update your config for the new kernel.

----------

## zgredek

I did 'make oldconfig' but it asks me a lot of questions (just like in 'make config')...

----------

## Hu

 *zgredek wrote:*   

> I did 'make oldconfig' but it asks me a lot of questions (just like in 'make config')...

 

That's normal.  Any questions which have been added since the old kernel version will need to be answered.  Any questions which existed in both the old and new kernel will be answered the same as they were in the old configuration.

----------

## zgredek

Is it possible to copy the .config and then run make menuconfig/xconfig or do I need 'make oldconfig'?

----------

## Hu

 *zgredek wrote:*   

> Is it possible to copy the .config and then run make menuconfig/xconfig or do I need 'make oldconfig'?

 

You really should run make oldconfig after copying in an older .config file.  Various documents say that not doing so could lead to undesirable or strange results.  That said, when you run make oldconfig, it will update the .config for the new kernel.  You can then run make menuconfig or make xconfig, which will load the newly-updated .config file for further modifications.  I do this regularly when I switch to a new kernel version.

----------

