nik9000 / recreate

recreate my laptop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rebuild my laptop.

On new laptop:

iwctl
> station wlan0 scan
> station wlan0 get-networks
> station wlan0 connect channel99
> station wlan0 show
ping www.google.com -c1
systemctl start sshd
ip address show
passwd

On working laptop:

export IP=192.168.86.36
ssh-copy-id root@$IP
export CRYPTKEY=<key>
export NEW_HOSTNAME=<hostname>
sed s/CRYPTKEY/$CRYPTKEY/ stage1.sh | sed s/HOSTNAME/$NEW_HOSTNAME/ | ssh root@$IP bash

Reboot new laptop. Password is tmp.

On new laptop:

passwd
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
systemctl restart systemd-resolved
usesradd -m -G wheel -s /bin/bash nik9000
passwd nik9000
export DPI=low
ssh-copy-id nik9000@$IP
rsync -a stage2.sh config nik9000@$IP:. && ssh -t nik9000@$IP "export DPI=$DPI; sudo -E bash stage2.sh" && ssh -t nik9000@$IP rm -rf stage2.sh config
rsync -a ~/.ssh nik9000@$IP:.

About

recreate my laptop

License:Apache License 2.0


Languages

Language:Shell 100.0%