better mount dir
This commit is contained in:
@@ -14,8 +14,9 @@ usb_name="/dev/mapper/${disk_suffix}"
|
|||||||
|
|
||||||
# Mount Ventoy
|
# Mount Ventoy
|
||||||
echo "Mounting Ventoy..."
|
echo "Mounting Ventoy..."
|
||||||
mount /dev/mapper/sdb1 /mnt
|
mkdir /mnt/ventoy
|
||||||
cd /mnt/Images
|
mount /dev/mapper/usb_name /mnt/ventoy
|
||||||
|
cd /mnt/ventoy/Images
|
||||||
|
|
||||||
# Decompress and write image
|
# Decompress and write image
|
||||||
echo "Writing image to $disk_name..."
|
echo "Writing image to $disk_name..."
|
||||||
@@ -43,14 +44,15 @@ lvresize -l +100%FREE --resizefs PBX-vg/root
|
|||||||
|
|
||||||
# Mount restored system for chroot
|
# Mount restored system for chroot
|
||||||
echo "Mounting restored system..."
|
echo "Mounting restored system..."
|
||||||
mount /dev/mapper/PBX--vg-root /mnt/
|
mkdir /mnt/debian
|
||||||
mount ${DISKNAME}2 /mnt/boot
|
mount /dev/mapper/PBX--vg-root /mnt/debian/
|
||||||
mount ${DISKNAME}1 /mnt/boot/efi
|
mount ${DISKNAME}2 /mnt/debian/boot
|
||||||
for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do mount -B $i /mnt/$i; done
|
mount ${DISKNAME}1 /mnt/debian/boot/efi
|
||||||
|
for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do mount -B $i /mnt/debian/$i; done
|
||||||
|
|
||||||
# Chroot and reinstall GRUB
|
# Chroot and reinstall GRUB
|
||||||
echo "Entering chroot to reinstall GRUB..."
|
echo "Entering chroot to reinstall GRUB..."
|
||||||
chroot /mnt /bin/bash -c "
|
chroot /mnt/debian /bin/bash -c "
|
||||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian
|
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian
|
||||||
update-grub
|
update-grub
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user