Compare commits
71 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c839b6bbf3 | ||
|
77dcbafc80 | ||
|
d9879d3d55 | ||
|
5b2fe128ab | ||
|
6be3d2343e | ||
|
c1c37bbecf | ||
|
97e0f92e77 | ||
|
140bb273d9 | ||
|
ba3a509403 | ||
|
ae6ca63711 | ||
|
5841c57d71 | ||
|
b4281e8e74 | ||
|
690bc54606 | ||
|
2e07d01843 | ||
|
58d4f78a92 | ||
|
c2d26a1f01 | ||
|
bc13ac0712 | ||
|
039d2db196 | ||
|
5635e9efac | ||
|
257067a67f | ||
|
17741369fd | ||
|
6d105d17d2 | ||
|
cb675e878e | ||
|
36b69a7e44 | ||
|
b832df461d | ||
|
8ccf3bf899 | ||
|
5e95159f18 | ||
|
b8b7673ac9 | ||
|
198f62c1fc | ||
|
65b74e5279 | ||
|
ec371ee383 | ||
|
c5bae37f33 | ||
|
9b7374f768 | ||
|
f7980310dc | ||
|
c52b6171ea | ||
|
af9eda2a85 | ||
|
3df47e621d | ||
|
470cf15208 | ||
|
8f054d1d2d | ||
|
2d3fbc04d6 | ||
|
e61c0f7df8 | ||
|
5c6d1322e0 | ||
|
edda8ff56f | ||
|
f7b9089707 | ||
|
289f248c09 | ||
|
928df65190 | ||
|
4c4b8b624c | ||
|
3fcf5a6a96 | ||
|
51af650e99 | ||
|
ba1e4bff49 | ||
|
955ec704e8 | ||
|
66b6451532 | ||
|
a3bd9823ee | ||
|
5d8275c9cf | ||
|
09e0574dba | ||
|
1c8fe0e0bc | ||
|
9b0e2b66c4 | ||
|
501a8cd164 | ||
|
e2d707ad80 | ||
|
7737c3c652 | ||
|
925741f12b | ||
|
66affd78c0 | ||
|
a5d2622f67 | ||
|
50aa19f459 | ||
|
e5707bb776 | ||
|
d79bd42091 | ||
|
5edbaf9f79 | ||
|
d27a676a8a | ||
|
93273b4f7f | ||
|
5c1282e94c | ||
|
d08797d043 |
@ -4,9 +4,9 @@ ping -c 1 archlinux.org 2>/tmp/arch-maride-flavour_checks_internet_error.log 1>/
|
||||
return=$?
|
||||
|
||||
if [ "$return" -eq 0 ]; then
|
||||
exit 0
|
||||
amf_return=0
|
||||
else
|
||||
echo "~> Either internet is unavailable or archlinux.org is down..."
|
||||
echo "~> (ping returned $return. Maybe check the logs in /tmp."
|
||||
exit 1
|
||||
amf_return=1
|
||||
fi
|
||||
|
21
checks/packeys.check
Executable file
21
checks/packeys.check
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
amf_return=0
|
||||
|
||||
echo " We can force to fetch PGP keys via HTTP over 80/tcp."
|
||||
echo " You probably don't want this unless your internet connection is heavily filtered."
|
||||
echo -n "=> Is your internet connection filtered (e.g. company network)? (y/N)"
|
||||
read answer
|
||||
|
||||
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
|
||||
echo " Ugh. Poor bastard, you."
|
||||
keyserver="hkp://p80.pool.sks-keyservers.net:80"
|
||||
else
|
||||
keyserver="hkp://pool.sks-keyservers.net"
|
||||
fi
|
||||
|
||||
echo " Fetching via $keyserver"
|
||||
|
||||
dirmngr &
|
||||
pacman-key --populate --keyserver $keyserver || amf_return=1
|
||||
pacman-key --refresh-keys --keyserver $keyserver || amf_return=1
|
@ -1,11 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
ls /sys/firmware/efi/efivars 2>/tmp/arch-maride-flavour_checks_uefi_error.log 1>/tmp/arch-maride-flavour_checks_uefi_out.log
|
||||
return=$?
|
||||
|
||||
if [ "$return" -eq 0 ]; then
|
||||
exit 0
|
||||
if [ "$bootloader" == "BIOS" ]; then
|
||||
echo "~> Not an EFI host, not checking for EFI."
|
||||
amf_return=0
|
||||
else
|
||||
echo "~> This doesn't seem to be an UEFI boot. Please boot UEFI."
|
||||
exit 1
|
||||
ls /sys/firmware/efi/efivars 2>/tmp/arch-maride-flavour_checks_uefi_error.log 1>/tmp/arch-maride-flavour_checks_uefi_out.log
|
||||
return=$?
|
||||
|
||||
if [ "$return" -eq 0 ]; then
|
||||
amf_return=0
|
||||
else
|
||||
echo "~> This doesn't seem to be an UEFI boot. Please boot UEFI."
|
||||
amf_return=1
|
||||
fi
|
||||
fi
|
||||
|
10
flavours/cpu.flavour/install.sh
Executable file
10
flavours/cpu.flavour/install.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Installing thermald cpupower"
|
||||
pacstrap /mnt thermald cpupower
|
||||
echo " Setting 'ondemand' governor"
|
||||
arch-chroot /mnt cpupower frequency-set -g ondemand
|
||||
echo " Start cpupower on boot"
|
||||
arch-chroot /mnt systemctl enable cpupower
|
||||
|
||||
amf_return=0
|
18
flavours/i3.flavour/install.sh
Executable file
18
flavours/i3.flavour/install.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Installing i3"
|
||||
pacstrap /mnt i3 feh compton dmenu acpi
|
||||
|
||||
user=$(ls /mnt/home)
|
||||
if [ "$user" == "" ]; then
|
||||
path="/mnt/etc/skel/"
|
||||
else
|
||||
path="/mnt/home/$user/"
|
||||
fi
|
||||
|
||||
echo "~> Creating .xinitrc"
|
||||
echo "compton -CGb" > $path/.xinitrc
|
||||
echo "feh --bg-fill /etc/wallpapers/\$(ls /etc/wallpapers/ | shuf -n 1)" >> $path/.xinitrc
|
||||
echo "exec i3" >> $path/.xinitrc
|
||||
|
||||
amf_return=0
|
16
flavours/mate.flavour/install.sh
Executable file
16
flavours/mate.flavour/install.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Installing mate"
|
||||
pacstrap /mnt mate mate-extra
|
||||
|
||||
user=$(ls /mnt/home)
|
||||
if [ "$user" == "" ]; then
|
||||
path="/mnt/etc/skel/"
|
||||
else
|
||||
path="/mnt/home/$user/"
|
||||
fi
|
||||
|
||||
echo "~> Creating .xinitrc"
|
||||
echo "exec mate-session" > $path/.xinitrc
|
||||
|
||||
amf_return=0
|
8
flavours/networkmanager.flavour/install.sh
Executable file
8
flavours/networkmanager.flavour/install.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Installing NetworkManager"
|
||||
pacstrap /mnt networkmanager
|
||||
echo " Enabling NetworkManager on boot"
|
||||
arch-chroot /mnt systemctl enable NetworkManager
|
||||
|
||||
amf_return=0
|
6
flavours/sound.flavour/install.sh
Executable file
6
flavours/sound.flavour/install.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Installing pulseaudio alsa-utils ponymix"
|
||||
pacstrap /mnt pulseaudio alsa-utils ponymix
|
||||
|
||||
amf_return=0
|
14
flavours/ssh.flavour/install.sh
Executable file
14
flavours/ssh.flavour/install.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Install openssh package"
|
||||
pacstrap /mnt openssh
|
||||
|
||||
echo "~> Patch /etc/ssh/sshd_config...:"
|
||||
echo " * disallow passwords."
|
||||
arch-chroot /mnt sed -i "s/^#PasswordAuthentication .*$/PasswordAuthentication no/g" /etc/ssh/sshd_config
|
||||
echo " * force SSH keys."
|
||||
arch-chroot /mnt sed -i "s/^#PubkeyAuthentication .*$/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
|
||||
echo " * enable on boot."
|
||||
arch-chroot /mnt systemctl enable sshd
|
||||
|
||||
amf_return=0
|
10
flavours/sudo.flavour/install.sh
Executable file
10
flavours/sudo.flavour/install.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Install sudo package"
|
||||
pacstrap /mnt sudo
|
||||
|
||||
echo "~> Create group sudo and patch sudoers file"
|
||||
arch-chroot /mnt groupadd sudo
|
||||
arch-chroot /mnt sed -i "s/^# %sudo/%sudo/g" /etc/sudoers
|
||||
|
||||
amf_return=0
|
10
flavours/swapfile.flavour/install.sh
Executable file
10
flavours/swapfile.flavour/install.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Installing systemd-swap"
|
||||
pacstrap /mnt systemd-swap
|
||||
echo " Patching swap.conf"
|
||||
arch-chroot /mnt sed -i "s/\$swapfu_enabled=0/swapfu_enabled=1/g" /etc/systemd/swap.conf
|
||||
echo " Enabling systemd-swap on boot"
|
||||
arch-chroot /mnt systemctl enable systemd-swap
|
||||
|
||||
amf_return=0
|
11
flavours/unsplash.flavour/install.sh
Executable file
11
flavours/unsplash.flavour/install.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Grabbing a random image from unsplash.com..."
|
||||
|
||||
mkdir -p /mnt/etc/wallpapers/
|
||||
|
||||
for tag in {forest,ocean,sky,snow,architecture,technology,stars,hills,nature,fields,trees,night}; do
|
||||
wget $(curl https://unsplash.com/search/photos/$tag | grep -oE 'content="http://images.unsplash.com/photo-([a-zA-Z0-9_\\-]*)' | sed -e 's/content="//g' | shuf -n 1) -O /mnt/etc/wallpapers/$tag-$(uuidgen).jpg
|
||||
done
|
||||
|
||||
amf_return=0
|
37
flavours/user.flavour/install.sh
Executable file
37
flavours/user.flavour/install.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Changing password for root account."
|
||||
arch-chroot /mnt passwd root
|
||||
|
||||
echo -n "~> Do you want to create an user account? (Y/n) "
|
||||
read answer
|
||||
|
||||
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
|
||||
amf_return=0
|
||||
else
|
||||
echo -n " Name of your new user? "
|
||||
read name
|
||||
export username=$name
|
||||
arch-chroot /mnt useradd -m $name
|
||||
arch-chroot /mnt passwd $name
|
||||
|
||||
# If group "sudo" exists (=> sudo.flavour was installed), ask if the user should be added
|
||||
if [ $(arch-chroot /mnt getent group sudo) ]; then
|
||||
echo -n "~> Do you want to add $name to sudoers? (Y/n) "
|
||||
read answer
|
||||
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
|
||||
arch-chroot /mnt usermod -a -G sudo $name
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n " Set up zsh with ohmyzsh for $name? (Y/n) "
|
||||
read answer
|
||||
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
|
||||
pacstrap /mnt zsh git
|
||||
arch-chroot /mnt git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git /home/$name/.oh-my-zsh
|
||||
wget https://git.darknebu.la/maride/config/raw/master/zshrc -O /mnt/home/$name/.zshrc
|
||||
arch-chroot /mnt chsh -s /bin/zsh $name
|
||||
fi
|
||||
|
||||
amf_return=0
|
||||
fi
|
6
flavours/virtualbox-guest.flavour/install.sh
Executable file
6
flavours/virtualbox-guest.flavour/install.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "~> Installing packages to be a virtualbox guest"
|
||||
pacstrap /mnt virtualbox-guest-utils virtualbox-guest-modules-arch
|
||||
|
||||
amf_return=0
|
5
flavours/wifi-menu.flavour/install.sh
Executable file
5
flavours/wifi-menu.flavour/install.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
pacstrap /mnt dialog wpa_supplicant
|
||||
|
||||
amf_return=0
|
5
flavours/xorg.flavour/00-keyboard.conf
Normal file
5
flavours/xorg.flavour/00-keyboard.conf
Normal file
@ -0,0 +1,5 @@
|
||||
Section "InputClass"
|
||||
Identifier "system-keyboard"
|
||||
MatchIsKeyboard "on"
|
||||
Option "XkbLayout" "de"
|
||||
EndSection
|
7
flavours/xorg.flavour/install.sh
Executable file
7
flavours/xorg.flavour/install.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
pacstrap /mnt xorg xorg-xinit xterm ttf-dejavu
|
||||
|
||||
cp 00-keyboard.conf /mnt/etc/X11/xorg.conf.d/
|
||||
|
||||
amf_return=0
|
8
flavours/yaourt.flavour/install.sh
Executable file
8
flavours/yaourt.flavour/install.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
pacstrap /mnt git
|
||||
arch-chroot /mnt git clone https://aur.archlinux.org/package-query.git /tmp/package-query && cd /tmp/package-query && makepkg -si
|
||||
arch-chroot /mnt git clone https://aur.archlinux.org/yaourt.git /tmp/yaourt && cd /tmp/yaourt && makepkg -si
|
||||
arch-chroot /mnt rm -R /tmp/package-query /tmp/yaourt
|
||||
|
||||
amf_return=0
|
57
install.sh
57
install.sh
@ -11,11 +11,20 @@ echo " * An internet connection (DHCP or static, idc...)"
|
||||
echo -n "=> Did you set that up? (y/N) "
|
||||
read answer
|
||||
|
||||
if [ "$answer" != "y" ]; then
|
||||
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
|
||||
echo "OK, then do necessary steps and see you soon."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -n "=> Do you want to install on EFI or BIOS? BIOS is required for VirtalBox hosts (E/b) "
|
||||
read answer
|
||||
|
||||
if [ "$answer" != "e" ] && [ "$answer" != "E" ]; then
|
||||
export bootloader="BIOS";
|
||||
else
|
||||
export bootloader="EFI";
|
||||
fi
|
||||
|
||||
echo "=> Please enter the full path to the block device the installation should take place on: (e.g. /dev/sda)"
|
||||
echo " Make sure to choose a drive, not a partition."
|
||||
echo " Hint: here's a list of devices that may be the right:"
|
||||
@ -27,9 +36,8 @@ export blockdevice
|
||||
for check in checks/*.check
|
||||
do
|
||||
echo "=> Running check '$check'..."
|
||||
$check
|
||||
return=$?
|
||||
if [ "$return" -ne 0 ]; then
|
||||
source $check
|
||||
if [ "$amf_return" -ne 0 ]; then
|
||||
echo "=> Check failed. Fix it, maybe."
|
||||
exit
|
||||
fi
|
||||
@ -38,10 +46,45 @@ done
|
||||
for step in steps/*.step
|
||||
do
|
||||
echo "=> Running step '$step'..."
|
||||
$step
|
||||
return=$?
|
||||
if [ "$return" -ne 0 ]; then
|
||||
source $step
|
||||
if [ "$amf_return" -ne 0 ]; then
|
||||
echo "=> Step failed. That is weird. Sorry. Check logs maybe."
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
for flavour in flavours/*.flavour
|
||||
do
|
||||
# in any case, run it once
|
||||
rerun=1
|
||||
|
||||
while [ $rerun -eq 1 ]; do
|
||||
echo -n "=> Do you want to run flavour '$flavour'? (y/N) "
|
||||
read answer
|
||||
|
||||
rerun=0;
|
||||
|
||||
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
|
||||
echo "=> Running flavour '$flavour'..."
|
||||
pushd $flavour
|
||||
source ./install.sh
|
||||
if [ "$amf_return" -ne 0 ]; then
|
||||
echo "=> Flavour failed. :( Rerun? (Y/n) "
|
||||
read answer
|
||||
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
|
||||
rerun=1;
|
||||
fi
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
echo -n "=> Finished \o/ reboot now? (Y/n) "
|
||||
read answer
|
||||
|
||||
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
reboot
|
||||
|
@ -4,17 +4,17 @@ echo "~> Going to wipe $blockdevice. Just skip it if you are really sure that th
|
||||
echo -n "~> Wipe block device? (Y/n) "
|
||||
read answer
|
||||
|
||||
if [ "$answer" == "n" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -n "~> You sure? (y/N) "
|
||||
read answer
|
||||
|
||||
if [ "$answer" == "y" ]; then
|
||||
echo "~> OK. Be patient now, that could take some time..."
|
||||
dd if=/dev/zero of=$blockdevice status=progress
|
||||
exit 0
|
||||
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
|
||||
amf_return=0
|
||||
else
|
||||
exit 1
|
||||
echo -n "~> You sure? (y/N) "
|
||||
read answer
|
||||
|
||||
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
|
||||
echo "~> OK. Be patient now, that could take some time..."
|
||||
dd if=/dev/zero of=$blockdevice status=progress
|
||||
amf_return=0
|
||||
else
|
||||
amf_return=1
|
||||
fi
|
||||
fi
|
||||
|
@ -8,8 +8,8 @@ echo -e "g\nn\n1\n2048\n+300M\nn\n2\n\n\np\nw" | fdisk $blockdevice
|
||||
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "~> Seems to have worked. Yay!"
|
||||
exit 0
|
||||
amf_return=0
|
||||
else
|
||||
echo "~> Failed. :("
|
||||
exit 1
|
||||
amf_return=1
|
||||
fi
|
||||
|
@ -6,9 +6,10 @@ mkfs.fat -F32 ${blockdevice}1
|
||||
echo -n "~> Do you want to encrypt root? (Y/n) "
|
||||
read answer
|
||||
|
||||
if [ "$answer" == "n" ]; then
|
||||
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
|
||||
echo "~> There are close to no reasons to not do this, but hey, you're an adult."
|
||||
rootformat=${blockdevice}2
|
||||
didCrypt=0
|
||||
else
|
||||
echo "~> Formatting root (/) for crypto"
|
||||
cryptsetup -v luksFormat ${blockdevice}2
|
||||
@ -17,6 +18,7 @@ else
|
||||
echo "~> Open the crypt container"
|
||||
cryptsetup luksOpen ${blockdevice}2 cryptroot
|
||||
rootformat=/dev/mapper/cryptroot
|
||||
didCrypt=1
|
||||
fi
|
||||
|
||||
echo "~> Formatting $rootformat EXT4"
|
||||
@ -26,3 +28,5 @@ echo "~> Mount partitions"
|
||||
mount $rootformat /mnt
|
||||
mkdir -p /mnt/boot
|
||||
mount ${blockdevice}1 /mnt/boot
|
||||
|
||||
amf_return=0
|
||||
|
@ -2,3 +2,5 @@
|
||||
|
||||
echo "~> Installing 'base' group and 'grub', 'efibootmgr'"
|
||||
pacstrap /mnt base grub efibootmgr
|
||||
|
||||
amf_return=0
|
||||
|
@ -17,9 +17,19 @@ echo -e "~> Choose a hostname: "
|
||||
read hostname
|
||||
echo $hostname > /mnt/etc/hostname
|
||||
|
||||
echo "~> Configuring 'grub'"
|
||||
arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch_GRUB
|
||||
echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub
|
||||
echo "~> Configuring 'grub' for $bootloader"
|
||||
if [ "$bootloader" == "EFI" ]; then
|
||||
arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=BOOT
|
||||
# thanks to Virtualbox, this step is necessary
|
||||
cp /mnt/boot/EFI/BOOT/{grubx64.efi,BOOTX64.EFI}
|
||||
else
|
||||
arch-chroot /mnt grub-install --target=i386-pc /dev/*da
|
||||
fi
|
||||
|
||||
if [ "$didCrypt" -eq 1 ]; then
|
||||
echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub
|
||||
fi
|
||||
|
||||
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
echo "~> Patching mkinitcpio.conf for encryption magic"
|
||||
@ -28,3 +38,8 @@ echo "HOOKS=\"base udev autodetect modconf block keyboard keymap encrypt filesys
|
||||
|
||||
echo "~> ... and recompile the kernel"
|
||||
arch-chroot /mnt mkinitcpio -p linux
|
||||
|
||||
echo "~> Patching pacman.conf for some pacman magic."
|
||||
arch-chroot /mnt sed -i "s/\[options\]/\[options\]\nILoveCandy/g" /etc/pacman.conf
|
||||
|
||||
amf_return=0
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo -n "~> Do you want to create an user account? (Y/n) "
|
||||
read answer
|
||||
|
||||
if [ "$answer" == "n" ]; then
|
||||
exit 0
|
||||
else
|
||||
echo -n " Name of your new user? "
|
||||
read name
|
||||
arch-chroot /mnt useradd -m $name
|
||||
arch-chroot /mnt passwd $name
|
||||
exit 0
|
||||
fi
|
Loading…
Reference in New Issue
Block a user