Debian / raspi3-image-spec

contains the files to build the https://wiki.debian.org/RaspberryPi3 image
127 stars 32 forks source link

Document vmdb2 version requirement #45

Closed praseodym closed 5 years ago

praseodym commented 5 years ago

To get the image to work on a with vmdb2 from Buster I had to change the fstab and kernel cmdline rootfs to use device names instead of partition labels:

diff --git a/fstab b/fstab
index 9d8699b..5dd5a98 100644
--- a/fstab
+++ b/fstab
@@ -1,5 +1,5 @@
 # The root file system has fs_passno=1 as per fstab(5) for automatic fsck.
-LABEL=raspiroot / ext4 rw 0 1
+/dev/mmcblk0p2 / ext4 rw 0 1
 # All other file systems have fs_passno=2 as per fstab(5) for automatic fsck.
-LABEL=raspiboot /boot/firmware vfat rw 0 2
+/dev/mmcblk0p1 /boot/firmware vfat rw 0 2
 proc /proc proc defaults 0 0
diff --git a/raspi3.yaml b/raspi3.yaml
index 579234e..46cd816 100644
--- a/raspi3.yaml
+++ b/raspi3.yaml
@@ -117,12 +120,6 @@ steps:
       apt-get clean
       rm -rf /var/lib/apt/lists

-  # Modify the kernel commandline we take from the firmware to boot from
-  # the partition labeled raspiroot instead of forcing it to mmcblk0p2
-  - chroot: root-fs
-    shell: |
-      sed -i 's/.dev.mmcblk0p2/LABEL=raspiroot/' /boot/firmware/cmdline.txt
-
   # TODO(https://github.com/larswirzenius/vmdb2/issues/24): remove once vmdb
   # clears /etc/resolv.conf on its own.
   - shell: |

Apparently the vmdb2 version in Buster doesn't yet have support for labels in mkfs (1aa73ced0f25cfeddda16a0261b088c6ec32f8a0); there hasn't even been a release of vmdb2 that includes the change. It would be good to have this requirement documented in README.md.

gwolf commented 5 years ago

I want to have the image buildable by a Buster when it's declared stable, but that means I'll have to adopt vmdb2 (its author has already asked me to do so, and I will seriously try to find the time to do it this week). At some point, I added instructions to the README as to how to build from Buster, but as it is, I scrapped it and went back to suggest checking out the Git submodule as the only workable way.