hello world :-)
Posts: 121
Joined: Sat Nov 14, 2015 7:12 am
Location: England, in an insecure cloud, ie. The Interwebs
Contact: Website Yahoo Messenger AOL

Fun things to do before reinstalling Raspbian?

Mon Jun 20, 2016 12:32 pm

Just kinda-sort-of-wrecked my Raspbian installation. It works fine, I just accidentally uninstalled (looking at you, retropie uninstaller) a lot of nonessential-to-the-system-but-essential-to-my-installed-applications dependencies/libraries. So basically I now have a post-apocalyptic Raspbian. Having backed up everything of importance, I was wondering if there's anything interesting to do before reinstalling? (Also, I needed to reinstall soon anyway, so no need to fix my current install. There's a lot of junk on it right now, and I want a clean slate.)
I look forward to your ideas, but please nothing that can harm other computers on the same network. Thanks.
I feel evil! :twisted:
Sorry if this is the wrong forum, mods feel free to move this to the right one if needed.
Last edited by hello world :-) on Mon Jun 20, 2016 12:38 pm, edited 1 time in total.
I do moral support. Here: https://www.raspberrypi.org/forums/search.php?search_id=egosearch
I know I use too many parentheses. Problem?
Topics I have posted in: http://bit.ly/1NbDdr5
My topics: http://bit.ly/1ObnKqQ
All my posts: http://bit.ly/1OHzje7

User avatar
DougieLawson
Posts: 40241
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Fun things to do before reinstalling Raspbian?

Mon Jun 20, 2016 12:37 pm

Boot it. Login as pi. Get a root shell with sudo -i;cd /;rm -rf *

Set a stopwatch running and see how long it runs before trashing the filesystem brings it crashing down in a massive heap of loose and untidy 1s & Os.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

hello world :-)
Posts: 121
Joined: Sat Nov 14, 2015 7:12 am
Location: England, in an insecure cloud, ie. The Interwebs
Contact: Website Yahoo Messenger AOL

Re: Fun things to do before reinstalling Raspbian?

Mon Jun 20, 2016 12:42 pm

DougieLawson wrote:Boot it. Login as pi. Get a root shell with sudo -i;cd /;rn -rf *

Set a stopwatch running and see how long it runs before trashing the filesystem brings it crashing down in a massive heap of loose and untidy 1s & Os.
EDIT: You probably meant rm -rf not rn -rf :geek:
Thank ye kindly. I'll just wait to see if anything else comes along before trying that, since if I do it I can't do anything after it.


I know that also deletes NOOBS >-D everyone knows I use NOOBS and I don't like using my laptop, eg. to put NOOBS back on the SD card.
I do moral support. Here: https://www.raspberrypi.org/forums/search.php?search_id=egosearch
I know I use too many parentheses. Problem?
Topics I have posted in: http://bit.ly/1NbDdr5
My topics: http://bit.ly/1ObnKqQ
All my posts: http://bit.ly/1OHzje7

User avatar
DougieLawson
Posts: 40241
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Fun things to do before reinstalling Raspbian?

Mon Jun 20, 2016 1:29 pm

Sorry that was a phone and eyesight error.

It's what comes of being stuck in A&E while my son gets stitched up.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Forris
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 319
Joined: Fri Jan 06, 2012 7:46 pm

Re: Fun things to do before reinstalling Raspbian?

Mon Jun 20, 2016 1:35 pm

DougieLawson wrote:Sorry that was a phone and eyesight error.

It's what comes of being stuck in A&E while my son gets stitched up.
I hope he was doing something stupid and cool at the time 8-) Also, hope he's OK.

User avatar
DougieLawson
Posts: 40241
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Fun things to do before reinstalling Raspbian?

Mon Jun 20, 2016 1:39 pm

Just cycling home after his exam and the front wheel lost all grip on a grass vs path interface.

Perfectly OK, apart from the desperate boredom.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

hello world :-)
Posts: 121
Joined: Sat Nov 14, 2015 7:12 am
Location: England, in an insecure cloud, ie. The Interwebs
Contact: Website Yahoo Messenger AOL

Re: Fun things to do before reinstalling Raspbian?

Mon Jun 20, 2016 2:11 pm

DougieLawson wrote:Just cycling home after his exam and the front wheel lost all grip on a grass vs path interface.

Perfectly OK, apart from the desperate boredom.
Phew, glad he's OK. Give him my best wishes (if you want to) :-)
I do moral support. Here: https://www.raspberrypi.org/forums/search.php?search_id=egosearch
I know I use too many parentheses. Problem?
Topics I have posted in: http://bit.ly/1NbDdr5
My topics: http://bit.ly/1ObnKqQ
All my posts: http://bit.ly/1OHzje7

User avatar
DougieLawson
Posts: 40241
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Fun things to do before reinstalling Raspbian?

Mon Jun 20, 2016 4:45 pm

Eight stitches and an appointment at the practice nurse next Tuesday.
He's going to post the photos on Reddit /r/gore (and on imgur) to get some karma.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

User avatar
jahboater
Posts: 6301
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Fun things to do before reinstalling Raspbian?

Mon Jun 20, 2016 5:23 pm

sudo cp /bin/bash /dev/mem
Pi4 8GB running PIOS64 Lite

User avatar
HawaiianPi
Posts: 6004
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 5:22 am

DougieLawson wrote:Boot it. Login as pi. Get a root shell with sudo -i;cd /;rm -rf *

Set a stopwatch running and see how long it runs before trashing the filesystem brings it crashing down in a massive heap of loose and untidy 1s & Os.
Nice, but what do you think would crash faster, your command, or: sudo dd if=/dev/zero of=/dev/mmcblk0 bs=512

Why bs=512? Because we don't want to kill it too quickly, just one... sector... at... a... time...

Oh, wait, no! This one instead: sudo dd if=/dev/random of=/dev/mmcblk0 bs=512

:twisted:
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
DougieLawson
Posts: 40241
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 7:13 am

You're going to need lots of mouse wiggling because /dev/random will block when it runs out of entropy.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

User avatar
RaTTuS
Posts: 10614
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 7:21 am

the rm -fr / will complete - as the system will not need to read from the disk to complete - the command rm is run and in memory and cache
similarly dd will also complete
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
AikonCWD
Posts: 180
Joined: Mon Jun 09, 2014 3:50 pm
Location: Barcelona

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 7:27 am

NAT your SSH port to your PI, passwd your root to blank password. Post your public IP to this forum and wait 24h, then post your results here :)
My e-mail = aikon.bcn@gmail.com

hello world :-)
Posts: 121
Joined: Sat Nov 14, 2015 7:12 am
Location: England, in an insecure cloud, ie. The Interwebs
Contact: Website Yahoo Messenger AOL

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 7:55 am

AikonCWD wrote:NAT your SSH port to your PI, passwd your root to blank password. Post your public IP to this forum and wait 24h, then post your results here :)
hello world :-) wrote:but please nothing that can harm other computers on the same network. Thanks.
Sorry.
However, I've come up with a plan:

Code: Select all

rm -rf /tmp/ /run/ /dev/ /etc/ /opt/ /lincity-ng/ /alephone/ /root/ /var/ /lib/ /usr/ /sbin/ /bin/ /home/ /lost+found/ /srv/ /sys/ /proc/
Hopefully that won't delete NOOBS as well, since right now my laptop is out of service (again!) which means the only way I can reinstall is via NOOBS. I've excluded /media /mnt and /boot - hopefully because of that it won't delete NOOBS, but if it would please tell me at once. /media because /media/pi/SETTINGS - /boot because NOOBS - /mnt because it sounds important/not-part-of-Raspbian.
By the way, isn't rm -rf / not supposed to work anymore? I think I saw a long thread about it on this forum somewhere...
I do moral support. Here: https://www.raspberrypi.org/forums/search.php?search_id=egosearch
I know I use too many parentheses. Problem?
Topics I have posted in: http://bit.ly/1NbDdr5
My topics: http://bit.ly/1ObnKqQ
All my posts: http://bit.ly/1OHzje7

User avatar
HawaiianPi
Posts: 6004
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 8:20 am

AikonCWD wrote:NAT your SSH port to your PI, passwd your root to blank password. Post your public IP to this forum and wait 24h, then post your results here :)
I was about to say that is genius, but then I thought about all the sick, twisted people out here in the interwebs, and all the ways that could get the OP in trouble (all kinds of illegal stuff popped into my head). Too bad, though, in a different world that could have been fun.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
HawaiianPi
Posts: 6004
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 8:28 am

hello world :-) wrote:...Hopefully that won't delete NOOBS as well, since right now my laptop is out of service (again!) which means the only way I can reinstall is via NOOBS...
Deffinitely don't run the command I posted then. :shock:

What's wrong with your laptop?
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
AikonCWD
Posts: 180
Joined: Mon Jun 09, 2014 3:50 pm
Location: Barcelona

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 9:48 am

HawaiianPi wrote:
AikonCWD wrote:NAT your SSH port to your PI, passwd your root to blank password. Post your public IP to this forum and wait 24h, then post your results here :)
I was about to say that is genius, but then I thought about all the sick, twisted people out here in the interwebs, and all the ways that could get the OP in trouble (all kinds of illegal stuff popped into my head). Too bad, though, in a different world that could have been fun.
Yeah, if he do that his Pi will end full with midget-porn and stuff like that, haha.
My e-mail = aikon.bcn@gmail.com

User avatar
Burngate
Posts: 6373
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 9:55 am

DougieLawson wrote:Eight stitches and an appointment at the practice nurse ...
... practising how to fall off without hurting himself? or practice stiching himself?

User avatar
DougieLawson
Posts: 40241
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Fun things to do before reinstalling Raspbian?

Tue Jun 21, 2016 4:37 pm

Burngate wrote:
DougieLawson wrote:Eight stitches and an appointment at the practice nurse ...
... practising how to fall off without hurting himself? or practice stiching himself?
I did ask for a curved scalpel blade so we could "unstitch" him without a visit to the practice.

He says he did a judo roll off the bike on the way to cutting the big gash in his arm. (Photos have been tweeted.)
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

hello world :-)
Posts: 121
Joined: Sat Nov 14, 2015 7:12 am
Location: England, in an insecure cloud, ie. The Interwebs
Contact: Website Yahoo Messenger AOL

Re: Fun things to do before reinstalling Raspbian?

Wed Jun 22, 2016 6:45 am

HawaiianPi wrote:
hello world :-) wrote:...Hopefully that won't delete NOOBS as well, since right now my laptop is out of service (again!) which means the only way I can reinstall is via NOOBS...
Deffinitely don't run the command I posted then. :shock:

What's wrong with your laptop?
TL;DR: Microsoft and their system recovery tools broke it
**no I'm not getting Linux on it. I need Windows for a few programs, and I don't want to risk breaking it again. Anyway, I get my Linux fix from my Pi, and my friend who's forced to use Ubuntu with faulty display drivers (AMD-based laptop!)**
Long story, hard drive ended up wiped. Fortunately I have a whatever happens support kind of thing (don't know if I'm allowed to post the name here) so I sent it to repairs, and they returned it working, in an as-new state (Windows 8.0). Made a system image, installed an anti-virus (Avira Free for the curious), did all the Windows Updates and upgraded to Windows 8.1. System image, updates, upgrade to Windows 10. Right now it's waiting for me to make three more system images (if you think you need one, you need two. If you think you need two, you need three), also the reason it ended up wiped was because a system image failed, so I'm very wary of them now. The reason I can't make the system images now is because I don't dare to let my laptop on the network (we have a guest visiting with their suspiciously slow laptop with Norton Security and uTorrent + no adblocker, 'nuff said).

Long story made as short as possible (I like telling stories :) ):
Had Windows 10. Played Minecraft PC for way too long, and went wayy too far in a world. It crashed, and ever since then it was slower and crashed more often. I decided to System Restore to before it happened. System restore failed, and Windows wouldn't boot (Something happened !). Fortunately I had only recently upgraded to Win10 and had a valid Win8.1 system image. Restored from it, and upgraded to Win10 again. Made a new Win10 system image as soon as possible. Phew, glad that's over...
But...
A few days later, my brother made something really weird happen after he pressed about half the keyboard at once. I was very tired, panicked, and decided to restore from the Win10 system image I'd made. Somehow, it went wrong (I think it was corrupted) AFTER formatting the hard drive and partially restoring drive C:. Tried to restore from the Win8.1 image, failed after formatting the hard drive because I only had a Win10 recovery drive. Time to send it to repairs.

(my laptop is a HP Pavilion 15-n096sa notebook, but somehow the CPU is 2.30GHz instead of 1.60GHz, and it's Quad-Core (4 Virtual cores, 2 physical) instead of Dual Core. I think it's because I got it refurbished and the previous owner overclocked it or something like that.)
Last edited by hello world :-) on Sun Jun 26, 2016 5:12 pm, edited 2 times in total.
I do moral support. Here: https://www.raspberrypi.org/forums/search.php?search_id=egosearch
I know I use too many parentheses. Problem?
Topics I have posted in: http://bit.ly/1NbDdr5
My topics: http://bit.ly/1ObnKqQ
All my posts: http://bit.ly/1OHzje7

User avatar
HawaiianPi
Posts: 6004
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Fun things to do before reinstalling Raspbian?

Fri Jun 24, 2016 2:46 am

Wow, that was quite the ordeal with your laptop. Hope things are working well now.

What do you use for imaging your system? Sounds like you need something new anyway (TWO restore failures!). I've been using Clonezilla for years and it's worked well for me.

My laptop (Yoga 2 Pro convertible ultrabook) boots Windows 10, Linux Mint 17.3 and Parted Magic. It started out with Windows 8.1, which I upgraded to the "Insider" preview of Win10, and it was pretty terrible. Restored from my Clonezilla image without incident and was back to Windows 8.1 (with Classic Shell for a real start menu). When the W10 tech-preview went public I gave it another try. Still no good, so yet another Clonezilla restore, and I was back where I started.

Then Win10 got officially released, so another backup, upgrade, test, and ultimately restore cycle followed. Kept hearing such good things about Windows 10, but it just didn't seem to like my little ultrabook. Fast forward to the build 1511 release, and I planned on another backup, upgrade, test and likely restore cycle, but wait, Windows 10 build 1511 actually worked well. I tested it for a few weeks, then decided on a clean install. So after a full Clonezilla image backup, I wiped the drive and started the clean install from the USB boot installation drive I made, and it proceeded without incident.

Been on that same clean install of Win10 for quite a long while now, and while I'm not a fan of the look of the UI (it's ugly) I must say it runs really well. It's been optimized for the newer hardware and has made my Haswell based Y2Pro feel like a new computer. Of course, it's still Windows, with all it's window-ish annoyances, so I did end up putting Linux back on there, but I do find myself spending more time in the Windows environment than I used to.

So the drama with my laptop has been negligible, and Clonezilla is a large part of the reason why.

It's basically a minimal Linux live distribution with Clonezilla and associated tools. When you want to make a full system backup, you shut down, boot off of the live media, and backup to an external drive or network share. It's never failed me, to the point that I now turn off backup verification to save time.

http://clonezilla.org/
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

hello world :-)
Posts: 121
Joined: Sat Nov 14, 2015 7:12 am
Location: England, in an insecure cloud, ie. The Interwebs
Contact: Website Yahoo Messenger AOL

Re: Fun things to do before reinstalling Raspbian?

Sun Jun 26, 2016 5:01 pm

HawaiianPi wrote:Wow, that was quite the ordeal with your laptop. Hope things are working well now.

What do you use for imaging your system? Sounds like you need something new anyway (TWO restore failures!). I've been using Clonezilla for years and it's worked well for me.

My laptop (Yoga 2 Pro convertible ultrabook) boots Windows 10, Linux Mint 17.3 and Parted Magic. It started out with Windows 8.1, which I upgraded to the "Insider" preview of Win10, and it was pretty terrible. Restored from my Clonezilla image without incident and was back to Windows 8.1 (with Classic Shell for a real start menu). When the W10 tech-preview went public I gave it another try. Still no good, so yet another Clonezilla restore, and I was back where I started.

Then Win10 got officially released, so another backup, upgrade, test, and ultimately restore cycle followed. Kept hearing such good things about Windows 10, but it just didn't seem to like my little ultrabook. Fast forward to the build 1511 release, and I planned on another backup, upgrade, test and likely restore cycle, but wait, Windows 10 build 1511 actually worked well. I tested it for a few weeks, then decided on a clean install. So after a full Clonezilla image backup, I wiped the drive and started the clean install from the USB boot installation drive I made, and it proceeded without incident.

Been on that same clean install of Win10 for quite a long while now, and while I'm not a fan of the look of the UI (it's ugly) I must say it runs really well. It's been optimized for the newer hardware and has made my Haswell based Y2Pro feel like a new computer. Of course, it's still Windows, with all it's window-ish annoyances, so I did end up putting Linux back on there, but I do find myself spending more time in the Windows environment than I used to.

So the drama with my laptop has been negligible, and Clonezilla is a large part of the reason why.

It's basically a minimal Linux live distribution with Clonezilla and associated tools. When you want to make a full system backup, you shut down, boot off of the live media, and backup to an external drive or network share. It's never failed me, to the point that I now turn off backup verification to save time.

http://clonezilla.org/
I've been using Windows Backup and Restore (Windows System Image), but yes, after that I have planned to also make a backup with another tool just in case. Thanks for the link, will check it out!
I do moral support. Here: https://www.raspberrypi.org/forums/search.php?search_id=egosearch
I know I use too many parentheses. Problem?
Topics I have posted in: http://bit.ly/1NbDdr5
My topics: http://bit.ly/1ObnKqQ
All my posts: http://bit.ly/1OHzje7

Return to “General discussion”