diff --git a/install b/install index 4ca4326..53439e8 100644 --- a/install +++ b/install @@ -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 \ No newline at end of file +bash ~/koffe.is \ No newline at end of file diff --git a/install-box b/install-box index c81a982..2b2ecdc 100755 --- a/install-box +++ b/install-box @@ -6,4 +6,11 @@ wget https://raw.githubusercontent.com/KoNickss/koffe/main/make_iso -P /usr/bin/ chmod +x /usr/bin/make_iso wget https://raw.githubusercontent.com/KoNickss/koffe/main/register2 -P /usr/bin/ chmod +x /usr/bin/register2 -config \ No newline at end of file +mkdir /arch +mkdir /iso +mkdir/arch/temp +mkdir /arch/scripts +mkdir /arch/pkgs +wget https://raw.githubusercontent.com/KoNickss/koffe/main/koffe.is -P /arch/scripts/ +wget https://raw.githubusercontent.com/KoNickss/koffe/main/pi.is -P /arch/scripts/ +wget https://raw.githubusercontent.com/KoNickss/koffe/main/install -P /arch/scripts/ \ No newline at end of file diff --git a/install-host b/install-host new file mode 100644 index 0000000..4ca4326 --- /dev/null +++ b/install-host @@ -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 \ No newline at end of file diff --git a/koffe.is b/koffe.is new file mode 100755 index 0000000..fe9050f --- /dev/null +++ b/koffe.is @@ -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 \ No newline at end of file diff --git a/pi.is b/pi.is new file mode 100644 index 0000000..f7d3fd0 --- /dev/null +++ b/pi.is @@ -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 \ No newline at end of file