by mu31tw » Tue Feb 07, 2012 5:33 pm
This worked for me to fix ssh (I mounted the filesystem USB drive on another Linux machine at /media/usbstick; MAKE SURE you don't do all commands on /dev if doing it this way as you'll be fixing the wrong machine!)
First, I manually fixed the random and urandom devices as listed previously in this thread.
Next, I manually added the first twenty tty devices according to Philoo's post:
$this->bbcode_second_pass_quote('', '
') crw-rw-rw- 1 root tty 5, 0 Dec 31 1969 /dev/tty
crw--w---- 1 root tty 4, 0 Dec 31 1969 /dev/tty0
crw-rw---- 1 root tty 4, 1 Feb 3 22:14 /dev/tty1
crw--w---- 1 root tty 4, 10 Dec 31 1969 /dev/tty10
crw--w---- 1 root tty 4, 11 Dec 31 1969 /dev/tty11
crw--w---- 1 root tty 4, 12 Dec 31 1969 /dev/tty12
crw--w---- 1 root tty 4, 13 Dec 31 1969 /dev/tty13
crw--w---- 1 root tty 4, 14 Dec 31 1969 /dev/tty14
crw--w---- 1 root tty 4, 15 Dec 31 1969 /dev/tty15
crw--w---- 1 root tty 4, 16 Dec 31 1969 /dev/tty16
crw--w---- 1 root tty 4, 17 Dec 31 1969 /dev/tty17
crw--w---- 1 root tty 4, 18 Dec 31 1969 /dev/tty18
crw--w---- 1 root tty 4, 19 Dec 31 1969 /dev/tty19
crw-rw---- 1 root tty 4, 2 Feb 3 22:14 /dev/tty2
with this:
$this->bbcode_second_pass_code('', 'sudo mknod -m 666 /media/usbstick/dev/tty c 5 0')
Make sure you match all the permissions and 'c' values (hint: rw-rw-rw- = 666, rw--w---- = 620, and rw-rw---- = 660).
Then, I added an entry in /etc/fstab:
$this->bbcode_second_pass_code('', 'devpts /dev/pts devpts defaults 0 0')
and finally, created a ptmx device in /media/usbstick/dev/:
$this->bbcode_second_pass_code('', 'sudo mknod -m 666 /media/usbstick/dev/ptmx c 5 2')
I'm sure this isn't the 'correct' way to fix the issue (i.e. use with caution), but I can now at least ssh into my box, which is more than I could before. Just a reminder, make sure that if you are mounting a usb drive on another system, that you don't mistakenly run the commands on /dev instead of /mnt/your-usb-drive/dev!
Hope this helps someone.