Yes it happened, I accidentally typed rm -f /* after I opened a terminal in a flash drive (stupid me thought it will delete the contents of the flash drive), then I realized what I’ve done and shut down the PC. Now offcourse the system won’t boot, cannot find boot files.
Is there a way to repaird the root fs ? Does my user home folder also go wiped ?
I managed to boot with a rescue cd and I see only some files and directories are missing from my root fs, can I somehow repair them with the original OpenSUSE disc ? I need to keep my user and files\settings.
On 2013-09-27 16:16, robertot5 wrote:
>
> I managed to boot with a rescue cd and I see only some files and
> directories are missing from my root fs, can I somehow repair them with
> the original OpenSUSE disc ? I need to keep my user and files\settings.
Try upgrade with the DVD from same version to same version.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
It doesn’t work !
When I reach the page in wich I have to select the partition to update, no partition is listed. I check the Show All Partitions box, then select the damaged root partition and it returns error that no system found, no fstab found.
What next ?
Do an install instead. Be sure to choose to NOT format (carefully inspect
any text colored red in the partitioning area) and you should probably be
fine, other than needing to reinstall things that did not come with openSUSE.
Good luck.
And, for the record, whenever you’re root and using the ‘rm’ command, do this:
First, ls what you’re going to delete:
Code:
ls /path/to/deleted/things
Next, once you run the command and KNOW that you’re going to do things you
find acceptable (nuke USB, not the root filesystem), press the up-arrow
(do not retype) and then modify by adding a space, then rm and whatever
parameters. When you press enter you have this, leading-space included:
Code:
rm -f /path/to/deleted/things
Why the leading space? Because then the ‘rm’ command, unlike the ‘ls’
command, will not be in your history. This means you will not
accidentally type it again when you have something important in that
space. This is a little bit of work each time you’re root doing powerful
things, but it’s pretty failsafe as long as you follow the steps and never
touch the slash key other than when using that first ‘ls’ command.
Good luck.
I booted into Rescue mode and I am copying my home folder to an external hdd right now !
Will reinstall OpenSUSE 12.2 and then copy the files back !
Can I use a my rescued home/user folder for the fresh reinstalled OS ? Like restoring the user ?
Unless you have rm aliased to something else nothing should happen. / contains only directories which are not removed by this command. Of course if you created some files in / they will be lost, but there is no file that operating system depend upon and requires.
On 2013-09-27 17:36, robertot5 wrote:
>
> I booted into Rescue mode and I am copying my home folder to an external
> hdd right now !
>
> Will reinstall OpenSUSE 12.2 and then copy the files back !
>
> Can I use a my rescued home/user folder for the fresh reinstalled OS ?
> Like restoring the user ?
Just tell it to use the existing /home folder and do not reformat.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)