Skip to content

Commit

Permalink
pine64/common: use partuuid for root= parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <christian@aperture.us>
  • Loading branch information
paralin committed Aug 11, 2023
1 parent 53832c1 commit 4bb9cf5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions configs/pine64/common/scripts/install_sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,22 @@ enable_silent() {
fi
}

replace_root_with_uuid() {
persist_partuuid=$(blkid -o value -s PARTUUID ${PINE64_SD_SFX}1)
updated_root="root=PARTUUID=${persist_partuuid}"
echo "Replacing root kernel argument with: ${updated_root}"
sed -i -e "s#root=[^[:space:]]*#${updated_root}#g" $1
}

if [ -n "$boot_conf_extlinux" ]; then
mkdir -p $BOOT_DIR/extlinux
cp -v $boot_conf_extlinux $BOOT_DIR/extlinux/extlinux.conf
replace_root_with_uuid $BOOT_DIR/extlinux/extlinux.conf
else
echo "Compiling boot.txt..."
cp $boot_conf $BOOT_DIR/boot.txt
enable_silent $BOOT_DIR/boot.txt
replace_root_with_uuid $BOOT_DIR/boot.txt
mkimage -A arm -C none -T script -n 'SkiffOS' -d ${BOOT_DIR}/boot.txt ${PERSIST_DIR}/boot.scr
fi

Expand Down

0 comments on commit 4bb9cf5

Please sign in to comment.