Giter Club home page Giter Club logo

raspberrypi-kernel-iscsi-initrd's Introduction

This contains the initrd binaries needed to boot a rpi from iSCSI.

This is used by rgl/pxe-raspberrypi-vagrant because updating the initrd when running in packer-builder-arm-image does not work.

Build

To build the binaries execute the following command in your Raspberry Pi 4:

wget -O- https://github.com/rgl/raspberrypi-kernel-iscsi-initrd/raw/master/build.sh | sudo bash

Raspberry Pi configuration

Configure your rpi boot partition to load initrd and configure the iSCSI boot, e.g.:

# add support for mounting iscsi targets.
apt-get install -y --no-install-recommends open-iscsi
sed -i -E 's,#(INITRD)=.+,\1=Yes,g' /etc/default/raspberrypi-kernel
# install the initrd binaries needed for mounting an iscsi target.
# NB this is needed because dpkg-reconfigure raspberrypi-kernel does not
#    work under packer-builder-arm-image.
tar xf raspberrypi-kernel-iscsi-initrd.tgz -C /boot

# go to your rpi boot partition.
cd /boot

# configure the rpi bootloader to load initrd.
# see https://www.raspberrypi.org/documentation/configuration/config-txt/README.md
# see https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md
echo "initramfs $(ls initrd.img-*-v7l+) followkernel" >>config.txt

# configure rpi kernel command line to mount the root fs from our iscsi export.
# see "Root on iSCSI" at /usr/share/doc/open-iscsi/README.Debian.gz
(cat | tr '\n' ' ') >cmdline.txt <<EOF
root=UUID=$(blkid --probe --match-tag UUID --output value /srv/iscsi/$name.img)
iscsi_initiator=iqn.2020-01.test:$name
iscsi_target_name=iqn.2020-01.test.gateway:$name.root
iscsi_target_ip=10.10.10.2
iscsi_target_port=3260
rw
rootwait
elevator=deadline
ip=dhcp
console=serial0,115200
console=tty1
EOF

raspberrypi-kernel-iscsi-initrd's People

Contributors

rgl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tommyvdv

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.