Giter VIP home page Giter VIP logo

bootcc's Introduction

BootCC

This is an automation I wrote to help me load up fresh versions of Ubuntu-server on RPi 4, without requiring ethernet or a monitor, so I could atomically test builds of octoprint/octoprint docker image. I may expand this some day to a GUI tool, but for now, it's scripted enough to work every time and you just have to "fill in the blanks" so to speak, of your own network details and desired hostname.

Steps to follow are below.

Steps

  1. insert usb disk
  2. download ubuntu image
  3. get disk device map designation using lsblk -a -d -e7
  4. example device is /dev/sde
  5. uncompress and pipe ubuntu compressed disk image to dd to "restore" it to usb disk
  6. xzcat ubuntu.img.xz | sudo dd status=progress of=/dev/sde bs=4M conv=sync,noerror
  7. mount the disk sudo mount /dev/sde /media/${USER}
  8. Edit the network config in writable/etc/wpa_supplicant/wpa_supplicant.conf
  9. Edit desired details in cloud-config/user-data
  10. sudo ./write-boot-configs /media/$USER
  11. Turn on pi, wait ~5 minutes for boot
  12. login using ssh ubuntu@<static_ip_address (declared below in netplan example)> with password ubuntu
  13. Follow prompts to change password immediately, will disconnect after password is updated
  14. log back in using ssh ubuntu@<static_ip_address> with the new password, and voila!

Following example taken directly from netplan.io/examples#conecting-to-a-wpa-personal-wireless-network

Edit the system-boot/network-config file as follows:

... # existing config
  wifis:
    wlan0:
      optional: true
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.21/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [192.168.0.1, 8.8.8.8]
      access-points:
        "network_ssid_name":
          password: "**********"

example etc/wpa_supplicant/wpa_supplicant.conf

network={
    ssid="ssidname"
    psk="password"
}

Links

https://wiki.ubuntu.com/ARM/RaspberryPi https://www.raspberrypi.org/documentation/configuration/config-txt/README.md https://netplan.io/examples#connecting-to-a-wpa-personal-wireless-network

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.