Skip to content

Make dir $mnt/boot before writing files to it

When executing setup-disk on a Raspberry PI with a mount point as parameter (/mnt below), the script shows the following two error messages:

Installing system on /dev/mmcblk0p2: /sbin/setup-disk: line 469: can't create /mnt/boot/config.txt: nonexistent directory /sbin/setup-disk: line 470: can't create /mnt/boot/cmdline.txt: nonexistent directory

This happens because the function setup_raspberrypi_bootloader() in setup-disk assumes the mount point has a /boot directory which is not guaranteed to be there.

Proposed fix: The function needs to create the directory first.

Merge request reports