mirror of
https://github.com/Noratrieb/vmlab.git
synced 2026-01-14 16:45:11 +01:00
create disks
This commit is contained in:
commit
f6c317b38b
6 changed files with 136 additions and 0 deletions
48
debian-image/setup.sh
Executable file
48
debian-image/setup.sh
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
# ^^ not compatible on purpose, this only runs inside debian
|
||||
|
||||
function info {
|
||||
echo "INFO DEB:" "$@"
|
||||
}
|
||||
|
||||
export PATH="/usr/local/bin:/usr/bin:/bin"
|
||||
export HOME=/root
|
||||
export LC_ALL=C
|
||||
|
||||
info "Hello from debian!"
|
||||
|
||||
info "Setting up mounts"
|
||||
|
||||
mount none -t proc /proc
|
||||
mount none -t sysfs /sys
|
||||
mount none -t devpts /dev/pts
|
||||
|
||||
info "Configuring the system"
|
||||
|
||||
echo "debian-image" > /etc/hostname
|
||||
cat <<EOF > /etc/apt/sources.list
|
||||
deb http://deb.debian.org/debian/ bookworm main contrib non-free
|
||||
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free
|
||||
|
||||
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free
|
||||
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free
|
||||
|
||||
deb http://deb.debian.org/debian-security bookworm-security main
|
||||
deb-src http://deb.debian.org/debian-security bookworm-security main
|
||||
EOF
|
||||
|
||||
cat <<EOF > /etc/fstab
|
||||
# /etc/fstab: static file system information.
|
||||
#
|
||||
# Use 'blkid' to print the universally unique identifier for a
|
||||
# device; this may be used with UUID= as a more robust way to name devices
|
||||
# that works even if disks are added and removed. See fstab(5).
|
||||
#
|
||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||
/dev/sda2 / ext4 errors=remount-ro 0 1
|
||||
/dev/sda1 /boot ext4 defaults 0 2
|
||||
EOF
|
||||
|
||||
apt-get update
|
||||
apt-get install -y apt-utils
|
||||
apt-get install -y systemd-sysv
|
||||
Loading…
Add table
Add a link
Reference in a new issue