D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread ]

Re: [LUG] Safe DDing

 

On 27/01/2019 15:28, mr meowski wrote:
On 27/01/2019 10:16, Tom via list wrote:
I've just spent two days rebuilding my laptop after inadvertently dd ing
a microsd image onto the main drive - I think in bash I managed to
accidentally somehow unedit the command and launch it ( I hate touchpads!)

I was wondering if anyone has got an app that can realise this is a
stupid thing to do and stop you?
Pretty much any GUI frontend to DD *won't* let you do this - Etcher for
example. It simply won't display /dev/sdX as a valid target unless you
specifically enable "unsafe" mode to allow overwriting system drives.

Blacklisting command subsets (like "rm -rf /") doesn't really work but
what you can do is alias dd or similarly dangerous commands to "sleep
15; dd" to introduce a forced delay. I used to do this but I use dd a
lot but if I'm honest, I'm not entirely sure that arbitrary delay ever
did anything but slightly annoy me. Would it have been enough for tired
eyes to make one last scan of a rogue dd command and ctrl+c it just
before execution? Who knows?

But two days to rebuild your laptop? You need better backups, not
blacklisted dd commands...

Cheers

I use grsync to some usb drives - unfortunately on of my passions is music stuff and I hadst realised that overtime I have moved a lot of small files about and these achieve a restore rate around kbps and I now have multiple copies while big files run to 40MBs. Also just installing the software I use over a family shared 2Mbs line is nearly a day too.  Even things like making spelling english and not US can be tedious

Tom te tom te tom


--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq