apt install linux fuckery
This commit is contained in:
+6
-5
@@ -14,7 +14,7 @@ NO_CLEANUP=false
|
||||
IMG_FILE="PBX-root.img.lz4"
|
||||
|
||||
MOUNT_PATH="/mnt/debian"
|
||||
MOUNT_POINTS=("/dev" "/dev/pts" "/proc" "/sys" "/sys/firmware/efi/efivars" "/run")
|
||||
MOUNT_POINTS=("/dev" "/dev/pts" "/proc" "/sys" "/run")
|
||||
|
||||
BOOT_PART="NULL"
|
||||
EFI_PART="NULL"
|
||||
@@ -201,13 +201,14 @@ mount_chroot() {
|
||||
echo "Mounting restored system..."
|
||||
|
||||
mkdir -p "${MOUNT_PATH}/boot"
|
||||
mkdir -p "${MOUNT_PATH}/boot/efi"
|
||||
#for i in "${MOUNT_POINTS[@]}"; do mkdir -p "${MOUNT_PATH}${i}"; done
|
||||
|
||||
mount "${VG_PATH}${ROOT_LV}" $MOUNT_PATH
|
||||
mount $BOOT_PART "${MOUNT_PATH}/boot"
|
||||
|
||||
mkdir -p "${MOUNT_PATH}/boot/efi"
|
||||
mount $EFI_PART "${MOUNT_PATH}/boot/efi"
|
||||
|
||||
for i in "${MOUNT_POINTS[@]}"; do mount --bind $i "${MOUNT_PATH}${i}"; done
|
||||
for i in "${MOUNT_POINTS[@]}"; do mount --bind -m "$i" "${MOUNT_PATH}${i}"; done
|
||||
|
||||
echo -e "${GREEN}Mounts prepared for chroot.${RESET}"
|
||||
}
|
||||
@@ -229,7 +230,7 @@ gen_fstab() {
|
||||
install_grub() {
|
||||
echo "Entering chroot to reinstall GRUB..."
|
||||
|
||||
CHROOT_LINUX_INSTALL="dpkg -i /var/cache/apt/archives/linux-image-amd64_6.1.164-1_amd64.deb"
|
||||
CHROOT_LINUX_INSTALL="apt install --reinstall -y linux-image-6.1.0-44-amd64"
|
||||
CHROOT_INITRAMFS="update-initramfs -u -k all"
|
||||
CHROOT_GRUB_INSTALL="grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian"
|
||||
CHROOT_GRUB_UPDATE="update-grub"
|
||||
|
||||
Reference in New Issue
Block a user