# Resizing the primary partition on the Raspberry Pi

**URL:** <https://forums.suse.com/t/resizing-the-primary-partition-on-the-raspberry-pi/3515>\
**Category:** RancherOS\
**Created:** [July 23, 2016, 3:39am UTC](https://forums.suse.com/t/resizing-the-primary-partition-on-the-raspberry-pi/3515 "2016-07-23T03:39:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![badevguru](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/badevguru/32/1539_2.png) [@badevguru](https://forums.suse.com/u/badevguru)\
**Post date:** [July 23, 2016, 3:39am UTC](https://forums.suse.com/t/resizing-the-primary-partition-on-the-raspberry-pi/3515/1 "2016-07-23T03:39:01Z")

</div>

Does anyone have working steps to get the Raspberry Pi image (0.5.0) to expand to fill rest of the SD card?

[edit: Looks like the issue here: [https://github.com/rancher/os/issues/1084](https://github.com/rancher/os/issues/1084)]

I have tried to use the `sudo ros config set cloud_init.rancher.resize_device dev/mmcblk0p2` as an attempt to set the setting in cloud\_init and then reboot, but to no avail. Not sure based on the documentation if that is the right way or not to “update” the cloud init file.

There is a bug [https://github.com/rancher/os/issues/232](https://github.com/rancher/os/issues/232) that is affecting AMIs. Could the resize\_device be broken in general?

Attempted the manual application of the resize commands, but the resize2fs fails with device busy.

```auto
growpart /dev/mmcblk0 2
part probe
...reboot...
resize2fs /dev/mmcblk0p2

```

Attempted the raspberry method for expanding an partition, same resize2fs issue with device busy.

```auto
sudo fdisk /dev/mmcblk0
... disk commands to delete and recreate partition ...
sudo shutdown -r now
sudo resize2fs /dev/mmcblk0p2

```

---

<div class="post-metadata">

**Author:** ![joshwget](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/joshwget/32/704_2.png) [@joshwget](https://forums.suse.com/u/joshwget)\
**Post date:** [July 25, 2016, 4:31pm UTC](https://forums.suse.com/t/resizing-the-primary-partition-on-the-raspberry-pi/3515/2 "2016-07-25T16:31:17Z")

</div>

The `resize_device` setting doesn’t work for Raspberry Pi, which is why that issue was filed.

I tried to get it working manually but I ran into the same issue as you. Unfortunately, I haven’t had the time to work through it and figure out a workaround yet.

---

<div class="post-metadata">

**Author:** ![alkar](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/alkar/32/1592_2.png) [@alkar](https://forums.suse.com/u/alkar)\
**Post date:** [August 13, 2016, 2:36am UTC](https://forums.suse.com/t/resizing-the-primary-partition-on-the-raspberry-pi/3515/3 "2016-08-13T02:36:28Z")

</div>

Has there been any update on this?  
I’m having the same problem and I’ve exhausted all options really 😕

---

<div class="post-metadata">

**Author:** ![Jose\_Gato\_Luis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jose_gato_luis/32/6587_2.png) [@Jose\_Gato\_Luis](https://forums.suse.com/u/Jose_Gato_Luis)\
**Post date:** [August 16, 2016, 10:42am UTC](https://forums.suse.com/t/resizing-the-primary-partition-on-the-raspberry-pi/3515/4 "2016-08-16T10:42:50Z")

</div>

It seems there are new [official instructions](http://docs.rancher.com/os/running-rancheros/server/raspberry-pi/) So I will try it later. But I can see there are a lot of steps to do it. This seems not very useful, imagine I want to create an infrastructure of 100 raspberry Pi where I want to deploy software automatically.

---

<div class="post-metadata">

**Author:** ![Jose\_Gato\_Luis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jose_gato_luis/32/6587_2.png) [@Jose\_Gato\_Luis](https://forums.suse.com/u/Jose_Gato_Luis)\
**Post date:** [August 24, 2016, 9:24am UTC](https://forums.suse.com/t/resizing-the-primary-partition-on-the-raspberry-pi/3515/5 "2016-08-24T09:24:41Z")

</div>

With new instructions, now we have space to run containers (I have suggested to put step 10 previous to step 8).

Now my intention is to run a rancher-agent, but the problem is (I guess) there is no ARM images of rancher agent ☹

```auto
Status: Downloaded newer image for rancher/agent:v1.0.1
7d6a7c04816b13437bb4cc067cdb9d027b67c0eee731a773015a973bc380e315
docker: Error response from daemon: rpc error: code = 2 desc = "oci runtime error: exec format error".

```

I have seen other threads about this, and a guy called withinboredom trying to create these arm images. Any suggestion about that? Is there an official attempt to support RAncher in Raspberry?
