Accidentally did rm -r /*

  • I understand that there is no way back now, i don't even have a good excuse for it...
    Basically i was trying to empty all the files in the hidden folder /.Trash-0, i had to enter the full directory of the path but im not sure how i ended up running rm -r /* inside the .Trash-0 folder without entering the full path.
    i turned off my nas as fast as i could, im hoping my partitions are intact and i only have to reinstall OS, as of now the cli is saying:


    "error: file '/boot/grub/i386-pc/normal.mod not' found
    entering rescue mode...



    anyway...shouldn't linux had given me a warning against this? i remember it had a warning when running this specific command but i got nothing!


    Not sure where to start now ;(


    Edit: did an ubuntu live usb boot, all 3 drives showed up and are accessible but the two set that i have on RAID 0 from within omv interface did not show up, Gparted says they are unallocated.
    edit#2: i remember having a clonezilla backup from 2016 and a more recent backup from within omv itself, i remember one of those tabs having a backup feature, reading the forums on how to restore atm.

    • Offizieller Beitrag

    i turned off my nas as fast as i could,

    That could be bad. Why not just hit ctrl-c?




    im hoping my partitions are intact

    It doesn't delete partitions. Just data on them if it got to the /media folder.


    "error: file '/boot/grub/i386-pc/normal.mod not' found
    entering rescue mode...

    Looks like you deleted /boot. You need to reinstall not try to fix.


    shouldn't linux had given me a warning against this?

    Some distros have an alias to protect against this. When you are working with directories in /, it is best to cd into directory and remove all files. Then change back to / and rmdir the target directory.

    omv 7.0.5-1 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.11 | compose 7.1.3 | k8s 7.1.0-3 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • That could be bad. Why not just hit ctrl-c?

    I paniced :(



    It doesn't delete partitions. Just data on them if it got to the /media folder.

    Hopefully not, all data drives showing up except the two on raid1 and the OS drive



    Some distros have an alias to protect against this. When you are working with directories in /, it is best to cd into directory and remove all files. Then change back to / and rmdir the target directory.

    I see, i will keep this in mind, i hope this is added in Debian 8 (omv3)

    • Offizieller Beitrag

    i hope this is added in Debian 8 (omv3)

    It most likely won't be. The idea of OMV is not use the command line. If you are worried about, you can easily create an alias. This is another reason to have backups.

    omv 7.0.5-1 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.11 | compose 7.1.3 | k8s 7.1.0-3 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • It most likely won't be. The idea of OMV is not use the command line. If you are worried about, you can easily create an alias. This is another reason to have backups.

    As long as i can create one myself, its great!


    i wanted to ask a few questions before i decide what to do.


    1- Since ubuntu didn't detect the RAID0 drives in mirror, does this mean i have to rebuild raid in omv when i reinstall? or is there another issue here?
    2- if the above answer is yes, as in rebuilding them in omv, can i just go ahead and install omv3 and rebuild there? would that cause any issues? or it must be rebuilt in omv2?
    3-i am considering on installing omv3 instead of omv2 since its close to release, does this mean i have to reinstall omv3 once it releases? or is it matter of updating the beta to the stable version?
    3-can i use my omv2 backup files to restore my config in omv3? (i supposed that would be the config.xml?)


    Sorry for the noob questions, Thank you for your time!

    • Offizieller Beitrag

    does this mean i have to rebuild raid in omv when i reinstall? or is there another issue here?

    Hard to say. I would re-install and then see what it finds.


    can i just go ahead and install omv3 and rebuild there?

    Raid is the same on OMV 2 and 3.


    does this mean i have to reinstall omv3 once it releases?

    Nope. OMV is just a package and that package updates often.




    can i use my omv2 backup files to restore my config in omv3?

    Nope. The config from even another OMV 3 box wouldn't work.

    omv 7.0.5-1 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.11 | compose 7.1.3 | k8s 7.1.0-3 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I was able to restore using one of your guides here, i didn't need to repair grub as it booted automatically,
    i can load the web ui now but once i enter my credintials the page crashes, ssh connects but cannot verify credentials & key,i can rdp to the xrdp enviroment though, is there some sort of repair command i could run?
    i did spot my NAS saying "Raid:clean" while booting the os,and i checked the raided drive with the xrdp interface, all files are good! i am glad.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!