FooDeas / raspberrypi-ua-netinst

RaspberryPi (minimal) unattended netinstaller
ISC License
220 stars 46 forks source link

Issues with 2.1.0 #131

Closed thijstriemstra closed 6 years ago

thijstriemstra commented 6 years ago

I tried devel but things failed so I tried 2.1.0 but seeing similar errors there:


==================================================
raspberrypi-ua-netinst
==================================================
Revision v2.1.0 (d50d417)
Built on ma 22 jan 2018 21:48:04 CET
Running on Raspberry Pi version 3 Model B
==================================================
https://github.com/FooDeas/raspberrypi-ua-netinst/
==================================================
Starting HWRNG... OK
Mounting boot partition... OK
Copying boot files... OK
Executing installer-config.txt...
dos2unix: can't open '/bootfs/raspberrypi-ua-netinst/config/installer-config-common.txt': No such file or directory
tail: can't open '/bootfs/raspberrypi-ua-netinst/config/installer-config-common.txt': No such file or directory
tail: no files
/tmp/bootfs/raspberrypi-ua-netinst/config/installer-config.txt: line 2: /bootfs/raspberrypi-ua-netinst/config/installer-config-common.txt: No such file or directory

Top of my config contains:

inputfile_sanitize /bootfs/raspberrypi-ua-netinst/config/installer-config-common.txt
source /bootfs/raspberrypi-ua-netinst/config/installer-config-common.txt

Second issue:

run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.9.59+ /boot/kernel.img
  run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.9.59-v7+ /boot/kernel7.img
  Processing triggers for man-db (2.7.6.1-2) ...
  Setting up device-tree-compiler (1.4.4-1) ...
  Setting up libraspberrypi0 (1.20171029-1) ...
  Setting up raspberrypi-sys-mods (20180103) ...
  Fixing file capabilities...
  Failed to set capabilities on file `/bin/ping6' (Invalid argument)
  The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
  Failed to set capabilities on file `/bin/ping' (Operation not supported)
  The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
  Failed to set capabilities on file `/usr/bin/systemd-detect-virt' (Operation not supported)
  The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file

3rd issue:

  Adjusting cmdline.txt...
  Removing old sysctl tweaks, if present...
  Removing old NOPASSWD line, if present...
  sed: can't read /etc/sudoers: No such file or directory
  Failed

Any ideas @FooDeas?

thijstriemstra commented 6 years ago

Looks like issue nr 1 should be (when looking at this diff) be fixed by replacing /boot/ with /rootfs/boot/. Testing..

Update: that didn't fix it, testing with /tmp/bootfs/ prefix instead now..

Update 2: fixed with /tmp/bootfs/:

inputfile_sanitize /tmp/bootfs/raspberrypi-ua-netinst/config/installer-config-common.txt
source /tmp/bootfs/raspberrypi-ua-netinst/config/installer-config-common.txt
FooDeas commented 6 years ago

The logged errors from the second and third issue are caused by the kernel post install script. They came with the latest updates and can be ignored.

thijstriemstra commented 6 years ago

Did anything change when it comes to swap/memory because my rpi3 always freezes during installation of packages.. tried different rpi's, different sd-cards, nothing helps. Will try with 2.0.0 to see if that fixes it.

FooDeas commented 6 years ago

I tested my rpi3 without problems. Swap is not used on models with enough memory.

thijstriemstra commented 6 years ago

Hmm, here's my config:

preset=server
release=stretch
firmware_packages=1
packages=git,unzip,nano,libffi-dev,libi2c-dev,i2c-tools,libbz2-dev,pciutils,libsqlite3-dev,libncurses-dev,usbutils,libusb-dev,libyaml-dev,libts-dev,xz-utils,raspberrypi-sys-mods,bluez,bluetooth,pi-bluetooth,libbluetooth3,libbluetooth-dev,libdbus-c++-dev,libdbus-1-dev,libinput-dev,libinput10,libwebp-dev,lsyncd,samba,autofs,cifs-utils,libspeechd-dev,flite,flite-dev,libreadline-dev,libraspberrypi-dev,raspberrypi-kernel-headers,libssl-dev
usersysgroups=lpadmin,lp,dialout,input,audio,mail,spi,i2c
hostname=HOST_NAME
userperms_admin=1
root_ssh_pwlogin=0
ssh_pwlogin=0
user_ssh_pubkey=mykey_rsa.pub
timezone=Europe/Amsterdam
locales="en_US.UTF-8,nl_NL.UTF-8"
system_default_locale="en_US.UTF-8"
gpu_mem=512
spi_enable=1
i2c_enable=1
i2c_baudrate=400000
sound_enable=1
sound_usb_enable=1
sound_usb_first=1
userperms_sound=1
camera_enable=1
camera_disable_led=1
usergpio=1
usergpu=1
mirror_cache=CACHE_IP:3142
console_blank=0
quiet_boot=1
disable_raspberries=1
disable_splash=1
cleanup=1
cleanup_logfiles=0

I will try again with an empty package list, see if that works. There is also no log file written whatsoever..

thijstriemstra commented 6 years ago

I limited the custom packages to:

packages=git,unzip,nano

And this time the installer didn't hang... ugh. I'll now try installing the remaining packages from that list (in one command) and see if that hangs the RPI and if it's related to a particular package (update: installing packages 'manually' didn't hang the rpi..)

Update: logged in, and did apt-get update/upgrade and see that there are new updates for the package(s) that was hanging:

The following packages will be upgraded:
  libpam-modules libpam-modules-bin libpam-runtime libpam0g
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 723 kB of archives.

So it's quite possibly a packaging mistake on their end. Closing this.

FooDeas commented 6 years ago

That's not the reason. The upgrades come from the added repository to apt. The debootstrap step has no access to them. That's another improvement todo...