User avatar
ImaginaryTango
Posts: 77
Joined: Fri Jul 16, 2021 6:51 pm

Create an image of my desired setup

Mon Oct 11, 2021 5:23 am

I have a limited bandwidth internet connection and I'm creating multiple installs for my Pis. Since I have some 3B+ and 4 versions, I'll be making multiple copies of some. (Along with some Pi 4 specific images.) After I create an image with the Raspberry Pi Imager, I have to change some configuration settings and do things like 'apt update' and upgrade and so on.

Both because I can't keep using bandwidth to download the same updates over and over and because I'd like to have images that are updated as much as possible and are set up with my configuration.

In the past, to make images or to copy drives, I've used dd, but once I make an image, I don't know what size of a USB drive I'll be installing it on.

Once I get a Pi image to just the way I want it, what is the best way to make an image of just the data (in other words, not empty space on the drive) that I can use to copy to new USB drives? (Also, one feature that's important is the auto-resizing Pi does on the first boot.)

RonR
Posts: 2422
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Create an image of my desired setup

Mon Oct 11, 2021 8:28 am

Image File Utilities will do everything you're looking for.

User avatar
ImaginaryTango
Posts: 77
Joined: Fri Jul 16, 2021 6:51 pm

Re: Create an image of my desired setup

Mon Oct 11, 2021 5:14 pm

RonR wrote:Image File Utilities will do everything you're looking for.
Thank you! (For the help and for the effort it took to write these!)

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

Re: Create an image of my desired setup

Mon Oct 11, 2021 5:25 pm

Might want to take a look at this thread as well. STICKY: Making your own custom burn-n-boot Raspbian image
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
ImaginaryTango
Posts: 77
Joined: Fri Jul 16, 2021 6:51 pm

Re: Create an image of my desired setup

Mon Oct 11, 2021 6:40 pm

HawaiianPi wrote: Might want to take a look at this thread as well. STICKY: Making your own custom burn-n-boot Raspbian image
That's also a good reminder to me to check stickies periodically. When I get to a forum, for my first post in each topic, I check them, but I forget to keep checking them later, when I have different questions.

User avatar
ImaginaryTango
Posts: 77
Joined: Fri Jul 16, 2021 6:51 pm

Re: Create an image of my desired setup

Tue Oct 12, 2021 1:28 am

HawaiianPi wrote:
Mon Oct 11, 2021 5:25 pm
Might want to take a look at this thread as well. STICKY: Making your own custom burn-n-boot Raspbian image
Now that I've looked at that thread and your image utils, I can see how both will be a big help. I had figured you could mount a .img file, but wasn't sure if you could write to it. Nice to know you can! With my bandwidth issues, of course, I'll want to do one big update on a system then recreate the image with the updates. But for smaller things, like configuration files that I change from time to time, mounting and changing the image will be a lot easier to use.

bls
Posts: 1755
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA

Re: Create an image of my desired setup

Tue Oct 12, 2021 2:55 am

ImaginaryTango wrote:
Tue Oct 12, 2021 1:28 am
HawaiianPi wrote:
Mon Oct 11, 2021 5:25 pm
Might want to take a look at this thread as well. STICKY: Making your own custom burn-n-boot Raspbian image
Now that I've looked at that thread and your image utils, I can see how both will be a big help. I had figured you could mount a .img file, but wasn't sure if you could write to it. Nice to know you can! With my bandwidth issues, of course, I'll want to do one big update on a system then recreate the image with the updates. But for smaller things, like configuration files that I change from time to time, mounting and changing the image will be a lot easier to use.
Sounds like you could really benefit from using https://github.com/gitbls/sdm. It will let you do all of that, and a quick install of apt-cacher-ng (also at the mentioned link) can reduce your bandwidth consumption and wait time significantly.
Pi tools:
Quickly and easily build customized-just-for-you SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure strongSwan VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo

User avatar
ImaginaryTango
Posts: 77
Joined: Fri Jul 16, 2021 6:51 pm

Re: Create an image of my desired setup

Tue Oct 12, 2021 3:41 am

bls wrote: Sounds like you could really benefit from using https://github.com/gitbls/sdm. It will let you do all of that, and a quick install of apt-cacher-ng (also at the mentioned link) can reduce your bandwidth consumption and wait time significantly.
I've already started looking through the docs for that to see how I can use it. While I'm doing more than the guy you mentioned who kept notes (my notes are in bash commands so I can run them to do updates), it's still time consuming and, when I'm experimenting and want to start fresh, having the images all updated when I start with them will be a big help.

bls
Posts: 1755
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA

Re: Create an image of my desired setup

Tue Oct 12, 2021 3:58 am

ImaginaryTango wrote:
Tue Oct 12, 2021 3:41 am
bls wrote: Sounds like you could really benefit from using https://github.com/gitbls/sdm. It will let you do all of that, and a quick install of apt-cacher-ng (also at the mentioned link) can reduce your bandwidth consumption and wait time significantly.
I've already started looking through the docs for that to see how I can use it. While I'm doing more than the guy you mentioned who kept notes (my notes are in bash commands so I can run them to do updates), it's still time consuming and, when I'm experimenting and want to start fresh, having the images all updated when I start with them will be a big help.
Excellent. Happy to answer any questions. Enjoy.
Pi tools:
Quickly and easily build customized-just-for-you SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure strongSwan VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo

pipahaha
Posts: 1
Joined: Thu Oct 14, 2021 9:47 am

Re: Create an image of my desired setup

Thu Oct 14, 2021 9:49 am

ImaginaryTango wrote:
Tue Oct 12, 2021 3:41 am
bls wrote: Sounds like you could really benefit from using https://github.com/gitbls/sdmhttps://wordcounter.tools. It will let you do all of that, and a quick install of apt-cacher-ng (also at the mentioned link) can reduce your bandwidth consumption and wait time significantly.
I've already started looking through the docs for that to see how I can use it. While I'm doing more than the guy you mentioned who kept notes (my notes are in bash commands so I can run them to do updates), it's still time consuming and, when I'm experimenting and want to start fresh, having the images all updated when I start with them will be a big help.
this is so amazing and unexpected!

cycool29
Posts: 9
Joined: Wed Jun 30, 2021 11:28 pm

Re: Create an image of my desired setup

Fri Oct 15, 2021 12:55 am

You might interested on Pi Power Tools (https://github.com/Botspot/Pi-Power-Tools) by Botspot, a general purpose Raspbian image & SD card manager.

Return to “Advanced users”