parent
5d68dd706f
commit
909be7c168
@ -1,5 +1 @@ |
||||
wget https://raw.githubusercontent.com/KoNickss/koffe/main/arch-chroot -P /usr/share/koffe/ |
||||
chmod +x /usr/share/koffe/arch-chroot |
||||
wget https://raw.githubusercontent.com/KoNickss/koffe/main/koffe-shell -P /usr/bin/ |
||||
chmod +x /usr/bin/koffe-shell |
||||
mkdir /usr/share/koffe/archbox |
||||
bash ~/koffe.is |
||||
@ -0,0 +1,5 @@ |
||||
wget https://raw.githubusercontent.com/KoNickss/koffe/main/arch-chroot -P /usr/share/koffe/ |
||||
chmod +x /usr/share/koffe/arch-chroot |
||||
wget https://raw.githubusercontent.com/KoNickss/koffe/main/koffe-shell -P /usr/bin/ |
||||
chmod +x /usr/bin/koffe-shell |
||||
mkdir /usr/share/koffe/archbox |
||||
@ -0,0 +1,47 @@ |
||||
#!/bin/bash |
||||
whiptail --clear --backtitle "Koffe Offline Arch Installer - made by Konicks(GRI)" --title "Welcome screen" --msgbox "Welcome to Koffe, the offline arch installer, with your permission we'll get started :)" 0 0 |
||||
echo "Unpacking linux and the other stuff:" |
||||
echo '' > /etc/pacman.conf |
||||
echo '[options]' >> /etc/pacman.conf |
||||
echo 'Architecture = auto' >> /etc/pacman.conf |
||||
echo 'SigLevel = Never' >> /etc/pacman.conf |
||||
echo 'LocalFileSigLevel = Never' >> /etc/pacman.conf |
||||
echo '[koffe]' >> /etc/pacman.conf |
||||
echo 'Server = file:///root/pkg' >> /etc/pacman.conf |
||||
repo-add /root/pkg/koffe.db.tar.gz /root/pkg/* |
||||
pacman -Sy |
||||
whiptail --clear --backtitle "Koffe Offline Arch Installer - made by Konicks(GRI)" --title "CFdisk" --msgbox "So, we need to partition the disk. I'll launch cfdisk for you in just a sec, just choose the disk to partition" 0 0 |
||||
lsblk | grep disk | cut -f 1 -d ' ' > drvs |
||||
sed -e 's/$/ disk/' -i drvs |
||||
declare -a disks |
||||
disks=(`cat drvs`) |
||||
drv=$(whiptail --title "Select drive to partition" --menu "Select drive to partition" 16 78 10 "${disks[@]}" 3>&1 1>&2 2>&3 3>&-) |
||||
cfdisk /dev/$drv |
||||
lsblk | grep part | cut -f 1 -d ' ' | cut -c 3- > drvs |
||||
sed -e 's/$/ part/' -i drvs |
||||
declare -a parts |
||||
parts=(`cat drvs`) |
||||
ppart=$(whiptail --title "Select the partiton to install linux to:" --menu "Select the partiton to install linux to (this will wipe the partition):" 16 78 10 "${parts[@]}" 3>&1 1>&2 2>&3 3>&-) |
||||
mkfs.ext4 /dev/$ppart |
||||
mount /dev/$ppart /mnt |
||||
echo no disk >> drvs |
||||
parts=(`cat drvs`) |
||||
pswap=$(whiptail --title "Select the partiton to install swap to:" --menu "Select the partiton to install swap to (no disk if none):" 16 78 10 "${parts[@]}" 3>&1 1>&2 2>&3 3>&-) |
||||
mkswap /dev/$pswap |
||||
swapon /dev/$pswap |
||||
pefi=$(whiptail --title "Select the partiton to install EFI to:" --menu "Select the partiton to install EFI to (no disk if you have legacy bios):" 16 78 10 "${parts[@]}" 3>&1 1>&2 2>&3 3>&-) |
||||
mkdir /mnt/boot |
||||
mkfs.fat -F32 /dev/$pefi |
||||
mount /dev/$pefi /mnt/boot |
||||
extraparts=$(whiptail --inputbox "If you want to mount any other partition manually, enter the commands here like this: command 1 ; command 2 ; command 3" 0 0 0 3>&1 1>&2 2>&3 3>&-) |
||||
echo $extraparts > coms |
||||
bash coms |
||||
whiptail --clear --backtitle "Koffe Offline Arch Installer - made by Konicks(GRI)" --title "Initial setup ready" --msgbox "Well, that was it for the initial setup, now press ok, grab a cup of coffee and wait for linux to install. Be sure to stick around for the post-install configurations tho." 0 0 |
||||
#to implement extras file |
||||
pacstrap /mnt - < install.list |
||||
cp pi.is /mnt/root/ |
||||
echo 'bash /root/pi.is' > /mnt/root/.bashrc |
||||
echo 'echo "" > /root/.bashrc' >> /mnt/root/.bashrc |
||||
arch-chroot /mnt |
||||
whiptail --clear --backtitle "Koffe Offline Arch Installer - made by Konicks(GRI)" --title "Goodbye screen" --msgbox "Well, that was everything. I'll reboot the system for you" 0 0 |
||||
reboot |
||||
@ -0,0 +1,69 @@ |
||||
systemctl enable NetworkManager |
||||
systemctl enable sddm.service |
||||
systemctl enable gdm.service |
||||
systemctl enable lightdm |
||||
whiptail --clear --backtitle "Koffe Offline Arch Installer - made by Konicks(GRI)" --title "Finishing setup" --msgbox "Well, linux is installed (kinda), let's go through the final setup and configure it a bit" 0 0 |
||||
cd /usr/share/zoneinfo |
||||
echo */ | tr " " "\n" > ~/reg |
||||
sed -e 's/$/ region/' -i ~/reg |
||||
declare -a regs |
||||
regs=(`cat ~/reg`) |
||||
region_vague=$(whiptail --title "Finishing setup" --menu "Let's start with the region, select your region from below" 0 0 0 "${regs[@]}" 3>&1 1>&2 2>&3 3>&-) |
||||
echo $region_vague |
||||
cd /usr/share/zoneinfo/$region_vague |
||||
echo * | tr " " "\n" > ~/reg |
||||
sed -e 's/$/ region/' -i ~/reg |
||||
declare -a regs |
||||
regs=(`cat ~/reg`) |
||||
region_close=$(whiptail --title "Finishing setup" --menu "Select your city from below" 0 0 0 "${regs[@]}" 3>&1 1>&2 2>&3 3>&-) |
||||
ln -sf /usr/share/zoneinfo/$region_vague/$region_close /etc/localtime |
||||
hwclock --systohc |
||||
touch /etc/locale.conf |
||||
echo "LANG=en_US.UTF-8" > /etc/locale.conf |
||||
echo en_US.UTF-8 UTF-8 >> /etc/locale.gen |
||||
rm ~/reg |
||||
locale-gen |
||||
cd / |
||||
myhostname=$(whiptail --inputbox "Now choose a name for your computer" 0 0 4 3>&1 1>&2 2>&3 3>&-) |
||||
echo "127.0.0.1 localhost |
||||
::1 localhost |
||||
127.0.1.1 $myhostname.localdomain $myhostname" > /etc/hosts |
||||
echo "$myhostname" > /etc/hostname |
||||
archit=$(whiptail --backtitle "Koffe" --title "Architecture selector" --menu "Choose the bit count of your x86 chip" 0 0 4 \ |
||||
64 "BIT" \ |
||||
32 "BIT" 3>&1 1>&2 2>&3 3>&-) |
||||
efiornot=$(whiptail --backtitle "Koffe" --title "Boot selector" --menu "Is your soon-to-be-arch computer legacy or EUFI?" 0 0 4 \ |
||||
1 "Bios/Legacy" \ |
||||
2 "UEFI" 3>&1 1>&2 2>&3 3>&-) |
||||
pacman -S grub |
||||
if [[ "$efiornot" == "2" ]] |
||||
then |
||||
if [[ "$archit" == "64" ]] |
||||
then |
||||
grub-install --target=x86_64-efi --efi-directory=/boot |
||||
grub-mkconfig -o /boot/grub/grub.cfg |
||||
fi |
||||
if [[ "$archit" == "32" ]] |
||||
then |
||||
grub-install --target=i386-efi --efi-directory=/boot |
||||
grub-mkconfig -o /boot/grub/grub.cfg |
||||
fi |
||||
fi |
||||
if [[ "$efiornot" == "1" ]] |
||||
then |
||||
lsblk | grep disk | cut -f 1 -d ' ' > ~/drvs |
||||
sed -e 's/$/ disk/' -i ~/drvs |
||||
declare -a lname |
||||
disks=(`cat ~/drvs`) |
||||
lname=$(whiptail --title "Select drive to install grub to" --menu "Select drive to install grub to" 16 78 10 "${disks[@]}" 3>&1 1>&2 2>&3 3>&-) |
||||
grub-install --recheck /dev/$lname |
||||
grub-mkconfig -o /boot/grub/grub.cfg |
||||
fi |
||||
clear |
||||
echo Now choose a root password |
||||
passwd |
||||
myusername1=$(whiptail --inputbox "Now lets create a user, pick a username: " 0 0 4 3>&1 1>&2 2>&3 3>&-) |
||||
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers |
||||
useradd -m -G wheel $myusername1 |
||||
echo "and a password" |
||||
passwd $myusername1 |
||||
Loading…
Reference in new issue