Accidentally did rm -r /*

    • OMV 2.x
    • 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.

      The post was edited 4 times, last by shant1993 ().

    • shant1993 wrote:

      i turned off my nas as fast as i could,
      That could be bad. Why not just hit ctrl-c?


      shant1993 wrote:


      im hoping my partitions are intact
      It doesn't delete partitions. Just data on them if it got to the /media folder.

      shant1993 wrote:

      "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.

      shant1993 wrote:

      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 5.1.2 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.1.7
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      That could be bad. Why not just hit ctrl-c?
      I paniced :(


      ryecoaaron wrote:

      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


      ryecoaaron wrote:

      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)
    • shant1993 wrote:

      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 5.1.2 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.1.7
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      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!
    • shant1993 wrote:

      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.

      shant1993 wrote:

      can i just go ahead and install omv3 and rebuild there?
      Raid is the same on OMV 2 and 3.

      shant1993 wrote:

      does this mean i have to reinstall omv3 once it releases?
      Nope. OMV is just a package and that package updates often.



      shant1993 wrote:

      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 5.1.2 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.1.7
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      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.