Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a better way of getting the label for alpine #809

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/alpine/collection.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
packages:
- name: "alpine"
category: "initrd"
version: "3.8.1+3"
version: "3.8.1+4"
description: "Provides custom initrd scripts for alpine"
# This syncs with the alpine version at https://gitlab.alpinelinux.org/alpine/mkinitfs/-/blob/master/initramfs-init.in?ref_type=heads
# any changes to the initramfs-init.in file should be looked at and backported if necessary
5 changes: 3 additions & 2 deletions packages/alpine/files/initramfs-init
Original file line number Diff line number Diff line change
Expand Up @@ -395,17 +395,18 @@ if grep -q cdroot /proc/cmdline ;then
rd_break pre-livecd
echo "Mounting Live Media"
sync
label=$(grep -o CDLABEL.* /proc/cmdline | cut -f 1 -d ' ' | cut -f 2 -d '=' )
# Create mountpoints
ebegin "Create mountpoints"
mkdir -p /media/root-ro /media/root-rw /run/rootfsbase $sysroot/media/root-ro $sysroot/media/root-rw $sysroot/run/rootfsbase
eend $?
# Between udev starting, we loading the modules and the cdrom appearing sometimes there is a delay, so lets wait a bit here
ebegin "Waiting for Live Media to be available"
retry 10 test -e /dev/disk/by-label/COS_LIVE
retry 10 test -e /dev/disk/by-label/$label
eend
# Mount read-only livecd
ebegin "Mount Live Media RO"
retry 10 mount /dev/disk/by-label/COS_LIVE /media/root-ro
retry 10 mount /dev/disk/by-label/$label /media/root-ro
eend $?
sync
# Mount squashfs into loop device
Expand Down
Loading