Instructions how to install Debian using debootstrap. Below instructions were verified to work with debootstrapping Debian 11.
In the following gist I'm going to guide you through the process of installing and booting an entire linux distribution with full desktop environment just like you would have with a classical VM, but with much better performance and much worse isolation :)
The reason why I did this was mainly because it's cool, but also to test new distros with decent graphics performance without actually booting them on my PC.
If you "try this at home" just keep in mind a container is not as secure as a VM, and some of the option we're going to explore will weaken container isolation from "a bit risky" to "totally unsafe" depending on what you choose.
Also, we're going to use systemd-nspawn for containers as it's probably the best fit for our use case and can also boot any linux partition without needing to prepare an apposite container image.
Less go!
#!/bin/bash | |
# Ubuntu Installation Script with LUKS-encrypted BTRFS, systemd-boot, and Secure Boot | |
# Author: Claude (modified and improved with apt speed enhancements) | |
# Usage: sudo bash script.sh [install_device] [username] [hostname] [locale] [language] [timezone] | |
# Passwords can be provided via environment or will be prompted securely. | |
set -euo pipefail | |
# Log file for the installation process | |
LOGFILE="/var/log/ubuntu_install_script.log" |
Around 2005, I published in my personal blog in Wordpress a small tutorial on how to install Debian the Nerd-way. That post is long gone now, and it was more like a small reference guide for myself than anything else. Recently I tried some of those steps again just for fun to see they still work and they do!
As you move on in this tutorial, you will notice it resembles a lot the Arch Linux installation method (hence the title). That's not a surprise since all of this existed even before Arch was popularized.
This work grabs some steps from the Instaling Debian GNU/Linux from a Unix/Linux System, in the Random Bits appendix from the Debian documentation. I decided to create one of my own because some of those steps could be either abbreviated or more detailed.
DISCLAIMER: as you already suspect, these steps will potentially break your system! Read every step carefully and check what applie
On another Debian (x86 or arm64, doesn't matter much).
apt install distrobuilder qemu-system-common
Create a configuration file (debian.yml for example) for your LXC image :
image:
description: |-
Nearly stock Debian Bookworm image
! model | |
pc101 Generic 101-key PC | |
pc102 Generic 102-key (Intl) PC | |
pc104 Generic 104-key PC | |
pc105 Generic 105-key (Intl) PC | |
dell101 Dell 101-key PC | |
latitude Dell Latitude series laptop | |
dellm65 Dell Precision M65 | |
everex Everex STEPnote | |
flexpro Keytronic FlexPro |
#!/bin/bash | |
# Setting Up OpenWRT on a Virtual Machine with Proxmox | |
# Based on: https://community.bigbeartechworld.com/t/setting-up-openwrt-on-a-virtual-machine-with-proxmox/257 | |
# Set your wished version: | |
export VER="23.05" | |
export ARCH="amd64" | |
export INDEX_URL="https://images.linuxcontainers.org/images/openwrt/$VER/$ARCH/default" | |
#export BUILDDATE=$(date -d "yesterday" '+%Y%m%d') |
#Reference: https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker | |
#Requirement: nano .env -> Set environmental variables: ${$USERDIR}, ${PUID}, ${PGID}, ${TZ}, ${DOMAINNAME}, ${CLOUDFLARE_EMAIL}, ${CLOUDFLARE_API_KEY}, ${HTTP_USERNAME}, ${HTTP_PASSWORD}, ${PLEX_CLAIM} etc. as explained in the reference. | |
version: "3.7" | |
services: | |
######### FRONTENDS ########## | |
# Traefik Reverse Proxy | |
traefik: |