Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the future we will try to build a custom MicroMEC image which will minimize the provisioning efforts.

We use the latest openSUSE Tumbleweed [ JeOS (Just enough Operating System) image] (https://download.opensuse.org/ports/aarch64/tumbleweed/images) for the RPI 3B+.

Stage 4 mount and switch to rootfs

...

  1. Discover the iscsi target

    $ sudo iscsiadm --mode discovery --op update --type sendtargets --portal bootserv 
    192.168.4.1:3260,1 iqn.org.micromec:rpi3-1-opensuse-rootfs

  2. Login to the iscsi target

    $ sudo iscsiadm -m node --targetname iqn.org.micromec:rpi3-1-opensuse-rootfs -p bootserv -l 
    Logging in to [iface: default, target: iqn.org.micromec:rpi3-1-opensuse-rootfs, portal: 192.168.4.1,3260]
    Login to [iface: default, target: iqn.org.micromec:rpi3-1-opensuse-rootfs, portal: 192.168.4.1,3260] successful.

  3. Check the available partitions

    $ cat /proc/partitions 
    major minor #blocks name ..... 8 16 4096000 sdb

  4. Determine the UUID

    $ sudo blkid /dev/sdb 
    /dev/sdc: UUID="7bf4dc05-cd4a-46af-9689-4a03209d5ed2" BLOCK_SIZE="4096" TYPE="ext4"


Details on possible cmdline entries can be found here:

http://man7.org/linux/man-pages/man7/dracut.cmdline.7.html

...

Detailed information on how to enable netboot for an RPi 3B+:

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net.md

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net_tutorial.md

https://metebalci.com/blog/bare-metal-rpi3-network-boot/

...

Follow https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md or

https://kiljan.org/2019/11/16/arch-linux-arm-network-boot-on-raspberry-pi-4/ or

https://hackaday.com/2019/11/11/network-booting-the-pi-4/ for the firmware update.

...

For the preparation of the rootfs on the netboot server please refer to:

The RPi 4B rootfs over iscsi howto document explains how to mount the Raspbian Buster lite image. Once the image is mounted we can find the files in the boot subdirectory.

Once the files are copied, we can adjust the cmdline.txt file to somthing something like this

$ cat cmdline.txt 
dwc_otg.lpm_enable=0 console=serial0,115200 loglevel=7 modules=iscsi_tcp ip=dhcp netroot=iscsi:192.168.4.1::::iqn.org.micromec:rpi4-1-raspbian-rootfs rd.iscsi.login_retry_max=10 root=UUID=8236bee6-9c37-4b04-8092-2630fd2b0596 rootfstype=ext4 rw rootwait

Note

The UUID of the root device can be determined by login into the iscsi target on your workstation first as described in the Remote Testing section of the RPi 4B rootfs over iscsi document.

...

  1. Discover the iscsi target

    $ sudo iscsiadm --mode discovery --op update --type sendtargets --portal bootserv 
    192.168.4.1:3260,1 iqn.org.micromec:rpi3-1-opensuse-rootfs
    192.168.4.1:3260,1 iqn.org.micromec:rpi4-1-opensuse-rootfs
    192.168.4.1:3260,1 iqn.org.micromec:rpi4-1-raspbian-rootfs

  2. Login to the iscsi target

    $ sudo iscsiadm -m node --targetname iqn.org.micromec:rpi4-1-raspbian-rootfs -p bootserv -l 
    Logging in to [iface: default, target: iqn.org.micromec:rpi4-1-raspbian-rootfs, portal: 192.168.4.1,3260]
    Login to [iface: default, target: iqn.org.micromec:rpi4-1-raspbian-rootfs, portal: 192.168.4.1,3260] successful.

  3. Check the available partitions

    $ cat /proc/partitions 
    major minor #blocks name ..... 8 16 4096000 sdc

  4. Determine the UUID

    $ sudo blkid /dev/sdc /dev/sdc: UUID="8236bee6-9c37-4b04-8092-2630fd2b0596" BLOCK_SIZE="4096" TYPE="ext4"