try to fix bluetooth (#3)
This commit is contained in:
parent
54d9c8b1ab
commit
07a60c5cd4
13
elfLaptop.sh
13
elfLaptop.sh
@ -127,14 +127,14 @@ run-chroot "generate initramfs" "mkinitcpio -P"
|
|||||||
DISKUUID=$(blkid --output export ${DISK}3 | grep '^UUID' | sed 's/UUID=//')
|
DISKUUID=$(blkid --output export ${DISK}3 | grep '^UUID' | sed 's/UUID=//')
|
||||||
run-chroot "install systemd-boot" "bootctl install"
|
run-chroot "install systemd-boot" "bootctl install"
|
||||||
run-chroot "create boot config for main" "cat >/boot/loader/entries/arch.conf <<EOF
|
run-chroot "create boot config for main" "cat >/boot/loader/entries/arch.conf <<EOF
|
||||||
title Elf OS
|
title E.L.F. OS
|
||||||
linux /vmlinuz-linux
|
linux /vmlinuz-linux
|
||||||
initrd /initramfs-linux.img
|
initrd /initramfs-linux.img
|
||||||
options cryptdevice=UUID=$DISKUUID:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=@ rd.luks.options=discard rw
|
options cryptdevice=UUID=$DISKUUID:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=@ rd.luks.options=discard rw
|
||||||
EOF
|
EOF
|
||||||
"
|
"
|
||||||
run-chroot "create boot config for fallback" "cat >/boot/loader/entries/arch-fallback.conf <<EOF
|
run-chroot "create boot config fallback" "cat >/boot/loader/entries/arch-fallback.conf <<EOF
|
||||||
title Elf OS fallback
|
title E.L.F. OS fallback
|
||||||
linux /vmlinuz-linux
|
linux /vmlinuz-linux
|
||||||
initrd /initramfs-linux-fallback.img
|
initrd /initramfs-linux-fallback.img
|
||||||
options cryptdevice=UUID=$DISKUUID:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=@ rd.luks.options=discard rw
|
options cryptdevice=UUID=$DISKUUID:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=@ rd.luks.options=discard rw
|
||||||
@ -148,6 +148,13 @@ editor no
|
|||||||
EOF
|
EOF
|
||||||
"
|
"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo === setup blutooth
|
||||||
|
echo
|
||||||
|
|
||||||
|
run-chroot "install bluez" "pacman -Sy bluez bluez-tools"
|
||||||
|
run-chroot "enable bluez" "systemctl enable bluetooth"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo === setup user
|
echo === setup user
|
||||||
echo
|
echo
|
||||||
|
|||||||
77
in-root.sh
77
in-root.sh
@ -1,77 +0,0 @@
|
|||||||
|
|
||||||
HOSTNAME="$1"
|
|
||||||
DISK="$2"
|
|
||||||
|
|
||||||
function run(){
|
|
||||||
echo "[ ] $1"
|
|
||||||
echo "# $1" >>install.log
|
|
||||||
echo "> $2" >>install.log
|
|
||||||
bash -c "$2" &>>install.log \
|
|
||||||
&& echo -e "\e[1A\e[K[ \e[32mOK\e[0m ] $1" \
|
|
||||||
|| {
|
|
||||||
echo -e "\e[1A\e[K[\e[31mFAIL\e[0m] $1"
|
|
||||||
bash -c "$3"
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
echo >>install.log
|
|
||||||
}
|
|
||||||
|
|
||||||
echo >install.log
|
|
||||||
|
|
||||||
echo -n "password for freenen: "
|
|
||||||
read -s PASS
|
|
||||||
echo
|
|
||||||
echo -n "retype password: "
|
|
||||||
read -s PASSRE
|
|
||||||
echo
|
|
||||||
|
|
||||||
if [ "$PASS" != "$PASSRE" ]; then
|
|
||||||
echo "password do not match"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
|
|
||||||
run "set timezone" "ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime"
|
|
||||||
run "set hwclock to UTC" "hwclock --systohc"
|
|
||||||
run "generate locals" "locale-gen"
|
|
||||||
run "config locals" "echo \"LANG=en_GB.UTF-8\" >/etc/locale.conf"
|
|
||||||
run "set hostname" "echo \"$HOSTNAME\" >/etc/hostname"
|
|
||||||
echo "create hosts file"
|
|
||||||
echo "127.0.0.1 localhost" >/etc/hosts
|
|
||||||
echo "::1 localhost" >>/etc/hosts
|
|
||||||
echo "127.0.1.1 $HOSTNAME" >>/etc/hosts
|
|
||||||
|
|
||||||
run "config initramfs" "sed --in-place -e 's/HOOKS=(.*)/HOOKS=(base udev autodetect microcode modconf kms keyboard block encrypt filesystems fsck)/' /etc/mkinitcpio.conf"
|
|
||||||
run "generate initramfs" "mkinitcpio -P"
|
|
||||||
|
|
||||||
DISKUUID=$(blkid --output export ${DISK}3 | grep '^UUID' | sed 's/UUID=//')
|
|
||||||
run "install systemd-boot" "bootctl install"
|
|
||||||
run "create boot config for main" "cat >/boot/loader/entries/arch.conf <<EOF
|
|
||||||
title Elf OS
|
|
||||||
linux /vmlinuz-linux
|
|
||||||
initrd /initramfs-linux.img
|
|
||||||
options cryptdevice=UUID=$DISKUUID:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=@ rd.luks.options=discard rw
|
|
||||||
EOF
|
|
||||||
"
|
|
||||||
run "create boot config for fallback" "cat >/boot/loader/entries/arch-fallback.conf <<EOF
|
|
||||||
title Elf OS fallback
|
|
||||||
linux /vmlinuz-linux
|
|
||||||
initrd /initramfs-linux-fallback.img
|
|
||||||
options cryptdevice=UUID=$DISKUUID:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=@ rd.luks.options=discard rw
|
|
||||||
EOF
|
|
||||||
"
|
|
||||||
run "create main boot config" "cat >/boot/loader/loader.conf <<EOF
|
|
||||||
default arch.conf
|
|
||||||
timeout 4
|
|
||||||
console-mode max
|
|
||||||
editor no
|
|
||||||
EOF
|
|
||||||
"
|
|
||||||
|
|
||||||
run "add .ssh dir to skel" "mkdir /etc/skel/.ssh"
|
|
||||||
run "create user" "useradd --home-dir /home/freenen --create-home --skel /etc/skel freenen"
|
|
||||||
run "set password for user" "echo \"freenen:$PASS\" | chpasswd"
|
|
||||||
run "add user to sudoers" "echo \"freenen ALL=(ALL:ALL) ALL\" >>/etc/sudoers"
|
|
||||||
run "touch authoized keys" "touch /home/freenen/.ssh/authorized_keys"
|
|
||||||
run "add sshkeys for new user" "curl -o /home/freenen/.ssh/authorized_keys https://github.com/FReenen.keys"
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user