Code Monkey home page Code Monkey logo

rpi-image's Introduction

rpi-image

urls

List available Raspberry Pi OS image file URLs:

./rpi-image urls

list

List image partitions:

sudo ./rpi-image list -i test.img

expand

Expand last partition size by 128M:

sudo ./rpi-image expand -i test.img -s +128M

Set last partition size to 2G (must be bigger than the current size):

sudo ./rpi-image expand -i test.img -s 2G

append

Append new 128M partition:

sudo ./rpi-image append -i test.img -s 128M

Append new 1G partition, setup ext4 filesystem, use data as volume label:

sudo ./rpi-image append -i test.img -s 1G -fs ext4 -l data

delete

Delete last partition:

sudo ./rpi-image delete -i test.img

run

Run interactive shell inside the image:

sudo ./rpi-image run -i test.img

Run interactive shell as logged in pi user inside the image:

sudo ./rpi-image run -i test.img -u pi

Run /bin/ls inside the image:

sudo ./rpi-image run -i test.img /bin/ls

Run command inside the image as logged in pi user:

sudo ./rpi-image run -i test.img -u pi pwd
sudo ./rpi-image run -i test.img -u pi -- ls -la

Run shell script inside the image:

cat script.sh | sudo ./rpi-image run -i test.img -- /bin/bash

Run shell script with arguments inside the image:

cat script.sh | sudo ./rpi-image run -i test.img -- /bin/bash -s - arg1 arg2

Run shell script with arguments inside the image by mounting shell script file:

sudo ./rpi-image run -i test.img --bind-ro script.sh:/script.sh -- /script.sh arg1 arg2 arg3

Enable ssh:

sudo ./rpi-image run -i test.img touch /boot/ssh

Print OS info:

sudo ./rpi-image run --read-only -i test.img cat /etc/os-release

rpi-image's People

Contributors

dmitriykovalev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.