-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ddbf748
Showing
6 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/image | ||
/image.tar | ||
/mkosi.cache | ||
/mkosi.rootpw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Reimage any VPS without KVM access | ||
|
||
```bash | ||
mkosi build | ||
rsync -zP image.tar root@ip:/root/ | ||
ssh root@<ip> | ||
mkdir -p /run/nextroot | ||
cd /run/nextroot | ||
tar -xf /local_scratch/image.tar | ||
cp /etc/ssh/ssh_host_* etc/ssh/ | ||
systemctl soft-reboot | ||
ssh root@<ip> | ||
cryptsetup close root # Close old root cryptsetup mapper if you have that | ||
# Repartition hard drive and install your system | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[Distribution] | ||
Distribution=debian | ||
Release=sid | ||
|
||
[Content] | ||
Timezone=UTC | ||
Packages= | ||
systemd | ||
dbus | ||
udev | ||
bash | ||
dpkg | ||
apt | ||
apt-transport-https | ||
ca-certificates | ||
openssh-server | ||
util-linux | ||
util-linux-extra | ||
systemd-resolved | ||
parted | ||
gdisk | ||
fdisk | ||
cryptsetup | ||
mkosi | ||
|
||
|
||
[Output] | ||
@Format=tar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PermitRootLogin yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Match] | ||
Name=enp* | ||
|
||
[Network] | ||
DHCP=yes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
enable systemd-resolved.service | ||
enable ssh.service | ||
enable sshd.service | ||
enable systemd-networkd.service |