Disk partitions:
- Boot - runs UBoot, The linux bootloader. This is configured to boot the companion installation first, and fall back to the recovery installation if companion fails to boot.
- Recovery - Recovery and update management installation. This (archlinux) installation runs a simple apache webserver with php. The webserver allows uploading a compressed companion installation image, stores it in the staging partition, then extracts it over the existing companion installation
- User (to be implemented) - User data for companion installation - This is for the user's files and configurations. This partition will not be affected during the recovery/update process, thus the user's files are persistent during updates.
- Staging (to be implemented) - filesystem to store compressed image to be burned
- Companion - filesystem to run the companion installation
./conf contains files to configure and run the webserver these files are located according where they should be installed (copied) on the root filesystem
./install contains scripts to install the system
create directories /mnt/boot and /mnt/root- select an sd card at least 8G in size
- run
sudo ./makearch.sh /dev/sdX
to install everything on the disk (you might have to accept some proceed anyway requests during the filesystem creation) - put the sd card in the pi, connect it to a monitor and a keyboard (and your router if you want)
- hold the spacebar down while the pi boots
- at the uboot command line enter
setenv brpart /dev/mmcblk0p2
or whatever partition you want to mount for root (this gets passed to the kernel as theroot=
option) - at the uboot command line enter
run bootcmd
- done!
- more steps to come... (this can probably be done easier using chroot)
- ssh to the pi user alarm password alarm or use root/root
- move the initarch.sh from here to the pi
- run the initarch.sh on the pi
- Move files from conf here to / on the pi
- reboot or systemctl restart httpd
- visit pi ip address in browser to see webpage
libarchive is installed forcefully and leaves behind root folders in the project
- https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3
- http://randombio.com/linuxsetup107.html
Ways in which we may want to expand the funcionality provided here
- uboot netconsole
- watchdog
- fallback support
- network booting
$ sudo bash ./copyarch.sh DISK IMG
#Things I've tried
$ p1 boot p2 arch p3 companion part results: companion part give error
/sbin/init does not exist
bailing out, you are on your own
p1 boot p2 arch p3 arch (UUIDS were the same) boot in p3: results: success!
remove uuid=3 from boot.txt results:
ERROR=device'PARTUUID=' not found. skipping fsck.
then i get logged into rootfs
sudo bash ./prepare-disk.sh /dev/sdh 2G 2G