You are not logged in.

#1 2006-01-19 14:26:04

willy
Member
Registered: 2006-01-19
Posts: 53

deleted ttys

Hi all,
I've just done a very stupid thing. I was trying the commands in bash. I tried a command called 'clearlinks', I think it deletes all links that points to nothing and all empty file. I tried it and I think it has deleted the ttys in /dev and maybe something else that I don't know.

When I tried to reboot my computer, it loads until a part where it stops loading. The BusyBox came out and a warning/announcement saying:
/bin/sh: can't access tty; job control turned off
then there is a command prompt that I don't know how to use.

My kernel version is 2.16

Can somebody tell me how to fix my comp, please? (without reformatting it, if possible).

Offline

#2 2006-01-19 14:53:15

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: deleted ttys

Do you remember the exact command u've typed? and where were u when u typed it? (in which folder)

Offline

#3 2006-01-19 19:37:00

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: deleted ttys

It sounds more like you're having a problem with initrd than anything (the symptoms you described are a typical outcome). Try using the initrd26-full.img in grub and see if that helps.

You might also want to load a live-cd, chroot in, and run mkinitrd auto to recreate the initrd image.

willy wrote:

My kernel version is 2.16

Are you sure about that?


I am a gated community.

Offline

#4 2006-01-20 14:04:59

willy
Member
Registered: 2006-01-19
Posts: 53

Re: deleted ttys

Thank for replying guys,

Do you remember the exact command u've typed? and where were u when u typed it? (in which folder)

I think I did it at the root (/) folder. I only typed clearlinks as root.

stonecresrt, can you give me the detailed step, please, you know, because I'm still not too good with linux :oops:

Are you sure about that?

Err, I'm not too sure, but it's the newest major version, I'm quitesure about that.

Offline

#5 2006-01-21 06:10:38

willy
Member
Registered: 2006-01-19
Posts: 53

Re: deleted ttys

ok, I've tried to chroot into my computer and run mkinitrd auto, but the same thing still shows up when I try to boot the computer.

Is there anyway to recreate all the things inside dev?

Or is there anything else that I need to recreate?

Oh, and I've found out my kernel version, it's 2.6 not 16, sorry 'bout that.

Offline

#6 2006-01-21 09:14:49

willy
Member
Registered: 2006-01-19
Posts: 53

Re: deleted ttys

I tried to use makedevs to recreate all the ttys in /dev. Is it the correct way?

Will recompiling the kernel solve the problem? If yes, can anybody tell me how to do it (In details if possible.)

Offline

#7 2006-01-21 10:12:50

hiower4
Member
Registered: 2004-07-31
Posts: 38

Re: deleted ttys

Recompiling the kernel would not help you.

at boot (in grub) try changing the line

initrd /initrd26.img

to

initrd /initrd26-full.img

also, when running mkinitrd auto, make sure you have your boot partition mounted (if you have one)


#348498 +(4737)- [X]

<MasterG> .....................................................................
          ..................................
<judas> where's pacman when you need him?

Offline

#8 2006-01-23 03:40:58

willy
Member
Registered: 2006-01-19
Posts: 53

Re: deleted ttys

I've tried all of that, but the same warning still comes up:

/bin/sh: can't access ty; job control turned off

[/quote]

Offline

#9 2006-01-23 04:26:11

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: deleted ttys

You could try deleted the two images (initrd26.img and initrd26-full.img) and then reinstall the kernel and mkinitrd packages (i.e. pacman -U /var/cache/.../kernel26.pkg.tar.gz) so that new images are created.

Aside from that, I'm out of ideas, sorry. But I actually had to do the above lines at one point, merely doing a "mkinitrd auto" wasn't helping for whatever reason. And I was getting the exact error that you are, and it fixed it.


I am a gated community.

Offline

#10 2006-01-23 23:23:11

hiower4
Member
Registered: 2004-07-31
Posts: 38

Re: deleted ttys

Well, I hope you have learned something from this - don't run command which you do not know what they do - especially not as root in root  :?

As the command was cleanlinks - it has removed a lot of links ans empty directories - I use lvm and made a snapshot of root (not including /usr and /var ), and noticed a huge difference there between before i ran cleanlinks and after. My guess is that your computer does not start, because links between libraries which the programs need have been removed.

Try chroot into you box, make sure that all relevant partitions (such as /boot and /usr, if you have them separated from the root partition) are mounted. Then simply reinstall about every package. That you could easy do by running this scripts i quickily hacked for you.

#!/bin/bash
pacman.static -Sy
for i in `pacman.static -Q`:
do
    echo $i >> some_file.tmp
done
pacman.static -S --noconfirm `sed -e'/[.]/d' some_file.tmp`
rm some_file.tmp

Note that this little script will break if you have installed any home made packages.

[edit] refined the script and added comment.


#348498 +(4737)- [X]

<MasterG> .....................................................................
          ..................................
<judas> where's pacman when you need him?

Offline

#11 2006-01-25 02:23:19

willy
Member
Registered: 2006-01-19
Posts: 53

Re: deleted ttys

Alright, thanks alot guys, I won't bother anyone anymore, I'll just try the suggestion and if they dont' work, I'll just reformat the hard disk

Offline

Board footer

Powered by FluxBB