new_feautures+fixes

This commit is contained in:
simono41 2018-07-29 05:19:08 +02:00
parent 47e64888ff
commit a3aed939fa

View file

@ -162,7 +162,7 @@ function partitioniere() {
sgdisk -a 2048 -n ${bootpartitionnummer: -1}::+1024K -c ${bootpartitionnummer: -1}:"BIOS Boot Partition" -t ${bootpartitionnummer: -1}:ef02 ${device} sgdisk -a 2048 -n ${bootpartitionnummer: -1}::+1024K -c ${bootpartitionnummer: -1}:"BIOS Boot Partition" -t ${bootpartitionnummer: -1}:ef02 ${device}
sgdisk -a 2048 -n ${efipartitionnummer: -1}::+1G -c ${efipartitionnummer: -1}:"EFI Boot Partition" -t ${efipartitionnummer: -1}:ef00 ${device} sgdisk -a 2048 -n ${efipartitionnummer: -1}::+1G -c ${efipartitionnummer: -1}:"EFI Boot Partition" -t ${efipartitionnummer: -1}:ef00 ${device}
if [ "${swap}" != "n" ]; then if [ "${swap}" != "n" ]; then
sgdisk -a 2048 -n ${swappartitionnummer: -1}::+8G -c ${swappartitionnummer: -1}:"Linux swap" -t ${swappartitionnummer: -1}:8200 ${device} sgdisk -a 2048 -n ${swappartitionnummer: -1}::+${swapspeicher} -c ${swappartitionnummer: -1}:"Linux swap" -t ${swappartitionnummer: -1}:8200 ${device}
fi fi
sgdisk -a 2048 -n ${rootpartitionnummer: -1}:: -c ${rootpartitionnummer: -1}:"Linux filesystem" -t ${rootpartitionnummer: -1}:8300 ${device} sgdisk -a 2048 -n ${rootpartitionnummer: -1}:: -c ${rootpartitionnummer: -1}:"Linux filesystem" -t ${rootpartitionnummer: -1}:8300 ${device}
@ -170,7 +170,7 @@ function partitioniere() {
sgdisk -a 2048 -n ${bootpartitionnummer}::+1024K -c ${bootpartitionnummer}:"BIOS Boot Partition" -t ${bootpartitionnummer}:ef02 ${device} sgdisk -a 2048 -n ${bootpartitionnummer}::+1024K -c ${bootpartitionnummer}:"BIOS Boot Partition" -t ${bootpartitionnummer}:ef02 ${device}
sgdisk -a 2048 -n ${efipartitionnummer}::+1G -c ${efipartitionnummer}:"EFI Boot Partition" -t ${efipartitionnummer}:ef00 ${device} sgdisk -a 2048 -n ${efipartitionnummer}::+1G -c ${efipartitionnummer}:"EFI Boot Partition" -t ${efipartitionnummer}:ef00 ${device}
if [ "${swap}" != "n" ]; then if [ "${swap}" != "n" ]; then
sgdisk -a 2048 -n ${swappartitionnummer}::+8G -c ${swappartitionnummer}:"Linux swap" -t ${swappartitionnummer}:8200 ${device} sgdisk -a 2048 -n ${swappartitionnummer}::+${swapspeicher} -c ${swappartitionnummer}:"Linux swap" -t ${swappartitionnummer}:8200 ${device}
fi fi
sgdisk -a 2048 -n ${rootpartitionnummer}:: -c ${rootpartitionnummer}:"Linux filesystem" -t ${rootpartitionnummer}:8300 ${device} sgdisk -a 2048 -n ${rootpartitionnummer}:: -c ${rootpartitionnummer}:"Linux filesystem" -t ${rootpartitionnummer}:8300 ${device}
@ -895,6 +895,9 @@ function abfrage() {
read -p "Do you want to create a swap partition? : [Y/n] " swap read -p "Do you want to create a swap partition? : [Y/n] " swap
if [ "${swap}" != "n" ]; then if [ "${swap}" != "n" ]; then
read -p "Do you want create your swap with : [2G/4G/8G/16G] " swapspeicher
[[ -z "${swapspeicher}" ]] && swapspeicher=8G
echo "WARNING with a encrypted Swap disk you cant go in the hibernate-modus!!!" echo "WARNING with a encrypted Swap disk you cant go in the hibernate-modus!!!"
read -p "Should the Swap disk be encrypted? : [y/N] " swapverschluesselung read -p "Should the Swap disk be encrypted? : [y/N] " swapverschluesselung
[[ -z "${swapverschluesselung}" ]] && swapverschluesselung=n [[ -z "${swapverschluesselung}" ]] && swapverschluesselung=n
@ -903,20 +906,19 @@ function abfrage() {
read -p "Do you want to create a swapfile? : [y/N] " swapfile read -p "Do you want to create a swapfile? : [y/N] " swapfile
if [ "${swapfile}" == "y" ]; then if [ "${swapfile}" == "y" ]; then
read -p "Do you want create your swapfile with : [2G/4G/8G/16G] " swapfilespeicher read -p "Do you want create your swapfile with : [2G/4G/8G/16G] " swapfilespeicher
[[ -z "${swapfilespeicher}" ]] && swapfilespeicher=8G
fi fi
# if [ "${update}" != "n" ]; then echo "WARNING the system is not encrypted !!!"
# echo "WARNING The system will not start without the USB stick !!!"
# echo "WARNING the system is not encrypted !!!" read -p "Should a USB stick be installed as the key for the system? : [y/N] " usbsecret
# echo "WARNING The system will not start without the USB stick !!!" if [ "${usbsecret}" == "y" ]; then
# read -p "Should a USB stick be installed as the key for the system? : [y/N] " usbsecret read -p "Which USB stick should be selected for the USB-secret key ?: /dev/sdb1 " usbsecretdevice
# if [ "${usbsecret}" == "y" ]; then [[ -z "${usbsecretdevice}" ]] && device=/dev/sdb1
# read -p "Which USB stick should be selected for the USB-secret key ?: /dev/sdb1 " usbsecretdevice usbsecretdeviceuuid=$(blkid -s PARTUUID -o value ${usbsecretdevice})
# [[ -z "${usbsecretdevice}" ]] && device=/dev/sdb1 [[ -z "${usbsecretdeviceuuid}" ]] && mkfs.ext4 ${usbsecretdevice}
# usbsecretdeviceuuid=$(blkid -s PARTUUID -o value ${usbsecretdevice}) fi
# [[ -z "${usbsecretdeviceuuid}" ]] && mkfs.ext4 ${usbsecretdevice}
# fi
# fi
if [ "${raid}" == "n" ]; then if [ "${raid}" == "n" ]; then
read -p "Should the hard disk be encrypted? : [y/N] " verschluesselung read -p "Should the hard disk be encrypted? : [y/N] " verschluesselung
@ -935,7 +937,6 @@ function abfrage() {
# berechnungen # berechnungen
# if [ "${update}" != "n" ]; then
read -p "Should an offline installation be carried out? : [Y/n] " offline read -p "Should an offline installation be carried out? : [Y/n] " offline
if [ "${offline}" != "n" ] if [ "${offline}" != "n" ]
then then
@ -943,9 +944,6 @@ function abfrage() {
else else
install="online" install="online"
fi fi
# else
# install="offline"
# fi
read -p "Should you an disk added to your fstab? : [y/N] " autodisk read -p "Should you an disk added to your fstab? : [y/N] " autodisk
if [ "${autodisk}" == "y" ] if [ "${autodisk}" == "y" ]
@ -1001,10 +999,9 @@ function abfrage() {
echo "Hard Drives: ${device1}" echo "Hard Drives: ${device1}"
fi fi
echo "File system: ${dateisystem}" echo "File system: ${dateisystem}"
#echo "System-Partition ${speicher}" if [ "${swap}" != "n" ]; then
#if [ "${swap}" != "n" ]; then echo "Swap-partition ${swapspeicher}"
# echo "Swap-partition ${swapspeicher}" fi
#fi
if [ "${swapfile}" == "y" ]; then if [ "${swapfile}" == "y" ]; then
echo "Swapfile ${swapfilespeicher}" echo "Swapfile ${swapfilespeicher}"
fi fi
@ -1017,9 +1014,6 @@ function abfrage() {
echo "Snapshot ${wort} wird erstellt!!!" echo "Snapshot ${wort} wird erstellt!!!"
done done
fi fi
#if [ "${openvpn}" != "n" ]; then
# echo "VPN-Verschlüsselung: aktiv"
#fi
if [ "${usbsecret}" == "y" ]; then if [ "${usbsecret}" == "y" ]; then
echo "USB-secret: aktiv" echo "USB-secret: aktiv"
echo "USB-UIDD: ${usbsecretdeviceuuid}" echo "USB-UIDD: ${usbsecretdeviceuuid}"
@ -1202,15 +1196,15 @@ then
grubinstall grubinstall
#if [ "y" == "${windualboot}" ]; then if [ "y" == "${windualboot}" ]; then
# mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
#else 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 fi
echo "" echo ""
if [ "${boot}" == "grub" ] if [ "${boot}" == "grub" ]
then then
@ -1240,15 +1234,15 @@ elif [ "${Partition}" == "bios" ]; then
grubinstall grubinstall
#if [ "y" == "${windualboot}" ]; then if [ "y" == "${windualboot}" ]; then
# mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
#else 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 fi
echo "" 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