more distros

This commit is contained in:
2026-01-28 16:18:33 +00:00
parent b890def976
commit fa3c813709
6 changed files with 141 additions and 11 deletions

View File

@@ -35,6 +35,15 @@ netboot
1. `dmesg | grep enp0` <- find the usb interface 1. `dmesg | grep enp0` <- find the usb interface
2. Disable power saving: `echo -1 | sudo tee /sys/bus/usb/devices/2-1/power/autosuspend`. 2. Disable power saving: `echo -1 | sudo tee /sys/bus/usb/devices/2-1/power/autosuspend`.
Testing netboot
---------------
```
sudo ip tuntap add dev tap0 mode tap user "$USER"
sudo ip link set dev tap0 up
sudo ip link set dev tap0 master br0
```
efi: efi:
qemu-system-x86_64 \ qemu-system-x86_64 \

View File

@@ -105,7 +105,9 @@
tmuxbash = super.callPackage ./pkgs/tmuxbash.nix { }; tmuxbash = super.callPackage ./pkgs/tmuxbash.nix { };
sentinelone = super.callPackage ./pkgs/sentinelone { }; sentinelone = super.callPackage ./pkgs/sentinelone { };
chronoctl = super.callPackage ./pkgs/chronoctl.nix { }; chronoctl = super.callPackage ./pkgs/chronoctl.nix { };
mrescue = super.callPackage ./pkgs/mrescue.nix { }; mrescue-alpine = super.callPackage ./pkgs/mrescue-alpine.nix { };
mrescue-debian-standard = super.callPackage ./pkgs/mrescue-debian-standard.nix { };
mrescue-debian-xfce = super.callPackage ./pkgs/mrescue-debian-xfce.nix { };
vanta-agent = super.callPackage ./pkgs/vanta-agent.nix { }; vanta-agent = super.callPackage ./pkgs/vanta-agent.nix { };
gcloud-wrapped = super.callPackage ./pkgs/gcloud-wrapped { }; gcloud-wrapped = super.callPackage ./pkgs/gcloud-wrapped { };
go-raceless = super.callPackage ./pkgs/go-raceless { inherit (nicer) ; }; go-raceless = super.callPackage ./pkgs/go-raceless { inherit (nicer) ; };
@@ -391,7 +393,9 @@
weather weather
gamja gamja
chronoctl chronoctl
mrescue mrescue-alpine
mrescue-debian-standard
mrescue-debian-xfce
sentinelone sentinelone
; ;
}; };

View File

@@ -16,15 +16,27 @@ let
:menu :menu
menu PXE Boot Menu menu PXE Boot Menu
item mrescue Boot mrescue (Rescue System) item alpine Boot Alpine Linux 3.23.2
item debian-standard Boot Debian Live 13.3.0 (Standard)
item debian-xfce Boot Debian Live 13.3.0 (XFCE)
item netbootxyz Boot netboot.xyz item netbootxyz Boot netboot.xyz
item shell iPXE Shell item shell iPXE Shell
choose --default mrescue --timeout 10000 selected || goto menu choose --default alpine --timeout 10000 selected || goto menu
goto ''${selected} goto ''${selected}
:mrescue :alpine
kernel http://10.14.143.1/boot/mrescue/kernel kernel http://10.14.143.1/boot/alpine/kernel
initrd http://10.14.143.1/boot/mrescue/initrd initrd http://10.14.143.1/boot/alpine/initrd
boot
:debian-standard
kernel http://10.14.143.1/boot/debian-standard/kernel boot=live components fetch=http://10.14.143.1/boot/debian-standard/filesystem.squashfs
initrd http://10.14.143.1/boot/debian-standard/initrd
boot
:debian-xfce
kernel http://10.14.143.1/boot/debian-xfce/kernel boot=live components fetch=http://10.14.143.1/boot/debian-xfce/filesystem.squashfs
initrd http://10.14.143.1/boot/debian-xfce/initrd
boot boot
:netbootxyz :netbootxyz
@@ -47,11 +59,26 @@ let
# TFTP root directory with all boot files # TFTP root directory with all boot files
tftp-root = pkgs.runCommand "tftp-root" { } '' tftp-root = pkgs.runCommand "tftp-root" { } ''
mkdir -p $out/mrescue mkdir -p $out/alpine
mkdir -p $out/debian-standard
mkdir -p $out/debian-xfce
cp ${customIpxeEfi}/ipxe.efi $out/boot.efi cp ${customIpxeEfi}/ipxe.efi $out/boot.efi
cp ${customIpxeBios}/undionly.kpxe $out/boot.kpxe cp ${customIpxeBios}/undionly.kpxe $out/boot.kpxe
cp ${pkgs.mrescue}/kernel $out/mrescue/kernel
cp ${pkgs.mrescue}/initrd $out/mrescue/initrd # Alpine
cp ${pkgs.mrescue-alpine}/kernel $out/alpine/kernel
cp ${pkgs.mrescue-alpine}/initrd $out/alpine/initrd
# Debian Standard
cp ${pkgs.mrescue-debian-standard}/kernel $out/debian-standard/kernel
cp ${pkgs.mrescue-debian-standard}/initrd $out/debian-standard/initrd
cp ${pkgs.mrescue-debian-standard}/filesystem.squashfs $out/debian-standard/filesystem.squashfs
# Debian XFCE
cp ${pkgs.mrescue-debian-xfce}/kernel $out/debian-xfce/kernel
cp ${pkgs.mrescue-debian-xfce}/initrd $out/debian-xfce/initrd
cp ${pkgs.mrescue-debian-xfce}/filesystem.squashfs $out/debian-xfce/filesystem.squashfs
''; '';
in in
{ {

View File

@@ -5,7 +5,7 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mrescue"; pname = "mrescue-alpine";
version = "3.23.2"; version = "3.23.2";
src = fetchurl { src = fetchurl {

View File

@@ -0,0 +1,45 @@
{
pkgs,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "mrescue-debian-standard";
version = "13.3.0";
src = fetchurl {
url = "https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-${version}-amd64-standard.iso";
hash = "sha256-7is9X5vGfYAe7+3b1WmO+7CzU1hyS37T20Yb4/Xn7NY=";
};
nativeBuildInputs = with pkgs; [
p7zip
];
sourceRoot = ".";
unpackPhase = ''
runHook preUnpack
mkdir debian-live
7z x -odebian-live $src >/dev/null
runHook postUnpack
'';
buildPhase = ''
runHook preBuild
# No build phase needed - files are extracted directly
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
install -Dm644 debian-live/live/vmlinuz $out/kernel
install -Dm644 debian-live/live/initrd.img $out/initrd
install -Dm644 debian-live/live/filesystem.squashfs $out/filesystem.squashfs
runHook postInstall
'';
}

View File

@@ -0,0 +1,45 @@
{
pkgs,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "mrescue-debian-xfce";
version = "13.3.0";
src = fetchurl {
url = "https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-${version}-amd64-xfce.iso";
hash = "sha256-xvHLR2gOOdsTIu7FrOZdxgfG6keqniEhhf9ywJmtNXQ=";
};
nativeBuildInputs = with pkgs; [
p7zip
];
sourceRoot = ".";
unpackPhase = ''
runHook preUnpack
mkdir debian-live
7z x -odebian-live $src >/dev/null
runHook postUnpack
'';
buildPhase = ''
runHook preBuild
# No build phase needed - files are extracted directly
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
install -Dm644 debian-live/live/vmlinuz $out/kernel
install -Dm644 debian-live/live/initrd.img $out/initrd
install -Dm644 debian-live/live/filesystem.squashfs $out/filesystem.squashfs
runHook postInstall
'';
}