Comments (2)
This is also currently a headache of mine -- patching Ubuntu images that Libre Computer is publishing with btrfs supported. I would love to see btrfs resizing supported by the project in the future!
Currently, the way I've found around this, is by making sure your json gets rid of the "target_image_size", and then resize your source image prior to running packer.
truncate --size=+1400M ./original.img
sudo losetup --show -f -P ./original.img
# '/dev/loop3'
sudo parted /dev/loop3
# 'print'
# Disk /dev/loop3: 7213MB
# part 2 end 2809MB size 2540MB
#
# ((take the disk size '7213' above, then resize the partition to take the full space))
# 'resizepart 2'
# End? [2809MB]?
# '7213MB'
#
# 'print'
# Disk /dev/loop3: 7213MB
# part 2 end 7213MB size 6944MB
#
# 'quit'
sudo mkdir -p /btrfs
sudo mount /dev/loop3p2 /btrfs
sudo btrfs filesystem resize max /btrfs
sudo btrfs filesystem show
sudo btrfs check --force /dev/loop3p2
sudo umount /btrfs
sudo losetup -d /dev/loop3
shasum -a 256 ./original.img
And then take your "new" original.img with your new shasum and run packer against that. Good luck!
from packer-plugin-arm-image.
@jonathanmarchuot, thanks for sharing your workaround!
Does your root
partition come with btrfs
as default?
For the Raspberry Pi Bookworm, I manually convert the factory image's root
partion from ext4
to btrfs
. I haven't found an automated way to do that conversion via Vagrant and Packer.
Are you doing the workaround manually or automated via code?
from packer-plugin-arm-image.
Related Issues (20)
- Error running in gitlab-ci docker in docker: open /proc/sys/fs/binfmt_misc/register: no such file or directory HOT 1
- arm-image: chroot: failed to run command '/bin/sh': Exec format error HOT 2
- Can Please confirm if md5 checksum is validated properly? HOT 5
- Unable to build image using docker, pre-built docker, or vagrant HOT 1
- HCP Packer Support HOT 2
- ARM "native" logic creating invalid images HOT 3
- no partitions defined while using dind (docker in a docker) with gitlab ci runner HOT 2
- Contribute Cloud-Init + Ubuntu 20.04/22.04 Samples to Repository HOT 1
- How to bind mount the chroot directory onto the chroot / HOT 2
- Packer unnecessarily injecting environment variables from host with shell provisioner HOT 4
- Multiple output files release HOT 3
- Error: unrecognized arguments: playbook.yml HOT 1
- Created image is aarch64 instead of armv7l
- Losetup sporadically fails not finding all devices
- losetup --show -f -P images/... error different of partitions than expected 1
- Support for GPT partition
- Shrinking filesystem after provisioning
- Image is resized but last partition is not HOT 1
- packer 1.11.0 breaks arm-image plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packer-plugin-arm-image.