petecal
Posts: 22
Joined: Fri Feb 15, 2019 10:19 pm
Location: Nashville TN
Contact: Website

How Can I Build a Clean SD Card?

Mon Dec 02, 2019 9:21 pm

I have been building a new project on my RPi for almost 9 months. It is my first RPi project. I think it is "ready for prime time". My problem is, the existing SD card is full of trash. During my attempts to understand and use the RPi I know I did many stupid things installing, uninstalling, etc. I don't know what programs and utilities I actually need. I would like to make what I created open source so I need to know what is actually needed. And only what is actually needed.

I'm thinking I start with NOOBS, OpenHABian, mosquitto, and rtl_sdr, all of which I know I need. I also have a C program I wrote...my first C program ... that I need. My OpenHAB setup also has many items, rules, sitemaps, etc that I created. Many of which I no longer need. But I don't know which I need and which I don't.

Something tells me the ideal way to do this is running 2 RPis. One with the existing SD card and a new one starting with the bare bones installations. Then run the new one, see what fails, go to the existing one and find what I need. But I have only one RPi. Is there a way I can use my windows desktop to access the existing SD plugged into the desktop? Just to see what is on it and copy what is needed to the RPi. Or plug the existing SD card into a spare USB slot on the RPi?

Or are these all really dumb ideas and there is a simpler way?

Thanks,
Pete
I'm not going to live long enough to do all I want to do.

wolf.z
Posts: 131
Joined: Thu Dec 24, 2015 8:34 pm

Re: How Can I Build a Clean SD Card?

Tue Dec 03, 2019 12:53 am

I never heard of OpenHABian before. However, https://www.openhab.org/docs/installati ... card-image provides a ready made HAB OS image for the Pi. So why should you start with noobs? OpenHABian is based on Raspbian lite, providing a most minimal starting point from a trash point of view. If you'd fail, start with a not modified Raspbian lite.

"...windows desktop to access the existing SD plugged into the desktop?..." Second best idea, since you'll need a linux file system for windows like explore2fs.
"...Or plug the existing SD card into a spare USB slot on the RPi?..." provided, you'll put a USB SDcard reader in between.
"...Something tells me the ideal way to do this is running 2 RPis..." agreed. At least in case, you were stuck in finding dependencies, you might reverse verify whether the config you are trying to replicate on the fresh system you are configuring is the config under request. By simply altering the config on the running first system.

petecal
Posts: 22
Joined: Fri Feb 15, 2019 10:19 pm
Location: Nashville TN
Contact: Website

Re: How Can I Build a Clean SD Card?

Mon Dec 09, 2019 8:54 pm

Sorry for the delayed response. I had to make an unplanned trip out of town.

I think I will start with the OpenHABian card image. But first I will experiment with the existing SD in a USB SD reader. If I can explore the USB-SD like a second disk drive that should give me access to all the files I need to drag over to the new build.

I may be back with more questions but I hope not.

Thanks,
Pete
I'm not going to live long enough to do all I want to do.

User avatar
neilgl
Posts: 1378
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: How Can I Build a Clean SD Card?

Mon Dec 09, 2019 10:08 pm

I would go with a standard Raspbian install and then install openhab2, rather than start with OpenHABian.
You can backup and restore your openhab2 configuration if you want.

Return to “Beginners”