fix chroot

This commit is contained in:
Ward from fusion-voyager-3 2023-10-20 19:38:49 +03:00
parent 01dbb44974
commit da5921a312
3 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
pikainstall (1.0.4-100pika1) pikauwu; urgency=medium pikainstall (1.0.5-100pika1) pikauwu; urgency=medium
* Initial release. * Initial release.

View File

@ -6,8 +6,9 @@
mount --rbind /proc "$1"/proc mount --rbind /proc "$1"/proc
mount --rbind /sys "$1"/sys mount --rbind /sys "$1"/sys
mount --rbind /run "$1"/run mount --rbind /run "$1"/run
rm -rfv "$1"/boot/*arch*
mkdir -p "$1"/var/cache/apt/archives mkdir -p "$1"/var/cache/apt/archives
cp -rvf /cdrom/pool/main/* "$1"/var/cache/apt/archives/ cp -rvf /cdrom/pool/main/* "$1"/var/cache/apt/archives/
genfstab -U "$1" > "$1"/etc/fstab genfstab -U "$1" > "$1"/etc/fstab
cat "$1"/etc/fstab | grep -v zram > "$1"/etc/fstab cat "$1"/etc/fstab | grep -v zram > "$1"/etc/fstab
chroot /chroot_dir /bin/bash -c "su - -c /usr/lib/pika/pikainstall/pika-install-chroot.sh" chroot "$1" /bin/bash -c "su - -c /usr/lib/pika/pikainstall/pika-install-chroot.sh"

View File

@ -6,7 +6,7 @@ import subprocess
import os import os
# Version # Version
version="1.0.4" version="1.0.5"
dist="PikaOS 3" dist="PikaOS 3"
image="/cdrom/casper/filesystem.squashfs" image="/cdrom/casper/filesystem.squashfs"
@ -78,7 +78,7 @@ else:
## Boot UUID ## Boot UUID
boot_uuid_command= subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'uuid'] + args.boot, stdout=subprocess.PIPE, stderr=subprocess.PIPE) boot_uuid_command= subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'uuid'] + args.boot, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
## Print Boot ## Print Boot
boot_uuid = boot_uuid_command.stdout.readline().decode("utf-8").strip() boot_uuid = boot_uuid_command.stdout.readline().d rm -rfv "$1"/boot/*arch*ecode("utf-8").strip()
print("\nBoot UUID: {}".format(boot_uuid)) print("\nBoot UUID: {}".format(boot_uuid))
# Get EFI info # Get EFI info
## EFI UUID ## EFI UUID