Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
FooDeas committed Oct 15, 2017
2 parents fa8c9a8 + 48cbae9 commit 84cbb40
Show file tree
Hide file tree
Showing 7 changed files with 330 additions and 145 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## raspberrypi-ua-netinst v2.0.0

- support for Debian 9 (stretch)
- support boot or/and install from USB mass storage
- added or changed configuration variables:
- `release` is set to "stretch" by default
- ability to disable IPv6
- retry debootstrap 3 times
- increased network configuration timeout to 15 seconds
- increased package download retries to 5

**Bugfixes:**

- visual LED notification on Raspberry Pi Zero (W)
- fix log output chopping
- leave screen always on during installation

## raspberrypi-ua-netinst v1.5.2

- support for Raspberry Pi Zero W
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The installer with the default settings configures eth0 with DHCP to get interne

### Features

- completely unattended, you only need a working internet connection through the ethernet port or use the onboard wireless LAN (supported on model 3B)
- completely unattended, you only need a working internet connection through the ethernet port or use the onboard wireless LAN (supported on model 3B and 0W)
- DHCP and static IP configuration (DHCP is the default)
- always installs the latest version of Raspbian
- configurable default settings
Expand Down Expand Up @@ -72,7 +72,10 @@ Under normal circumstances, you can just power on your Pi and cross your fingers

If you don't have a display attached, you can monitor the ethernet card LEDs to guess the activity status. When it finally reboots after installing everything you will see them illuminate on and off a few times when Raspbian configures on boot.

If you do have a display, you can follow the progress and catch any possible errors in the default configuration or your own modifications.
If the installation process fails, you will see **SOS** in Morse code (... --- ...) on an led. In this case, power off the Pi and check the log on the sd card.

If you do have a display, you can follow the progress and catch any possible errors in the default configuration or your own modifications.

If you have a serial cable connected, installer output can be followed there, too. If 'console=tty1' at then end of the `cmdline.txt` file is removed, you have access to the console in case of problems.

## Installer customization
Expand Down
104 changes: 79 additions & 25 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ function create_cpio {
mkdir -p rootfs/sbin/
mkdir -p rootfs/usr/bin/
mkdir -p rootfs/usr/lib/mime/packages/
mkdir -p rootfs/usr/lib/openssl-1.0.0/engines/
mkdir -p rootfs/usr/lib/openssl-1.0.2/engines/
mkdir -p rootfs/usr/lib/engines-1.1/
mkdir -p rootfs/usr/lib/{tar,tc}
mkdir -p rootfs/usr/sbin/
mkdir -p rootfs/usr/share/{dpkg,keyrings,libc-bin}
Expand Down Expand Up @@ -213,7 +214,7 @@ function create_cpio {
sed -i "s/__DATE__/$(date)/" rootfs/opt/raspberrypi-ua-netinst/install.sh

# btrfs-tools components
cp --preserve=xattr,timestamps tmp/sbin/mkfs.btrfs rootfs/sbin/
cp --preserve=xattr,timestamps tmp/bin/mkfs.btrfs rootfs/bin/
cp --preserve=xattr,timestamps tmp/usr/lib/*/libbtrfs.so.0 rootfs/lib/

# busybox components
Expand Down Expand Up @@ -294,7 +295,7 @@ function create_cpio {
cp --preserve=xattr,timestamps tmp/usr/share/dpkg/abitable rootfs/usr/share/dpkg/
cp --preserve=xattr,timestamps tmp/usr/share/dpkg/cputable rootfs/usr/share/dpkg/
cp --preserve=xattr,timestamps tmp/usr/share/dpkg/ostable rootfs/usr/share/dpkg/
cp --preserve=xattr,timestamps tmp/usr/share/dpkg/triplettable rootfs/usr/share/dpkg/
cp --preserve=xattr,timestamps tmp/usr/share/dpkg/tupletable rootfs/usr/share/dpkg/
cd rootfs/usr/sbin
ln -s ../bin/dpkg-divert dpkg-divert
ln -s ../bin/dpkg-statoverride dpkg-statoverride
Expand Down Expand Up @@ -336,9 +337,11 @@ function create_cpio {
ln -s mke2fs mkfs.ext4dev
cd ../..

# libf2fs0 components
cp --preserve=xattr,timestamps tmp/lib/*/libf2fs.so.1.* rootfs/lib/libf2fs.so.1

# f2fs-tools components
cp --preserve=xattr,timestamps tmp/sbin/mkfs.f2fs rootfs/sbin/
cp --preserve=xattr,timestamps tmp/lib/*/libf2fs.so.0 rootfs/lib/

# gpgv components
cp --preserve=xattr,timestamps tmp/usr/bin/gpgv rootfs/usr/bin/
Expand Down Expand Up @@ -471,7 +474,6 @@ function create_cpio {
cp --preserve=xattr,timestamps tmp/etc/gai.conf rootfs/etc/
cp --preserve=xattr,timestamps tmp/etc/ld.so.conf rootfs/etc/
cp --preserve=xattr,timestamps tmp/sbin/ldconfig rootfs/sbin/
cp --preserve=xattr,timestamps tmp/sbin/ldconfig.real rootfs/sbin/
cp --preserve=xattr,timestamps tmp/usr/bin/catchsegv rootfs/usr/bin/
cp --preserve=xattr,timestamps tmp/usr/bin/getconf rootfs/usr/bin/
cp --preserve=xattr,timestamps tmp/usr/bin/getent rootfs/usr/bin/
Expand Down Expand Up @@ -527,10 +529,22 @@ function create_cpio {
cp --preserve=xattr,timestamps tmp/lib/*/libdbus-1.so.3 rootfs/lib/libdbus-1.so.3
cp --preserve=xattr,timestamps tmp/lib/*/libdl.so.2 rootfs/lib/libdl.so.2

# libfdisk1 components
cp --no-dereference --preserve=xattr,timestamps tmp/lib/*/libfdisk.so.1.* rootfs/lib/libfdisk.so.1

# libgcc1 components
cp --preserve=xattr,timestamps tmp/lib/*/libgcc_s.so.1 rootfs/lib/
cp --preserve=xattr,timestamps tmp/lib/*/librt.so.1 rootfs/lib/

# libgcrypt20 components
cp --no-dereference --preserve=xattr,timestamps tmp/lib/*/libgcrypt.so.20.* rootfs/lib/libgcrypt.so.20

# libgpg-error0 components
cp --no-dereference --preserve=xattr,timestamps tmp/lib/*/libgpg-error.so.0.* rootfs/lib/libgpg-error.so.0

# liblz4-1 components
cp --no-dereference --preserve=xattr,timestamps tmp/usr/lib/*/liblz4.so.1.* rootfs/usr/lib/liblz4.so.1

# liblzma5 components
cp --preserve=xattr,timestamps tmp/lib/*/liblzma.so.5.* rootfs/lib/liblzma.so.5

Expand Down Expand Up @@ -573,21 +587,30 @@ function create_cpio {
# libsmartcols1 components
cp --preserve=xattr,timestamps tmp/lib/*/libsmartcols.so.1.* rootfs/lib/libsmartcols.so.1

# libssl1.0.0 components
cp --preserve=xattr,timestamps tmp/usr/lib/*/libcrypto.so.1.0.0 rootfs/usr/lib/
cp --preserve=xattr,timestamps tmp/usr/lib/*/libssl.so.1.0.0 rootfs/usr/lib/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/lib4758cca.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libaep.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libatalla.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libcapi.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libchil.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libcswift.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libgmp.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libgost.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libnuron.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libpadlock.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libsureware.so rootfs/usr/lib/openssl-1.0.0/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.0/engines/libubsec.so rootfs/usr/lib/openssl-1.0.0/engines/
# libssl1.0.2 components
cp --preserve=xattr,timestamps tmp/usr/lib/*/libcrypto.so.1.0.2 rootfs/usr/lib/
cp --preserve=xattr,timestamps tmp/usr/lib/*/libssl.so.1.0.2 rootfs/usr/lib/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/lib4758cca.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libaep.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libatalla.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libcapi.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libchil.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libcswift.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libgmp.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libgost.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libnuron.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libpadlock.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libsureware.so rootfs/usr/lib/openssl-1.0.2/engines/
cp --preserve=xattr,timestamps tmp/usr/lib/*/openssl-1.0.2/engines/libubsec.so rootfs/usr/lib/openssl-1.0.2/engines/

# libssl1.1 components
cp --preserve=xattr,timestamps tmp/usr/lib/*/libcrypto.so.1.1 rootfs/usr/lib/
cp --preserve=xattr,timestamps tmp/usr/lib/*/libssl.so.1.1 rootfs/usr/lib/
cp --preserve=xattr,timestamps tmp/usr/lib/*/engines-1.1/capi.so rootfs/usr/lib/engines-1.1/
cp --preserve=xattr,timestamps tmp/usr/lib/*/engines-1.1/padlock.so rootfs/usr/lib/engines-1.1/

# libsystemd0 components
cp --no-dereference --preserve=xattr,timestamps tmp/lib/*/libsystemd.so* rootfs/lib/

# libtinfo5 components
cp --preserve=xattr,timestamps tmp/lib/*/libtinfo.so.5.* rootfs/lib/libtinfo.so.5
Expand All @@ -612,7 +635,7 @@ function create_cpio {
ln -s /opt/vc/bin/vcgencmd rootfs/usr/bin/vcgencmd
cp --preserve=xattr,timestamps tmp/usr/share/doc/libraspberrypi-bin/LICENCE rootfs/opt/vc/
## libraspberrypi0
mkdir -p rootfs/etc
mkdir -p rootfs/etc/ld.so.conf.d
cp --preserve=xattr,timestamps tmp/etc/ld.so.conf.d/00-vmcs.conf rootfs/etc/ld.so.conf.d/
mkdir -p rootfs/opt/vc/lib
cp --preserve=xattr,timestamps tmp/opt/vc/lib/libvcos.so rootfs/opt/vc/lib/
Expand All @@ -628,6 +651,37 @@ function create_cpio {
(cd ../"${resources_dir}"/initramfs/ && find . -type d -exec echo rootfs/opt/raspberrypi-ua-netinst/res/{} \;) | xargs chmod +rx
(cd ../"${resources_dir}"/initramfs/ && find . -type f -exec echo rootfs/opt/raspberrypi-ua-netinst/res/{} \;) | xargs chmod +r

# curl
cp --preserve=xattr,timestamps tmp/usr/bin/curl rootfs/usr/bin/
cp --preserve=xattr,timestamps tmp/usr/lib/*/libcurl.so.4 rootfs/lib/arm-linux-gnueabihf/libcurl.so.4
cp --preserve=xattr,timestamps tmp/usr/lib/*/libnghttp2.so.14 rootfs/lib/arm-linux-gnueabihf/libnghttp2.so.14
cp --preserve=xattr,timestamps tmp/usr/lib/*/libidn2.so.0 rootfs/lib/arm-linux-gnueabihf/libidn2.so.0
cp --preserve=xattr,timestamps tmp/usr/lib/*/librtmp.so.1 rootfs/lib/arm-linux-gnueabihf/librtmp.so.1
cp --preserve=xattr,timestamps tmp/usr/lib/*/libssh2.so.1 rootfs/lib/arm-linux-gnueabihf/libssh2.so.1
cp --preserve=xattr,timestamps tmp/usr/lib/*/libpsl.so.5 rootfs/lib/arm-linux-gnueabihf/libpsl.so.5
cp --preserve=xattr,timestamps tmp/usr/lib/*/libgssapi_krb5.so.2 rootfs/lib/arm-linux-gnueabihf/libgssapi_krb5.so.2
cp --preserve=xattr,timestamps tmp/usr/lib/*/libkrb5.so.3 rootfs/lib/arm-linux-gnueabihf/libkrb5.so.3
cp --preserve=xattr,timestamps tmp/usr/lib/*/libk5crypto.so.3 rootfs/lib/arm-linux-gnueabihf/libk5crypto.so.3
cp --preserve=xattr,timestamps tmp/usr/lib/*/liblber-2.4.so.2 rootfs/lib/arm-linux-gnueabihf/liblber-2.4.so.2
cp --preserve=xattr,timestamps tmp/usr/lib/*/libldap_r-2.4.so.2 rootfs/lib/arm-linux-gnueabihf/libldap_r-2.4.so.2
cp --preserve=xattr,timestamps tmp/usr/lib/*/libunistring.so.0 rootfs/lib/arm-linux-gnueabihf/libunistring.so.0
cp --preserve=xattr,timestamps tmp/usr/lib/*/libgnutls.so.30 rootfs/lib/arm-linux-gnueabihf/libgnutls.so.30
cp --preserve=xattr,timestamps tmp/usr/lib/*/libhogweed.so.4 rootfs/lib/arm-linux-gnueabihf/libhogweed.so.4
cp --preserve=xattr,timestamps tmp/usr/lib/*/libnettle.so.6 rootfs/lib/arm-linux-gnueabihf/libnettle.so.6
cp --preserve=xattr,timestamps tmp/usr/lib/*/libgmp.so.10 rootfs/lib/arm-linux-gnueabihf/libgmp.so.10
cp --preserve=xattr,timestamps tmp/lib/*/libgcrypt.so.20 rootfs/lib/arm-linux-gnueabihf/libgcrypt.so.20
cp --preserve=xattr,timestamps tmp/usr/lib/*/libkrb5support.so.0 rootfs/lib/arm-linux-gnueabihf/libkrb5support.so.0
cp --preserve=xattr,timestamps tmp/lib/*/libkeyutils.so.1 rootfs/lib/arm-linux-gnueabihf/libkeyutils.so.1
cp --preserve=xattr,timestamps tmp/usr/lib/*/libsasl2.so.2 rootfs/lib/arm-linux-gnueabihf/libsasl2.so.2
cp --preserve=xattr,timestamps tmp/usr/lib/*/libp11-kit.so.0 rootfs/lib/arm-linux-gnueabihf/libp11-kit.so.0
cp --preserve=xattr,timestamps tmp/lib/*/libidn.so.11 rootfs/lib/arm-linux-gnueabihf/libidn.so.11
cp --preserve=xattr,timestamps tmp/usr/lib/*/libtasn1.so.6 rootfs/lib/arm-linux-gnueabihf/libtasn1.so.6
cp --preserve=xattr,timestamps tmp/lib/*/libgpg-error.so.0 rootfs/lib/arm-linux-gnueabihf/libgpg-error.so.0
cp --preserve=xattr,timestamps tmp/usr/lib/*/libffi.so.6 rootfs/lib/arm-linux-gnueabihf/libffi.so.6

# libudev
cp --preserve=xattr,timestamps tmp/lib/*/libudev.so.1 rootfs/lib/arm-linux-gnueabihf/libudev.so.1

INITRAMFS="../raspberrypi-ua-netinst.cpio.gz"
(cd rootfs && find . | cpio -H newc -ov | gzip --best > $INITRAMFS)

Expand Down Expand Up @@ -673,14 +727,14 @@ mv raspberrypi-ua-netinst.cpio.gz bootfs/raspberrypi-ua-netinst/
echo "initramfs raspberrypi-ua-netinst/raspberrypi-ua-netinst.cpio.gz"
echo "[pi3]"
echo "enable_uart=1"
echo ""
echo "# Only for RPi model 3: The following line enables the ability to boot from USB."
echo "# Notice: This flag will be written to OTP and is permanent."
echo "#program_usb_boot_mode=1"
} >> bootfs/config.txt

echo "dwc_otg.lpm_enable=0 consoleblank=0 console=serial0,115200 console=tty1 elevator=deadline rootwait" > bootfs/cmdline.txt

if [ ! -f bootfs/TIMEOUT ] ; then
touch bootfs/TIMEOUT
fi

# prepare config content
mkdir -p bootfs/raspberrypi-ua-netinst/config
mkdir -p bootfs/raspberrypi-ua-netinst/config/apt
Expand Down
2 changes: 1 addition & 1 deletion config/installer-retries.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
installer_retries="3"
installer_retries=3
8 changes: 5 additions & 3 deletions doc/INSTALL_CUSTOM.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
| `firmware_packages` | `0` | `0`/`1` | Set to "1" to install common firmware packages (Atheros, Broadcom, Libertas, Ralink and Realtek). |
| `mirror` | `http:// mirrordirector.raspbian.org/ raspbian/` | | |
| `mirror_cache` | | | Set address and port for HTTP apt-cacher or apt-cacher-ng (e.g. "192.168.0.1:3142"). If set, the cacher will be used to cache packages during installation downloaded from the repository set in `mirror` as well as "http://archive.raspberrypi.org/debian". |
| `release` | `jessie` | | Raspbian release name |
| `release` | `stretch` | | Raspbian release name |

### Description: Presets

| Preset | Packages |
|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `base` | _\<essential\>,apt,cpufrequtils,kmod,raspbian-archive-keyring_ |
| `minimal` | _\<base\>,fake-hwclock,ifupdown,net-tools,ntp,openssh-server,dosfstools,raspberrypi-sys-mods_ |
| `server` | _\<minimal\>,vim-tiny,iputils-ping,wget,ca-certificates,rsyslog,cron,dialog,locales,less,man-db,logrotate,bash-completion,console-setup,apt-utils,libraspberrypi-bin,raspi-copies-and-fills_ |
| `server` | _\<minimal\>,vim-tiny,iputils-ping,wget,ca-certificates,rsyslog,cron,dialog,locales,tzdata,less,man-db,logrotate,bash-completion,console-setup,apt-utils,libraspberrypi-bin,raspi-copies-and-fills_ |

## Device / peripheral

Expand Down Expand Up @@ -82,6 +82,7 @@
| `ip_broadcast` | `0.0.0.0` | | Broadcast address |
| `ip_gateway` | `0.0.0.0` | | Gateway address (e.g. 192.168.2.1) |
| `ip_nameservers` | | | DNS nameservers (e.g. 8.8.8.8) |
| `ip_ipv6` | `1` | `0`/`1` | Set to "0" to disable IPv6. |

## Localization

Expand All @@ -107,8 +108,9 @@
## Partitioning / Filesystem

| Parameter | Default | Options | Description |
|-------------------|---------|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|---------------------|---------|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `usbroot` | `0` | `0`/`1` | Set to "1" to install to first USB disk. |
| `usbboot` | `0` | `0`/`1` | Set to "1" to boot from first USB disk. This is usually used with 'usbroot=1' and works with model 3 (BCM2837) only. If this is used for the first time, it has to be done from SD-card and the system will shut down after success. Then the SD-card has to be removed before rebooting. |
| `rootfstype` | f2fs | `ext4`/ `f2fs`/ `btrfs` | Sets the file system of the root partition. |
| `boot_volume_label` | | | Sets the volume name of the boot partition. The volume name can be up to 11 characters long. The label is used by most OSes (Windows, Mac OSX and Linux) to identify the SD-card on the desktop and can be useful when using multiple SD-cards. |
| `bootsize` | `+128M` | | /boot partition size in megabytes, provide it in the form '+\<number\>M' (without quotes) |
Expand Down
Loading

0 comments on commit 84cbb40

Please sign in to comment.