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