mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-15 21:42:27 +00:00
Make backup in zz-update-boot.
This commit is contained in:
@@ -5,6 +5,8 @@ set -e
|
||||
BOOT_PART="/boot/efi"
|
||||
KVER="$1"
|
||||
[ -z "$KVER" ] && KVER="$(ls -1t /lib/modules | head -1)"
|
||||
cp "/boot/vmlinuz-$KVER" "$BOOT_PART/bzImage"
|
||||
cp "/boot/initrd.img-$KVER" "$BOOT_PART/initrd.img"
|
||||
mv "$BOOT_PART/bzImage" "$BOOT_PART/bzImage.old"
|
||||
mv "$BOOT_PART/initrd.img" "$BOOT_PART/initrd.img.old"
|
||||
cp "/boot/vmlinuz-$KVER" "$BOOT_PART/bzImage"
|
||||
cp "/boot/initrd.img-$KVER" "$BOOT_PART/initrd.img"
|
||||
echo ">> Kernel $KVER deployed to $BOOT_PART"
|
||||
|
||||
@@ -9,11 +9,14 @@ KVER="$1"
|
||||
DISTRO="unknown"
|
||||
[ -f /etc/ps5-distro ] && DISTRO="$(cat /etc/ps5-distro)"
|
||||
|
||||
cp "/boot/vmlinuz-$KVER" "$BOOT_PART/bzImage"
|
||||
cp "/boot/initrd.img-$KVER" "$BOOT_PART/initrd-${DISTRO}.img"
|
||||
mv "$BOOT_PART/bzImage" "$BOOT_PART/bzImage.old"
|
||||
mv "$BOOT_PART/initrd-${DISTRO}.img" "$BOOT_PART/initrd-${DISTRO}.img.old"
|
||||
cp "/boot/vmlinuz-$KVER" "$BOOT_PART/bzImage"
|
||||
cp "/boot/initrd.img-$KVER" "$BOOT_PART/initrd-${DISTRO}.img"
|
||||
|
||||
# Ubuntu 26.04 is default boot — also update the generic initrd.img
|
||||
if [ "$DISTRO" = "ubuntu2604" ]; then
|
||||
mv "$BOOT_PART/initrd.img" "$BOOT_PART/initrd.img.old"
|
||||
cp "/boot/initrd.img-$KVER" "$BOOT_PART/initrd.img"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user