26 lines
685 B
Bash
26 lines
685 B
Bash
#!/bin/bash
|
|
|
|
dnf install fsarchiver
|
|
|
|
mkdir -p /mnt/proc /mnt/sys /mnt/dev /mnt/dev/pts /mnt/run
|
|
mount --bind /proc /mnt/proc
|
|
mount --bind /sys /mnt/sys
|
|
mount --bind /dev /mnt/dev
|
|
mount --bind /dev/pts /mnt/dev/pts
|
|
mount --bind /run /mnt/run
|
|
dnf install -y --installroot=/mnt --releasever=41 --use-host-config @core
|
|
dnf install -y --installroot=/mnt --releasever=41 --use-host-config libselinux
|
|
dnf remove -y --installroot=/mnt --releasever=41 --use-host-config zram-generator-defaults
|
|
umount /mnt/proc
|
|
sleep 2
|
|
umount /mnt/sys
|
|
sleep 2
|
|
umount /mnt/dev/pts
|
|
sleep 2
|
|
umount /mnt/dev
|
|
sleep 2
|
|
umount /mnt/run
|
|
sleep 2
|
|
rm -rf /mnt/var/cache/libdnf5
|
|
fsarchiver savedir /tmp/os_template.fsa /mnt
|