new tweaks
This commit is contained in:
@@ -39,6 +39,8 @@ nics=`dialog --separate-output --no-cancel --no-items --title "Network devices f
|
|||||||
|
|
||||||
rootpassword=`dialog --no-cancel -title "Root password" --passwordbox "Enter root password" $height $width 2>&1 1>/dev/tty`
|
rootpassword=`dialog --no-cancel -title "Root password" --passwordbox "Enter root password" $height $width 2>&1 1>/dev/tty`
|
||||||
|
|
||||||
|
timezone=`dialog --no-cancel --title "Timezone" --inputbox "Enter time zone" $height $width "America/Los_Angeles" 2>&1 1>/dev/tty`
|
||||||
|
|
||||||
|
|
||||||
for disk in `echo "$disks"`; do
|
for disk in `echo "$disks"`; do
|
||||||
# remove echo for testing
|
# remove echo for testing
|
||||||
@@ -132,7 +134,12 @@ echo "Done."
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Setting default apt repositories"
|
echo "Setting default apt repositories"
|
||||||
echo "deb http://archive.ubuntu.com/ubuntu bionic main universe\ndeb-src http://archive.ubuntu.com/ubuntu bionic main universe\ndeb http://security.ubuntu.com/ubuntu bionic-security main universe\ndeb-src http://security.ubuntu.com/ubuntu bionic-security main universe\ndeb http://archive.ubuntu.com/ubuntu bionic-updates main universe\ndeb-src http://archive.ubuntu.com/ubuntu bionic-updates main universe" > /mnt/etc/apt/sources.list
|
echo "deb http://archive.ubuntu.com/ubuntu bionic main universe" > /mnt/etc/apt/sources.list
|
||||||
|
echo "deb-src http://archive.ubuntu.com/ubuntu bionic main universe" >> /mnt/etc/apt/sources.list
|
||||||
|
echo "deb http://security.ubuntu.com/ubuntu bionic-security main universe" >> /mnt/etc/apt/sources.list
|
||||||
|
echo "deb-src http://security.ubuntu.com/ubuntu bionic-security main universe" >> /mnt/etc/apt/sources.list
|
||||||
|
echo "deb http://archive.ubuntu.com/ubuntu bionic-updates main universe" >> /mnt/etc/apt/sources.list
|
||||||
|
echo "deb-src http://archive.ubuntu.com/ubuntu bionic-updates main universe" >> /mnt/etc/apt/sources.list
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
# you really need static config here too!
|
# you really need static config here too!
|
||||||
@@ -144,7 +151,7 @@ echo "network:" > /mnt/etc/netplan/bridge.yaml
|
|||||||
echo " version: 2" >> /mnt/etc/netplan/bridge.yaml
|
echo " version: 2" >> /mnt/etc/netplan/bridge.yaml
|
||||||
echo " renderer: networkd" >> /mnt/etc/netplan/bridge.yaml
|
echo " renderer: networkd" >> /mnt/etc/netplan/bridge.yaml
|
||||||
echo " ethernets:" >> /mnt/etc/netplan/bridge.yaml
|
echo " ethernets:" >> /mnt/etc/netplan/bridge.yaml
|
||||||
for nic in "$nicdevices"; do
|
for nic in "$nics"; do
|
||||||
echo " ${nic}:" >> /mnt/etc/netplan/bridge.yaml
|
echo " ${nic}:" >> /mnt/etc/netplan/bridge.yaml
|
||||||
echo " dhcp4: no" >> /mnt/etc/netplan/bridge.yaml
|
echo " dhcp4: no" >> /mnt/etc/netplan/bridge.yaml
|
||||||
done
|
done
|
||||||
@@ -155,7 +162,7 @@ echo " dhcp4: yes" >> /mnt/etc/netplan/bridge.yaml
|
|||||||
echo " parameters:" >> /mnt/etc/netplan/bridge.yaml
|
echo " parameters:" >> /mnt/etc/netplan/bridge.yaml
|
||||||
echo " stp: true" >> /mnt/etc/netplan/bridge.yaml
|
echo " stp: true" >> /mnt/etc/netplan/bridge.yaml
|
||||||
echo " interfaces:" >> /mnt/etc/netplan/bridge.yaml
|
echo " interfaces:" >> /mnt/etc/netplan/bridge.yaml
|
||||||
for nic in `echo "$nicdevices"`; do
|
for nic in `echo "$nics"`; do
|
||||||
echo " - ${nic}" >> /mnt/etc/netplan/bridge.yaml
|
echo " - ${nic}" >> /mnt/etc/netplan/bridge.yaml
|
||||||
done
|
done
|
||||||
echo "Done."
|
echo "Done."
|
||||||
@@ -168,15 +175,7 @@ mount --rbind /sys /mnt/sys
|
|||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
echo "Entering chroot..."
|
echo "Entering chroot..."
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "#! /bin/bash" > /mnt/setup-chroot.sh
|
echo "#! /bin/bash" > /mnt/setup-chroot.sh
|
||||||
|
|
||||||
echo "echo \"\"" >> /mnt/setup-chroot.sh
|
echo "echo \"\"" >> /mnt/setup-chroot.sh
|
||||||
echo "echo \"Mounting /proc/self/mounts...\"" >> /mnt/setup-chroot.sh
|
echo "echo \"Mounting /proc/self/mounts...\"" >> /mnt/setup-chroot.sh
|
||||||
echo "ln -s /proc/self/mounts /etc/mtab" >> /mnt/setup-chroot.sh
|
echo "ln -s /proc/self/mounts /etc/mtab" >> /mnt/setup-chroot.sh
|
||||||
@@ -191,10 +190,11 @@ echo "fi">> /mnt/setup-chroot.sh
|
|||||||
echo "echo \"Done.\"">> /mnt/setup-chroot.sh
|
echo "echo \"Done.\"">> /mnt/setup-chroot.sh
|
||||||
echo "echo \"\"">> /mnt/setup-chroot.sh
|
echo "echo \"\"">> /mnt/setup-chroot.sh
|
||||||
echo "echo \"Setting locale...\"" >> /mnt/setup-chroot.sh
|
echo "echo \"Setting locale...\"" >> /mnt/setup-chroot.sh
|
||||||
echo "echo 'LANG=\"en_US.UTF-8\"' > /etc/default/locale" >> /mnt/setup-chroot.sh
|
echo "locale-gen en_US.UTF-8" >> /mnt/setup-chroot.sh
|
||||||
echo "echo 'LANGUAGE=\"en_US:en\"' >> /etc/default/locale">> /mnt/setup-chroot.sh
|
#echo "echo 'LANG=\"en_US.UTF-8\"' > /etc/default/locale" >> /mnt/setup-chroot.sh
|
||||||
|
#echo "echo 'LANGUAGE=\"en_US:en\"' >> /etc/default/locale">> /mnt/setup-chroot.sh
|
||||||
echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
||||||
#dpkg-reconfigure tzdata
|
echo "cp /usr/share/zoneinfo/$timezone /etc/localtime" >> /mnt/setup-chroot.sh
|
||||||
echo "apt install -y --no-install-recommends linux-image-generic" >> /mnt/setup-chroot.sh
|
echo "apt install -y --no-install-recommends linux-image-generic" >> /mnt/setup-chroot.sh
|
||||||
echo "apt-add-repository universe && apt update" >> /mnt/setup-chroot.sh
|
echo "apt-add-repository universe && apt update" >> /mnt/setup-chroot.sh
|
||||||
echo "apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server">> /mnt/setup-chroot.sh
|
echo "apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server">> /mnt/setup-chroot.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user