GithubHelp home page GithubHelp logo

hypriot / os-rootfs Goto Github PK

View Code? Open in Web Editor NEW
68.0 11.0 40.0 122 KB

The root filesystem of HypriotOS

Home Page: http://blog.hypriot.com/post/how-to-get-docker-working-on-your-favourite-arm-board-with-hypriotos/

License: MIT License

Shell 66.49% Makefile 13.32% Ruby 18.33% Dockerfile 1.87%
raspberry-pi hypriot-os

os-rootfs's Introduction

os-rootfs

Join the chat at https://gitter.im/hypriot/talk CircleCI

The os-rootfs builds the base of all the HypriotOS images. This repo creates a general root filesystem for different CPU architectures without the board specific parts.

This root filesystem

  • uses a minimal Debian system
  • adds an user pirate
  • sets a default locale (UTF-8)
  • sets a default timezone (UTC)
  • ...

Here is an example how all the GitHub repos play together:

Architecture

Contributing

You can contribute to this repo by forking it and sending us pull requests. Feedback is always welcome!

You can build the root filesystem locally with Docker.

Create builder Docker image

make build

Create all rootfs's for all supported ARCH's

make all

Create single rootfs's for all supported ARCH's

make i386
make amd64
make armhf-debian
make armhf-raspbian
make arm64-debian
make mips

Run container in interactive mode (for testing purposes)

make shell

Build artifacts

The output of the build will be in the current directory as a rootfs-${ARCH}-${HYPRIOT_OS_VERSION}.tar.gz file.

How to run tests

Option 1: Run tests with a single command

With the following command, all tests for a specific architecture will be executed:

BUILD_ARCH=arm64 make test

Option 2: Run tests interactively

If you prefer to have a shorter feedback loop of less than a second, enter the container with

make testshell

Now, to run the test, execute

BUILD_ARCH=arm64 /builder/test.sh

Run shellcheck tests

To run the shellcheck tests, execute

make shellcheck

License

MIT - see the LICENSE file for details.

os-rootfs's People

Contributors

apophizzz avatar dashdashzako avatar dieterreuter avatar djmaze avatar glensc avatar govinda-fichtner avatar mathiasrenner avatar mattmacs avatar moul avatar stefanscherer avatar whatever4711 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

os-rootfs's Issues

Root prompt should be # not $

Nit picky I know, but for those of us that live on the linux command line, the prompt for the root user after doing sudo -i should be # not $.

Image contains pregenerated SSH host keys

Each host should have its own set of SSH keys. As of now, the SSH keys are generated during the install of the package openssh-server. That means the keys end up in the image.

For a clean solution, we should probably remove the pregenerated keys during build of the rootfs. Additionally, we have to make sure the keys are regenerated on first boot.

Missing release file for debian stretch repo

Not sure if this is the right branch to raise this on, so apologies if it's not.

Trying to apt-get update on my HypriotOS Pi, and getting the following:

$ sudo apt-get update
Hit:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Hit:3 https://download.docker.com/linux/raspbian stretch InRelease
Ign:5 https://packagecloud.io/Hypriot/Schatzkiste/debian stretch InRelease
Err:6 https://packagecloud.io/Hypriot/Schatzkiste/debian stretch Release
404 Not Found
Hit:4 https://packagecloud.io/Hypriot/rpi/debian stretch InRelease
Reading package lists... Done
E: The repository 'https://packagecloud.io/Hypriot/Schatzkiste/debian stretch Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Is something under update at the server end, or has something gone wrong? The release file seems to be AWOL?

Missing Packages less and dirmngr

When running the latest HypriotOS image it seems some packages are missing from newer builds of os-rootfs, specifically I noticed less and dirmngr. This is causing an issue (DieterReuter/image-builder-rpi64#56) when trying to add GPG keys with cloud-init.

Not sure if there are other packages missing as well, but these two I noticed right away when I re-flashed the latest HypriotOS v20180107-184643 which uses v1.2.5 in commit DieterReuter/image-builder-rpi64@6d0ef74

New travis builds are failing since v0.8.1

The build for v0.8.2 is running fine with all tests passing. But the file upload to GH releases is still failing.

@Govinda-Fichtner, are there any missing changes from v0.8.1 which are not committed or merged?
The release files from v0.8.1 seems to be manually uploaded.

Transactional AB Updates of the core OS

I am trying to get Transactional AB updates working with hypriot.

Transactional AB Updates is what CoreOS and Ubuntu Core also offers. ChromeOS pioneered this as far as i know.
The use case for this is so that you can update Hypriot OS (the host) itself in a transactional way, such that if the update fails you can rollback everything.

For me this is a huge feature that would make this very useful for my project, my clients project, and also the general public to be able to run Owncloud and other things. It advances everyone.

One aspect of this is the disk partitioning. Hence why i am raising this in this repo.

Another aspect is modifying the boot to tell it to boot up which partition, based on the state of the machine. This might be a bit tough based on the many boards out there.

I spent a few weeks lookig into how Ubuntu COre does it and its not that complex. Ubuntu have written a ton of golang code to wrap lots of this, and so its kind of easy to follow whats going on.

So, i am raising this idea here to see if anyone else wants to work on this with me, if the core developers are thinkng about this, or dont see any value in this... Would be nice if my patches are accepted...

Introduce shellcheck?

To improve code quality in our shell scripts the idea arised if we should introduce http://www.shellcheck.net and check all scripts in the Travis build.

Build a PR for that and let's see and discuss how to step further.

firstboot runs more than once?

After a second boot I found the following logs in /var/log/syslog:

Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: + source /etc/firstboot.d/10-resize-rootdisk /etc/firstboot.d/50-regenerate-sshd-host-keys
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: ++ '[' -h /dev/disk/by-label/root ']'
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: +++ readlink /dev/disk/by-label/root
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: ++ ROOT_PART=../../mmcblk0p2
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: ++ PART_NUM=2
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: ++ '[' 2 = ../../mmcblk0p2 ']'
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: ++ '[' 2 -ne 2 ']'
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: +++ parted /dev/mmcblk0 -ms unit s p
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: +++ tail -n 1
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: +++ cut -f 1 -d:
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: ++ LAST_PART_NUM=2
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: ++ '[' 2 '!=' 2 ']'
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: +++ parted /dev/mmcblk0 -ms unit s p
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: +++ grep '^2'
Jul  3 18:46:22 black-pearl hypriot-firstboot[206]: +++ cut -f 2 -d:
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: ++ PART_START=133120s
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: ++ PART_START=133120
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: ++ '[' 133120 ']'
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: ++ set +e
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: ++ fdisk /dev/mmcblk0
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Welcome to fdisk (util-linux 2.25.2).
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Changes will remain in memory only, until you decide to write them.
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Be careful before using the write command.
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Command (m for help): Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Units: sectors of 1 * 512 = 512 bytes
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Sector size (logical/physical): 512 bytes / 512 bytes
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: I/O size (minimum/optimal): 512 bytes / 512 bytes
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Disklabel type: dos
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Disk identifier: 0x00000000
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Device         Boot  Start     End Sectors  Size Id Type
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: /dev/mmcblk0p1        2048  133119  131072   64M  c W95 FAT32 (LBA)
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: /dev/mmcblk0p2      133120 3071998 2938879  1.4G 83 Linux
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Command (m for help): Partition number (1,2, default 2):
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Partition 2 has been deleted.
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Command (m for help): Partition type
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: p   primary (1 primary, 0 extended, 3 free)
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: e   extended (container for logical partitions)
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Select (default p): Partition number (2-4, default 2): First sector (133120-15523839, default 133120): Last sector, +sectors or +size{K,M,G,T,P} (133120-15523839, default 15523839):
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Created a new partition 2 of type 'Linux' and of size 7.3 GiB.
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Command (m for help): Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Units: sectors of 1 * 512 = 512 bytes
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Sector size (logical/physical): 512 bytes / 512 bytes
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: I/O size (minimum/optimal): 512 bytes / 512 bytes
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Disklabel type: dos
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Disk identifier: 0x00000000
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Device         Boot  Start      End  Sectors  Size Id Type
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: /dev/mmcblk0p1        2048   133119   131072   64M  c W95 FAT32 (LBA)
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: /dev/mmcblk0p2      133120 15523839 15390720  7.3G 83 Linux
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Command (m for help): Re-reading the partition table failed.: Device or resource busy
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: The partition table has been altered.
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: Calling ioctl() to re-read partition table.
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: ++ set -e
Jul  3 18:46:23 black-pearl hypriot-firstboot[206]: ++ partprobe
Jul  3 18:46:24 black-pearl hypriot-firstboot[206]: ++ /sbin/resize2fs /dev/disk/by-label/root
Jul  3 18:46:24 black-pearl hypriot-firstboot[206]: resize2fs 1.42.12 (29-Aug-2014)
Jul  3 18:46:24 black-pearl hypriot-firstboot[206]: Filesystem at /dev/disk/by-label/root is mounted on /; on-line resizing required
Jul  3 18:46:24 black-pearl hypriot-firstboot[206]: old_desc_blocks = 1, new_desc_blocks = 1
Jul  3 18:46:24 black-pearl hypriot-firstboot[206]: The filesystem on /dev/disk/by-label/root is now 1923840 (4k) blocks long.
Jul  3 18:46:24 black-pearl hypriot-firstboot[206]: + systemctl disable hypriot-firstboot.service
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: + source /etc/firstboot.d/10-resize-rootdisk /etc/firstboot.d/50-regenerate-sshd-host-keys
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ '[' -h /dev/disk/by-label/root ']'
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: +++ readlink /dev/disk/by-label/root
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ ROOT_PART=../../mmcblk0p2
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ PART_NUM=2
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ '[' 2 = ../../mmcblk0p2 ']'
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ '[' 2 -ne 2 ']'
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: +++ parted /dev/mmcblk0 -ms unit s p
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: +++ cut -f 1 -d:
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: +++ tail -n 1
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ LAST_PART_NUM=2
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ '[' 2 '!=' 2 ']'
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: +++ parted /dev/mmcblk0 -ms unit s p
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: +++ cut -f 2 -d:
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: +++ grep '^2'
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ PART_START=133120s
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ PART_START=133120
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ '[' 133120 ']'
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ set +e
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ fdisk /dev/mmcblk0
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Welcome to fdisk (util-linux 2.25.2).
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Changes will remain in memory only, until you decide to write them.
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Be careful before using the write command.
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Command (m for help): Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Units: sectors of 1 * 512 = 512 bytes
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Sector size (logical/physical): 512 bytes / 512 bytes
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: I/O size (minimum/optimal): 512 bytes / 512 bytes
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Disklabel type: dos
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Disk identifier: 0x00000000
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Device         Boot  Start      End  Sectors  Size Id Type
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: /dev/mmcblk0p1        2048   133119   131072   64M  c W95 FAT32 (LBA)
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: /dev/mmcblk0p2      133120 15523839 15390720  7.3G 83 Linux
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Command (m for help): Partition number (1,2, default 2):
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Partition 2 has been deleted.
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Command (m for help): Partition type
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: p   primary (1 primary, 0 extended, 3 free)
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: e   extended (container for logical partitions)
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Select (default p): Partition number (2-4, default 2): First sector (133120-15523839, default 133120): Last sector, +sectors or +size{K,M,G,T,P} (133120-15523839, default 15523839):
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Created a new partition 2 of type 'Linux' and of size 7.3 GiB.
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Command (m for help): Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Units: sectors of 1 * 512 = 512 bytes
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Sector size (logical/physical): 512 bytes / 512 bytes
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: I/O size (minimum/optimal): 512 bytes / 512 bytes
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Disklabel type: dos
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Disk identifier: 0x00000000
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Device         Boot  Start      End  Sectors  Size Id Type
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: /dev/mmcblk0p1        2048   133119   131072   64M  c W95 FAT32 (LBA)
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: /dev/mmcblk0p2      133120 15523839 15390720  7.3G 83 Linux
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Command (m for help): Re-reading the partition table failed.: Device or resource busy
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: The partition table has been altered.
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: Calling ioctl() to re-read partition table.
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ set -e
Feb 11 18:21:59 black-pearl hypriot-firstboot[191]: ++ partprobe
Feb 11 18:22:00 black-pearl hypriot-firstboot[191]: ++ /sbin/resize2fs /dev/disk/by-label/root
Feb 11 18:22:00 black-pearl hypriot-firstboot[191]: resize2fs 1.42.12 (29-Aug-2014)
Feb 11 18:22:00 black-pearl hypriot-firstboot[191]: The filesystem is already 1923840 (4k) blocks long.  Nothing to do!
Feb 11 18:22:00 black-pearl hypriot-firstboot[191]: + systemctl disable hypriot-firstboot.service

It seems to me that firstboot runs more than once and tries to resize the filesystem again. ??

Error reading from server http://httpredir.debian.org

Way too often we have trouble with http://httpredir.debian.org in Travis builds.

Get:110 http://httpredir.debian.org/debian/ jessie/main libopus0 amd64 1.1-2 [156 kB]
Err http://httpredir.debian.org/debian/ jessie/main libruby2.1 amd64 2.1.5-2+deb8u2
  Error reading from server. Remote end closed connection [IP: 128.31.0.66 80]
Get:111 http://httpredir.debian.org/debian/ jessie/main openbios-sparc all 1.1+svn1306-2 [157 kB]
Get:112 http://httpredir.debian.org/debian/ jessie/main libspice-server1 amd64 0.12.5-1+deb8u2 [472 kB]
Get:113 http://httpredir.debian.org/debian/ jessie/main seabios all 1.7.5-1 [112 kB]
Get:114 http://httpredir.debian.org/debian/ jessie/main openbios-ppc all 1.1+svn1306-2 [108 kB]
Get:115 http://httpredir.debian.org/debian/ jessie/main libbrlapi0.6 amd64 5.2~20141018-5 [81.1 kB]
Get:116 http://httpredir.debian.org/debian/ jessie/main rubygems-integration all 1.8 [4514 B]
Get:117 http://httpredir.debian.org/debian/ jessie/main libfdt1 amd64 1.4.0+dfsg-1 [15.5 kB]
Get:118 http://httpredir.debian.org/debian/ jessie/main ruby2.1 amd64 2.1.5-2+deb8u2 [275 kB]
Get:119 http://httpredir.debian.org/debian/ jessie/main libpsl0 amd64 0.5.1-1 [41.6 kB]
Get:120 http://httpredir.debian.org/debian/ jessie/main debootstrap all 1.0.67 [62.7 kB]
Get:121 http://httpredir.debian.org/debian/ jessie/main elfutils amd64 0.159-4.2 [275 kB]
Get:122 http://httpredir.debian.org/debian/ jessie/main ruby all 1:2.1.5+deb8u2 [9688 B]
Get:123 http://httpredir.debian.org/debian/ jessie/main shellcheck amd64 0.3.4-3 [842 kB]
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/r/ruby2.1/libruby2.1_2.1.5-2+deb8u2_amd64.deb  Error reading from server. Remote end closed connection [IP: 128.31.0.66 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Fetched 58.0 MB in 4s (11.7 MB/s)
The command '/bin/sh -c apt-get update && apt-get install -y     qemu     qemu-user-static     binfmt-support     debootstrap     elfutils     ruby     shellcheck     --no-install-recommends &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
make: *** [build] Error 1

In ctaggart/dotnet-vscode#1 they suggested using apt caching. Maybe this helps.

Debian stretch port not working with errors

Tried to adapt the image version for Debian Stretch 9.0 at https://github.com/gdeverlant/os-rootfs/tree/stretch.

OS: Windows 10
VM: VirtualBox with Debian Stretch 9.0

I'm getting this error

I: Unpacking libperl5.24:arm64...
I: Unpacking perl...
I: Unpacking perl-modules-5.24...
I: Unpacking pinentry-curses...
I: Unpacking libpopt0:arm64...
I: Unpacking libprocps6:arm64...
I: Unpacking procps...
I: Unpacking libreadline7:arm64...
I: Unpacking readline-common...
I: Unpacking rsyslog...
I: Unpacking librtmp1:arm64...
I: Unpacking libslang2:arm64...
I: Unpacking libsqlite3-0:arm64...
I: Unpacking sudo...
I: Unpacking libpam-systemd:arm64...
I: Unpacking systemd...
I: Unpacking udev...
I: Unpacking systemd-shim...
I: Unpacking tasksel...
I: Unpacking tasksel-data...
I: Unpacking libwrap0:arm64...
I: Unpacking ucf...
I: Unpacking usbutils...
I: Unpacking vim-common...
I: Unpacking vim-tiny...
I: Unpacking xxd...
I: Unpacking wget...
I: Unpacking libxapian30:arm64...
W: Failure while installing base packages.  This will be re-attempted up to five times.
W: See //debootstrap/debootstrap.log for details (possibly the package /var/cache/apt/archives/init_1.48_arm64.deb is at fault)
W: Failure while installing base packages.  This will be re-attempted up to five times.
W: See //debootstrap/debootstrap.log for details (possibly the package /var/cache/apt/archives/init_1.48_arm64.deb is at fault)
W: Failure while installing base packages.  This will be re-attempted up to five times.
W: See //debootstrap/debootstrap.log for details (possibly the package /var/cache/apt/archives/init_1.48_arm64.deb is at fault)
W: Failure while installing base packages.  This will be re-attempted up to five times.
W: See //debootstrap/debootstrap.log for details (possibly the package /var/cache/apt/archives/init_1.48_arm64.deb is at fault)
W: Failure while installing base packages.  This will be re-attempted up to five times.
W: See //debootstrap/debootstrap.log for details (possibly the package /var/cache/apt/archives/init_1.48_arm64.deb is at fault)
Makefile:17: recipe for target 'arm64-debian' failed
make: *** [arm64-debian] Error 1

Running in Ubuntu VM on Windows host error

This is what I get with

make build
make arm64-debian

I: Extracting libpcre3...
I: Extracting perl-base...
I: Extracting libprocps3...
I: Extracting procps...
I: Extracting sed...
I: Extracting sensible-utils...
I: Extracting login...
I: Extracting passwd...
I: Extracting libslang2...
I: Extracting startpar...
I: Extracting libsystemd0...
I: Extracting libudev1...
I: Extracting systemd...
I: Extracting systemd-sysv...
I: Extracting udev...
I: Extracting initscripts...
I: Extracting sysv-rc...
I: Extracting sysvinit-utils...
I: Extracting tar...
I: Extracting tzdata...
I: Extracting libustr-1.0-1...
I: Extracting bsdutils...
I: Extracting libblkid1...
I: Extracting libmount1...
I: Extracting libsmartcols1...
I: Extracting libuuid1...
I: Extracting mount...
I: Extracting util-linux...
I: Extracting liblzma5...
I: Extracting zlib1g...
I: Running command: chroot /debian-arm64 /debootstrap/debootstrap --second-stage
chroot: failed to run command '/debootstrap/debootstrap': Exec format error
Makefile:17: recipe for target 'arm64-debian' failed
make: *** [arm64-debian] Error 126

Make /etc/os-release compatible w/ docker-machine

The /etc/os-release file for Raspbian contains ID=raspbian which is not compatible with the original docker-machine binary.

In our blog post http://blog.hypriot.com/post/how-to-setup-rpi-docker-swarm/ we showed how to patch this file to make it work with docker-machine. This is done by changing ID=raspbian to ID=debian.

To make things easier it would help to fix this in the rootfs.

Are there any implications with this?
Which else process reads the ID of this file?

pirate has no input group

as a result, installing kodi leaves one without keyboard and mouse.

quick fix:

sudo usermod -a -G input pirate

but i think it should be done by default, as with other groups

sourcing multiple scripts does not work

I found this in the logfile of my Pi:

eb 11 18:42:28 localhost hypriot-firstboot[189]: + source /etc/firstboot.d/10-resize-rootdisk /etc/firstboot.d/50-regenerate-sshd-host-keys
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ '[' -h /dev/disk/by-label/root ']'
Feb 11 18:42:28 localhost hypriot-firstboot[189]: +++ readlink /dev/disk/by-label/root
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ ROOT_PART=../../mmcblk0p2
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ PART_NUM=2
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ '[' 2 = ../../mmcblk0p2 ']'
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ '[' 2 -ne 2 ']'
Feb 11 18:42:28 localhost hypriot-firstboot[189]: +++ parted /dev/mmcblk0 -ms unit s p
Feb 11 18:42:28 localhost hypriot-firstboot[189]: +++ tail -n 1
Feb 11 18:42:28 localhost hypriot-firstboot[189]: +++ cut -f 1 -d:
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ LAST_PART_NUM=2
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ '[' 2 '!=' 2 ']'
Feb 11 18:42:28 localhost hypriot-firstboot[189]: +++ parted /dev/mmcblk0 -ms unit s p
Feb 11 18:42:28 localhost hypriot-firstboot[189]: +++ grep '^2'
Feb 11 18:42:28 localhost hypriot-firstboot[189]: +++ cut -f 2 -d:
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ PART_START=133120s
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ PART_START=133120
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ '[' 133120 ']'
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ set +e
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ fdisk /dev/mmcblk0
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Welcome to fdisk (util-linux 2.25.2).
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Changes will remain in memory only, until you decide to write them.
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Be careful before using the write command.
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Command (m for help): Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Units: sectors of 1 * 512 = 512 bytes
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Sector size (logical/physical): 512 bytes / 512 bytes
Feb 11 18:42:28 localhost hypriot-firstboot[189]: I/O size (minimum/optimal): 512 bytes / 512 bytes
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Disklabel type: dos
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Disk identifier: 0x00000000
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Device         Boot  Start      End  Sectors  Size Id Type
Feb 11 18:42:28 localhost hypriot-firstboot[189]: /dev/mmcblk0p1        2048   133119   131072   64M  c W95 FAT32 (LBA)
Feb 11 18:42:28 localhost hypriot-firstboot[189]: /dev/mmcblk0p2      133120 15523839 15390720  7.3G 83 Linux
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Command (m for help): Partition number (1,2, default 2):
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Partition 2 has been deleted.
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Command (m for help): Partition type
Feb 11 18:42:28 localhost hypriot-firstboot[189]: p   primary (1 primary, 0 extended, 3 free)
Feb 11 18:42:28 localhost hypriot-firstboot[189]: e   extended (container for logical partitions)
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Select (default p): Partition number (2-4, default 2): First sector (133120-15523839, default 133120): Last sector, +sectors or +size{K,M,G,T,P} (133120-15523839, default 15523839):
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Created a new partition 2 of type 'Linux' and of size 7.3 GiB.
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Command (m for help): Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Units: sectors of 1 * 512 = 512 bytes
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Sector size (logical/physical): 512 bytes / 512 bytes
Feb 11 18:42:28 localhost hypriot-firstboot[189]: I/O size (minimum/optimal): 512 bytes / 512 bytes
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Disklabel type: dos
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Disk identifier: 0x00000000
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Device         Boot  Start      End  Sectors  Size Id Type
Feb 11 18:42:28 localhost hypriot-firstboot[189]: /dev/mmcblk0p1        2048   133119   131072   64M  c W95 FAT32 (LBA)
Feb 11 18:42:28 localhost hypriot-firstboot[189]: /dev/mmcblk0p2      133120 15523839 15390720  7.3G 83 Linux
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Command (m for help): Re-reading the partition table failed.: Device or resource busy
Feb 11 18:42:28 localhost hypriot-firstboot[189]: The partition table has been altered.
Feb 11 18:42:28 localhost hypriot-firstboot[189]: Calling ioctl() to re-read partition table.
Feb 11 18:42:28 localhost hypriot-firstboot[189]: The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ set -e
Feb 11 18:42:28 localhost hypriot-firstboot[189]: ++ partprobe
Feb 11 18:42:30 localhost hypriot-firstboot[189]: ++ /sbin/resize2fs /dev/disk/by-label/root
Feb 11 18:42:30 localhost hypriot-firstboot[189]: resize2fs 1.42.12 (29-Aug-2014)
Feb 11 18:42:30 localhost hypriot-firstboot[189]: The filesystem is already 1923840 (4k) blocks long.  Nothing to do!
Feb 11 18:42:30 localhost hypriot-firstboot[189]: + systemctl disable hypriot-firstboot.service

But there was nothing about the second script 50-regenerate-sshd-host-keys.
And I wondered if sourcing multiple files work.

Test:

mkdir d
echo "echo a" >d/a
echo "echo b" >d/b
source d/*
a

So we have to fix

Question: is it possible to load a docker image at build time?

Hi all,

I tried both "docker pull" and "docker load", to build an image with the container I need, but qemu seems to fail on running go (error below).
Also, a quick google search showed several issues relating the problem.

Was anyone able to achieve this in any other way?

fatal error: rt_sigaction failure

runtime stack:
runtime.throw(0x75e554, 0x14)
        /usr/local/go/src/runtime/panic.go:566 +0x78

Thanks,
Franklin

move udev rules to image-builder-rpi

Move udev rules and other modifications to the hypriot/imagebuilder-rpi repo.
This repo should only provide a base root filesystem for HypriotOS

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.