fix networking.
This commit is contained in:
@@ -15,6 +15,7 @@ echo "CONFIG_FRAMEBUFFER_CONSOLE=y" >> ./.config
|
|||||||
echo "CONFIG_DRM_VIRTIO_GPU=y" >> ./.config
|
echo "CONFIG_DRM_VIRTIO_GPU=y" >> ./.config
|
||||||
echo "CONFIG_VIRTIO_PCI=y" >> ./.config
|
echo "CONFIG_VIRTIO_PCI=y" >> ./.config
|
||||||
echo "CONFIG_VIRTIO_BLK=y" >> ./.config
|
echo "CONFIG_VIRTIO_BLK=y" >> ./.config
|
||||||
|
echo "CONFIG_VIRTIO_ANCHOR=y" >> ./.config
|
||||||
echo "CONFIG_SCSI_VIRTIO=y" >> ./.config
|
echo "CONFIG_SCSI_VIRTIO=y" >> ./.config
|
||||||
echo "CONFIG_VIRTIO_NET=y" >> ./.config
|
echo "CONFIG_VIRTIO_NET=y" >> ./.config
|
||||||
echo "CONFIG_VIRTIO_CONSOLE=y" >> ./.config
|
echo "CONFIG_VIRTIO_CONSOLE=y" >> ./.config
|
||||||
@@ -22,6 +23,8 @@ echo "CONFIG_VIRTIO_PCI_LIB=y" >> ./.config
|
|||||||
echo "CONFIG_VIRTIO_PCI_LIB_LEGACY=y" >> ./.config
|
echo "CONFIG_VIRTIO_PCI_LIB_LEGACY=y" >> ./.config
|
||||||
echo "CONFIG_VIRTIO_MENU=y" >> ./.config
|
echo "CONFIG_VIRTIO_MENU=y" >> ./.config
|
||||||
echo "CONFIG_VIRTIO_BALLOON=y" >> ./.config
|
echo "CONFIG_VIRTIO_BALLOON=y" >> ./.config
|
||||||
|
echo "CONFIG_HW_RANDOM_VIRTIO=y" >> ./.config
|
||||||
|
echo "CONFIG_VIRTIO_PCI_LEGACY=y" >> ./.config
|
||||||
echo "CONFIG_VIRTIO_MEM=y" >> ./.config
|
echo "CONFIG_VIRTIO_MEM=y" >> ./.config
|
||||||
echo "CONFIG_VIRTIO_MMIO=y" >> ./.config
|
echo "CONFIG_VIRTIO_MMIO=y" >> ./.config
|
||||||
echo "CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y" >> ./.config
|
echo "CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y" >> ./.config
|
||||||
@@ -29,6 +32,7 @@ echo "CONFIG_VIRTIO_IOMMU=y" >> ./.config
|
|||||||
echo "CONFIG_VIRTIO_FS=y" >> ./.config
|
echo "CONFIG_VIRTIO_FS=y" >> ./.config
|
||||||
echo "CONFIG_PCI=y" >> ./.config
|
echo "CONFIG_PCI=y" >> ./.config
|
||||||
echo "CONFIG_PCI_HOST_GENERIC=y" >> ./.config
|
echo "CONFIG_PCI_HOST_GENERIC=y" >> ./.config
|
||||||
|
echo "CONFIG_RPMSG_VIRTIO=y" >> ./.config
|
||||||
echo "CONFIG_DRM=y" >> ./.config
|
echo "CONFIG_DRM=y" >> ./.config
|
||||||
/usr/bin/make olddefconfig
|
/usr/bin/make olddefconfig
|
||||||
/usr/bin/make -j ${cores}
|
/usr/bin/make -j ${cores}
|
||||||
|
|||||||
@@ -1,25 +1,46 @@
|
|||||||
|
|
||||||
echo "deb http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse" > /etc/apt/sources.list
|
#add sources list for noble.
|
||||||
echo "deb http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse" >> /etc/apt/sources.list
|
set -e
|
||||||
echo "deb http://archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse" >> /etc/apt/sources.list
|
echo "deb https://archive.ubuntu.com/ubuntu noble main restricted universe multiverse" > /etc/apt/sources.list
|
||||||
echo "deb http://security.ubuntu.com/ubuntu noble-security main restricted universe multiverse" >> /etc/apt/sources.list
|
echo "deb https://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse" >> /etc/apt/sources.list
|
||||||
|
echo "deb https://archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse" >> /etc/apt/sources.list
|
||||||
|
echo "deb https://security.ubuntu.com/ubuntu noble-security main restricted universe multiverse" >> /etc/apt/sources.list
|
||||||
apt update
|
apt update
|
||||||
apt install -y gnome-core
|
|
||||||
systemd-nspawn --boot
|
#set locale
|
||||||
#systemctl enable opensnitch
|
locale-gen "en_US.UTF-8"
|
||||||
apt install -y ufw
|
echo "LANG=en_US.UTF-8" > /etc/default/locale
|
||||||
ufw enable
|
|
||||||
apt install -y curl flatpak
|
#install base system packages
|
||||||
#git opensnitch qemu-system python3-bpfcc python3-pip bpfcc-tools ipset doas lm-sensors flatpak net-tools iputils-ping
|
apt install -y --no-install-recommends gnome-core git curl flatpak systemd-resolved ufw nano htop ipset lm-sensors net-tools iputils-ping fish python3-bpfcc python3-pip bpfcc-tools gnome-shell-extension-ubuntu-dock gnome-shell-extension-ubuntu-tiling-assistant ffmpeg vlc
|
||||||
#pip install --break-system-packages dnslib psutil
|
pip install --break-system-packages dnslib psutil
|
||||||
flatpak remote-add flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
||||||
|
#add setuid for some applications
|
||||||
|
chmod u+s /usr/bin/bwrap
|
||||||
|
chmod u+s /usr/bin/ping
|
||||||
|
|
||||||
|
#enable services
|
||||||
|
systemctl enable systemd-resolved
|
||||||
|
systemctl enable systemd-networkd
|
||||||
|
|
||||||
|
#ui changes
|
||||||
|
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||||
|
|
||||||
|
|
||||||
#run echo "permit persist :sudo as root" >> /etc/doas.conf
|
#run echo "permit persist :sudo as root" >> /etc/doas.conf
|
||||||
|
|
||||||
|
|
||||||
|
#create the default user
|
||||||
useradd -m -s /bin/bash ubuntu
|
useradd -m -s /bin/bash ubuntu
|
||||||
usermod -a -G sudo ubuntu
|
usermod -a -G sudo ubuntu
|
||||||
yes defaultpass | passwd ubuntu
|
yes defaultpass | passwd ubuntu
|
||||||
|
|
||||||
|
#install flatpak apps
|
||||||
|
flatpak remote-add flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
flatpak install --system --noninteractive flathub org.keepassxc.KeePassXC
|
flatpak install --system --noninteractive flathub org.keepassxc.KeePassXC
|
||||||
|
|
||||||
|
#install brave browser
|
||||||
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
|
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
|
||||||
curl -fsSLo /etc/apt/sources.list.d/brave-browser-release.sources https://brave-browser-apt-release.s3.brave.com/brave-browser.sources
|
curl -fsSLo /etc/apt/sources.list.d/brave-browser-release.sources https://brave-browser-apt-release.s3.brave.com/brave-browser.sources
|
||||||
apt remove -y snapd
|
|
||||||
apt update
|
apt update
|
||||||
apt install -y brave-browser
|
apt install -y brave-browser
|
||||||
|
|||||||
5
config/interfaces.network
Normal file
5
config/interfaces.network
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[Match]
|
||||||
|
Name=*
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
DHCP=yes
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# /tmp/polystrap.cfg
|
|
||||||
[system]
|
|
||||||
target = amd64-linux-gnu
|
|
||||||
rootfs = /tmp/rootfs
|
|
||||||
host = host
|
|
||||||
download = http://deb.debian.org/debian
|
|
||||||
distribution = bullseye
|
|
||||||
components = main contrib non-free
|
|
||||||
architectures = amd64
|
|
||||||
9
config/resolved.conf
Normal file
9
config/resolved.conf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[Resolve]
|
||||||
|
Domains=~.
|
||||||
|
DNSSEC=true
|
||||||
|
DNSOverTLS=yes
|
||||||
|
MulticastDNS=no
|
||||||
|
LLMNR=no
|
||||||
|
Cache=yes
|
||||||
|
DNSStubListener=yes
|
||||||
|
DNS=9.9.9.11#dns11.quad9.net DNS=1.1.1.1#cloudflare-dns.com
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
cd ..
|
cd ..
|
||||||
disk="./outputs/boot_image.img"
|
disk="./outputs/boot_image.img"
|
||||||
qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -drive format=raw,file=$disk -m 12G -smp 8 -vga none -usb -device usb-tablet --display sdl,gl=off --device virtio-gpu-pci -enable-kvm -machine type=pc-q35-3.1,accel=kvm,kernel_irqchip=on
|
qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -drive format=raw,file=$disk -m 16G -smp 8 -vga virtio -usb -device usb-tablet --display gtk,gl=off --device virtio-gpu-pci -enable-kvm -machine type=pc-q35-3.1,accel=kvm,kernel_irqchip=on
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ cd "$(dirname "$0")"
|
|||||||
DIR="$(dirname "$0")"
|
DIR="$(dirname "$0")"
|
||||||
cd ..
|
cd ..
|
||||||
echo $PWD
|
echo $PWD
|
||||||
|
if mountpoint -q "./outputs/chroot/proc/"; then
|
||||||
|
umount -lf "./outputs/chroot/proc/"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d ./outputs/root/bin ]; then
|
if [ ! -d ./outputs/root/bin ]; then
|
||||||
rm -rf './outputs/root'
|
rm -rf './outputs/root'
|
||||||
@@ -25,6 +28,8 @@ if mountpoint -q "./outputs/chroot/proc/"; then
|
|||||||
fi
|
fi
|
||||||
mount --bind /proc ./outputs/chroot/proc
|
mount --bind /proc ./outputs/chroot/proc
|
||||||
cp ./config/filesystem_chroot_install.sh ./outputs/chroot/filesystem_chroot_install.sh
|
cp ./config/filesystem_chroot_install.sh ./outputs/chroot/filesystem_chroot_install.sh
|
||||||
|
cp ./config/interfaces.network ./outputs/chroot/etc/systemd/network/10-all.network
|
||||||
|
cp ./config/resolved.conf ./outputs/chroot/etc/systemd/resolved.conf
|
||||||
chmod +x ./outputs/chroot/filesystem_chroot_install.sh
|
chmod +x ./outputs/chroot/filesystem_chroot_install.sh
|
||||||
chroot ./outputs/chroot /bin/bash -c "/filesystem_chroot_install.sh"
|
chroot ./outputs/chroot /bin/bash -c "/filesystem_chroot_install.sh"
|
||||||
cd $DIR
|
cd $DIR
|
||||||
|
|||||||
@@ -20,11 +20,7 @@ cp ./config/init.sh ./dependencies/initram/init
|
|||||||
chmod +x ./dependencies/initram/init
|
chmod +x ./dependencies/initram/init
|
||||||
echo "copying kernel"
|
echo "copying kernel"
|
||||||
cp ./dependencies/linux/arch/x86_64/boot/bzImage ./outputs/bzImage.efi
|
cp ./dependencies/linux/arch/x86_64/boot/bzImage ./outputs/bzImage.efi
|
||||||
cd ./dependencies/initram
|
cd ./dependencies/initram/
|
||||||
cd "$(dirname "$0")"
|
|
||||||
cd ..
|
|
||||||
cd ./dependencies/initram
|
|
||||||
echo $PWD
|
|
||||||
find . -type f -name "*" -exec chmod +x {} +
|
find . -type f -name "*" -exec chmod +x {} +
|
||||||
find . -print0 | cpio --null -ov --format=newc | gzip -9 > ../../outputs/initramfs.cpio.gz
|
find . -print0 | cpio --null -ov --format=newc | gzip -9 > ../../outputs/initramfs.cpio.gz
|
||||||
echo "created initramfs."
|
echo "created initramfs."
|
||||||
|
|||||||
Reference in New Issue
Block a user