kernel-dualboot-fix

This commit is contained in:
simono41 2018-07-17 18:26:10 +02:00
parent 11841bf92e
commit 6c48085ba3
2 changed files with 979 additions and 958 deletions

View file

@ -201,7 +201,11 @@ function usbsecret() {
function cron() { function cron() {
echo "cron-job snapshot" echo "cron-job snapshot"
mkdir -p ${mountpoint}/var/spool/cron/ mkdir -p ${mountpoint}/var/spool/cron/
if [ "y" == "${windualboot}" ]; then
echo -n "0 18 * * * /usr/bin/snapshot makeboot ROOT home opt var/cache/pacman/pkg " > ${mountpoint}/var/spool/cron/root
else
echo -n "0 18 * * * /usr/bin/snapshot make ROOT home opt var/cache/pacman/pkg " > ${mountpoint}/var/spool/cron/root echo -n "0 18 * * * /usr/bin/snapshot make ROOT home opt var/cache/pacman/pkg " > ${mountpoint}/var/spool/cron/root
fi
# custom-mounts # custom-mounts
for wort in ${mountsnaps} for wort in ${mountsnaps}
@ -1155,11 +1159,16 @@ then
installation installation
grubinstall grubinstall
if [ "y" == "${windualboot}" ]; then
mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
else
if [ "${version}" == "libre" ]; then if [ "${version}" == "libre" ]; then
arch-chroot ${mountpoint} mkinitcpio -p linux-libre arch-chroot ${mountpoint} mkinitcpio -p linux-libre
else else
arch-chroot ${mountpoint} mkinitcpio -P -c /etc/mkinitcpio.conf arch-chroot ${mountpoint} mkinitcpio -P -c /etc/mkinitcpio.conf
fi fi
fi
echo "" echo ""
if [ "${boot}" == "grub" ] if [ "${boot}" == "grub" ]
then then
@ -1188,11 +1197,17 @@ elif [ "${Partition}" == "bios" ]; then
installation installation
grubinstall grubinstall
if [ "y" == "${windualboot}" ]; then
mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
else
if [ "${version}" == "libre" ]; then if [ "${version}" == "libre" ]; then
arch-chroot ${mountpoint} mkinitcpio -p linux-libre arch-chroot ${mountpoint} mkinitcpio -p linux-libre
else else
arch-chroot ${mountpoint} mkinitcpio -P linux -c /etc/mkinitcpio.conf arch-chroot ${mountpoint} mkinitcpio -P linux -c /etc/mkinitcpio.conf
fi fi
fi
echo ""
arch-chroot ${mountpoint} grub-install --target=i386-pc --recheck ${device} arch-chroot ${mountpoint} grub-install --target=i386-pc --recheck ${device}
arch-chroot ${mountpoint} grub-mkconfig -o /boot/grub/grub.cfg arch-chroot ${mountpoint} grub-mkconfig -o /boot/grub/grub.cfg
#removeinstaller #removeinstaller

View file

@ -9,7 +9,11 @@ if [[ $EUID -ne 0 ]]; then
fi fi
echo "Als root Angemeldet" echo "Als root Angemeldet"
if [ "make" == "$1" ]; then if [ "makeboot" == "$1" ]; then
makeboot=y
fi
if [ "make" == "$1" ] || [ "makeboot" == "y" ]; then
while (( "$(expr $# - 1)" )) while (( "$(expr $# - 1)" ))
do do
@ -43,6 +47,7 @@ if [ "make" == "$1" ]; then
cp /etc/fstab.example /etc/fstab cp /etc/fstab.example /etc/fstab
fi fi
if [ "makeboot" == "y" ]; then
#stable-snapshot-boot #stable-snapshot-boot
if [ -f "/boot/arch-uefi.conf.example" ] && [ "${rootsnapshot}" == "y" ]; then if [ -f "/boot/arch-uefi.conf.example" ] && [ "${rootsnapshot}" == "y" ]; then
@ -64,6 +69,7 @@ s|rootflags=subvol=__current/ROOT|rootflags=subvol=__snapshot/ROOT@`head -n 1 /r
fi fi
fi
elif [ "restore" == "$1" ]; then elif [ "restore" == "$1" ]; then