> For the complete documentation index, see [llms.txt](https://campus-rover.gitbook.io/lab-notebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://campus-rover.gitbook.io/lab-notebook/fiiva/infrastructure/copying-robot-sd-cards.md).

# copying-robot-sd-cards.md

Often in the lab the need arises to create several robots with identical operating systems and packages, however it is incredibly time consuming to flash the base operating system to a new sd card and download all the required packages to each new robot.

This guide will explain how to create identical boot sd cards from one working operating system in order to scale the ever-growing fleet of terminator robots this lab hopes to one day create, so let's get started.

## Shrink the existing SD card partition

Say you have a working operating system on a robot with an SD card of 128GB, but most of the space on that SD card is unused. If you created an OS image from this SD card it too would be 128GB which is large and time consuming to flash, not to mention it won't fit on smaller SD cards. You'll first need to shrink your existing card to the minimum size to fit the operating system.

Plug the SD card into your linux computer and boot up the program GParted. Select the SD card from the menu in the top left. You'll want to unmount both of the partitions displayed by right clicking on them in the list menu, and you'll then see they key icon next to their names disappear.

You're going to resize the larger of the two partitions by selecting it from the list menu pressing the resize button in the top menu. Resize the partition to be slightly larger than the amount of used space. In my case here, I'm resizing the partion to be 13000MB with 12612MB used.

Then you're going to apply the resizing operation by clicking the green checkmark on the top menu bar, it should take a little bit of time to complete.

Now you are ready to create your image file. Open your terminal and type the command `sudo fdisk -l`. It should display a list of storage partitions, so find the partition in the list

Now


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://campus-rover.gitbook.io/lab-notebook/fiiva/infrastructure/copying-robot-sd-cards.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
