You are not logged in.
Pages: 1
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
Do you remember the exact command u've typed? and where were u when u typed it? (in which folder)
[My Blog] | [My Repo] | [My AUR Packages]
Offline
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.
My kernel version is 2.16
Are you sure about that?
I am a gated community.
Offline
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
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
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
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
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
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
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
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
Pages: 1