linux can't boot normally

Started by
5 comments, last by Robinhood 17 years, 9 months ago
I deleted directories ./home and ./initrd .Now the linux operation can't boot. So how to solve this problem. By the way,how to restore files in recycle by command?
Advertisement
The recycler is not a linux feature, it's probably a feature of some software you've installed, such as KDE. Which of these sounds familiar to you: KDE or GNOME?

If you don't know or there is no command-line tool to restore files from recycle, then you're probably best off reinstalling. You might wanna peek around for a recycler or ".recycle" folder or something to that nature. If there is one then you might be able to "cd" into it then copy your files out. I don't know if this will work though, because I don't know how the recycle software stores the info, since it must keep some sort of data in order to know where to restore the file. Thus the files inside might have strange names which seem to be random characters, since it needs to make sure that deleted files with the same names do not conflict. Your init scripts are custom tailored for your system by your installation, and generally managed by the packages you've installed. This is typical of deb and rpm packages. You're probably better off reinstalling if this is a new linux installation. Backup any data before you do so.

Oh and a word of advice: in linux, never delete a file which you didn't create.
I have written c++ souce codes ,and now how to backup them?
Quote:Original post by Robinhood
I have written c++ souce codes ,and now how to backup them?


If you have a floppy disk, I would copy them to it.

You could copy them to a network share on a windows machine if you have samba set up.

You could create an FTP server on another computer then use the ftp command to transfer them to it.

You could install a spare hard disk in the linux machine then copy the files to it. Remove it before you reinstall, just in case you could accidentally reformat it during installation.

If you're unable to boot, you might want to try downloading a linux-live disk such as knoppix. It is a full linux installation on a CD. You could boot from that in order to access the other hard disk. It may even have CD burning software installed if that's more convenient than a floppy for you.
How to mount a portable disk in rescue mode ?
If you are backing up just a small number of files, you can use a floppy disk. At the command prompt you will probably need to do something like this:

$ cd <the location of the files to back-up>
<insert floppy disk>
$ mount floppy
or:
$ mount /mnt/floppy
or:
$ mount /dev/floppy
for each file to copy:
$ cp file.cpp /floppy

If you know very little about linux, my recommendation to you would be to use the knoppix boot CD. It will be much easier.
Thank you very much! I have solved the problem with your great help.

This topic is closed to new replies.

Advertisement