Author Topic: [SOLVED] Ubermix wipes out all mounted media on boot!  (Read 288 times)

lionel.ta

  • Newbie
  • *
  • Posts: 5
    • View Profile
[SOLVED] Ubermix wipes out all mounted media on boot!
« on: December 27, 2016, 03:28:17 PM »
Yes. On system boot, Ubermix wipes all data in usb keys and external hard drives.
It took me some work to figure out what was happening after I lost data in some usb keys.

The /etc/rc.local script, which is run on boot, contains this dangerous command:
Code: [Select]
rm -rf /media/*Which is run when the connected keys or drives are already mounted...

I was lucky to lose only a few Ubermix and Clonezilla keys, but it could have been all my personal and work data.
It wouldn't surprise me it already happened to other people...

Eveything else in Ubermix is lovely but I really think this needs a fix. Seriously, it's too dangerous.
« Last Edit: May 20, 2017, 03:56:21 AM by lionel.ta »

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 285
    • View Profile
Re: Ubermix wipes out all mounted media on boot!
« Reply #1 on: April 03, 2017, 04:13:56 PM »
Interesting. This shouldn't happen since rc.local should finish before automount, which means the disk shouldn't be there yet. In any event, version 3.22 fixes this, or you can just run

Code: [Select]
sudo apt update && sudo apt dist-upgrade
in generic mode and the ubermix-settings package update will fix it. Alternatively, you can replace the
Code: [Select]
rm -rf /media/*
with

Code: [Select]
for dir in `find /media -maxdepth 2`; do
[ -z "`find $dir -type f`" ] && rm -rf $dir
done

lionel.ta

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Ubermix wipes out all mounted media on boot!
« Reply #2 on: May 20, 2017, 03:55:55 AM »
Thank you. I'll try the upgrade to 3.22 soon.