Pin: release n=noble,o=Ubuntu
Pin-Priority: -100
-Package: 9menu acetoneiso b43-fwcutter bibledit bibledit-cloud bibledit-cloud-data bibledit-data bible-kjv bible-kjv-text bibletime bibletime-data boinc boinc-client boinc-client-nvidia-cuda boinc-client-opencl boinc-dev boinc-manager boinc-screensaver bumblebee cgpt debian-reference debian-reference-common debian-reference-de debian-reference-en debian-reference-es debian-reference-fr debian-reference-id debian-reference-it debian-reference-ja debian-reference-pt debian-reference-pt-br debian-reference-zh-cn debian-reference-zh-tw dh-modaliases epoptes epoptes-client fglrx-pxpress grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-dbg grub-efi-amd64-signed kde-config-whoopsie kernel-wedge kodi-inputstream-adaptive kodi-inputstream-rtmp kopete kopete-data libbiblesync1.1 libbiblesync-dev libboinc7t64 libboinc-app7t64 libboinc-app-dev libkopete1 libkopete-dev libnvpair3linux libuutil3linux libzpool5linux linux-xilinx-headers-6.8.0-1008 linux-xilinx-tools-common linux-xilinx-tools-host localechooser-data ltsp minigalaxy nvidia-common nvidia-prime oem-qemu-meta ophcrack ophcrack-cli origami p7zip p7zip-full pipsi pvpgn python3-pip python3-pip-whl qsampler qstat r8168-dkms rman rtl8812au-dkms shim shim-dbg shim-signed simutrans simutrans-data simutrans-makeobj simutrans-pak64 smtube tatan torbrowser-launcher ubufox ubuntu-keyring user-mode-linux-doc vboot-kernel-utils vboot-utils w9wm winetricks xdrawchem xqf xul-ext-ubufox
+Package: 9menu acetoneiso b43-fwcutter bibledit bibledit-cloud bibledit-cloud-data bibledit-data bible-kjv bible-kjv-text bibletime bibletime-data boinc boinc-client boinc-client-nvidia-cuda boinc-client-opencl boinc-dev boinc-manager boinc-screensaver bumblebee debian-reference debian-reference-common debian-reference-de debian-reference-en debian-reference-es debian-reference-fr debian-reference-id debian-reference-it debian-reference-ja debian-reference-pt debian-reference-pt-br debian-reference-zh-cn debian-reference-zh-tw dh-modaliases fglrx-pxpress grub-efi-amd64-signed kde-config-whoopsie kodi-inputstream-adaptive kodi-inputstream-rtmp libbiblesync1.1 libbiblesync-dev libboinc7t64 libboinc-app7t64 libboinc-app-dev libnvpair3linux libuutil3linux libzpool5linux localechooser-data minigalaxy nvidia-common nvidia-prime ophcrack ophcrack-cli origami pipsi pvpgn python3-pip python3-pip-whl qsampler qstat r8168-dkms rman rtl8812au-dkms shim shim-dbg shim-signed simutrans simutrans-data simutrans-makeobj simutrans-pak64 smtube tatan torbrowser-launcher ubufox ubuntu-keyring user-mode-linux-doc w9wm winetricks xdrawchem xqf xul-ext-ubufox
Pin: release n=noble,o=Ubuntu
Pin-Priority: 500
$first_efi /boot/efi vfat nofail,$fstabstd 0 0
$first_boot_dev /mnt/boot btrfs nofail,$fstabstd,noatime,subvolid=0 0 0
EOF
- if ! fsf; then
+ if ! fsf && ! $skip_o; then
cat >> /tmp/fai/fstab <<EOF
/dev/mapper/crypt-${vgs[0]}-o /mnt/o btrfs nofail,$fstabstd,noatime,subvolid=0$mopts_o 0 0
EOF
if ! fsf; then
cat >>/tmp/fai/crypttab <<EOF
crypt-$vg-root /dev/$vg/root none keyscript=/root/keyscript,discard,luks,initramfs
-crypt-$vg-o /dev/$vg/o none keyscript=/root/keyscript,discard,luks,initramfs
crypt-$vg-swap /dev/$vg/swap /dev/urandom swap,cipher=aes-xts-plain64,size=256,hash=ripemd160
EOF
+ if ! $skip_o; then
+ cat >>/tmp/fai/crypttab <<EOF
+crypt-$vg-o /dev/$vg/o none keyscript=/root/keyscript,discard,luks,initramfs
+EOF
+ fi
fi
if fsf; then
cat >> /tmp/fai/fstab <<EOF
##### begin variable setup
+skip_o=false
partition=false
if ifclass REPARTITION; then
1|10) boot_space=$(( boot_space / 2 )) ;;
1c3) boot_space=$(( boot_space / 3 )) ;;
esac
+if ! fsf && (( boot_space < 500000 )); then
+ skip_o=true
+fi
+
if fsf; then
boot_mib=6000
-elif (( boot_space > 900000 )); then
+elif (( boot_space > 80000 )); then
# this is larger than needed for several /boot subvols,
# becuase I keep a minimal debian install on it for
# recovery needs and for doing pxe-kexec.
boot_mib=10000
- root2_mib=500000
+ root2_mib=$(( boot_space / 2 ))
+ if (( root2_mib > 500000 )); then
+ root2_mib=500000
+ fi
boot2_mib=5000
-elif (( boot_space > 30000 )); then
- boot_mib=$(( 5000 + (boot_space - 30000) / 2 ))
- root2_mib=100
- boot2_mib=100
else
# Small vms don't have room for /boot recovery. With 3 kernels
# installed, i'm using 132M on t8, so this seems like plenty of
# 600 = uefi 512 + grubext 8 + bios grub 3 + some extra cuz this is lvm
#root_mib=$(( disk_mib - root2_part_mib - swap_mib - boot_part_mib - boot2_part_mib - 600 ))
- # If we have extra devices, give /o some overhead so that we can
- # remove & then add a device if needed.
- o_factor=$devs_count
- if (( o_factor >= 2 )); then
- o_factor=$(( o_factor - 1 ))
+ if $skip_o; then
+ o_mib=0
+ else
+ # If we have extra devices, give /o some overhead so that we can
+ # remove & then add a device if needed.
+ o_factor=$devs_count
+ if (( o_factor >= 2 )); then
+ o_factor=$(( o_factor - 1 ))
+ fi
+ # note: math operations are left to right, so divide at the end.
+ o_mib=$(( 180 * 1000 * raid_duplication / o_factor ))
fi
- # note: math operations are left to right, so divide at the end.
- o_mib=$(( 180 * 1000 * raid_duplication / o_factor ))
# max minus o, minus a gig just for some extra space
max_root_mib=$(( disk_mib - root2_part_mib - swap_mib - boot_part_mib - boot2_part_mib - 600 - o_mib - 1000 ))
root_mib=$(( 1700 * 1000 )) # * 1000 to make it in gb.
else
# -L unit default mebibyte
lvcreate -y -L $root_mib $vg -n root
- if ! fsf; then
+ if ! fsf && ! $skip_o; then
lvcreate -y -L $o_mib $vg -n o
fi
lvcreate -y -L $swap_mib $vg -n swap
# sensitive data.
if ! fsf; then
luks-setup /dev/$vg/root crypt-$vg-root
- luks-setup /dev/$vg/o crypt-$vg-o
+ if ! $skip_o; then
+ luks-setup /dev/$vg/o crypt-$vg-o
+ fi
fi
if [[ $special_disk ]]; then
sleep 1
bpart ${root_devs[@]}
- if ! fsf; then
+ if ! fsf && ! $skip_o; then
bpart ${o_devs[@]}
fi
bpart ${boot_devs[@]}
else
cryptsetup luksOpen /dev/$vg/root crypt-$vg-root \
--key-file $luks_file
- cryptsetup luksOpen /dev/$vg/o crypt-$vg-o \
- --key-file $luks_file
+ if ! $skip_o; then
+ cryptsetup luksOpen /dev/$vg/o crypt-$vg-o \
+ --key-file $luks_file
+ fi
fi
done
fi
# https://nouveau.freedesktop.org/InstallNouveau.html
# And now in t11, things got worse with a newer card also not loading
# nouveau when it did in t10.
-if [[ $HOSTNAME != frodo ]] && lspci|grep -q 'VGA compatible controller: NVIDIA'; then
+if [[ $HOSTNAME != frodo && $HOSTNAME != kd ]] && lspci|grep -q 'VGA compatible controller: NVIDIA'; then
mkdir -p $target/etc/X11/xorg.conf.d/
cat >$target/etc/X11/xorg.conf.d/10-nouveau.conf <<'EOF'
Section "Device"
fi
## begin get new kernel and btrfs-progs ##
+apt-get -y install wget
+
case $HOSTNAME in
sy|so)
# note, on sy t11, severe wifi degredation on mainline 6.8
$ROOTCMD apt-get -y install linux-image-generic
;;
- frodo) : ;;
+ frodo|kd) : ;;
*)
if ! $ROOTCMD dpkg -s -- freesh-archive-keyring 2>&1 | grep -Fx "Status: install ok installed" &>/dev/null; then
- apt-get -y install wget
- wget -O $target/tmp/x.deb https://linux-libre.fsfla.org/pub/linux-libre/freesh/pool/main/f/freesh-archive-keyring/freesh-archive-keyring_1.1_all.deb
+ if ! wget -O $target/tmp/x.deb https://linux-libre.fsfla.org/pub/linux-libre/freesh/pool/main/f/freesh-archive-keyring/freesh-archive-keyring_1.3_all.deb; then
+ echo "error: check freesh keyring url at https://www.fsfla.org/ikiwiki/selibre/linux-libre/freesh.en.html" >&2
+ exit 1
+ fi
$ROOTCMD dpkg -i $target/tmp/x.deb
$ROOTCMD apt-get update
$ROOTCMD apt-get -y install linux-libre
fi
rm -f /srv/fai/nfsroot/root/.ssh/known_hosts
-if [[ $HOSTNAME == kd ]]; then
- keyscan_arg="-p 8989"
-fi
key=$(ssh-keyscan $keyscan_arg localhost |& grep -o "ecdsa-sha2-nistp256.*")
for ip in faiserver.b8.nz $(ip addr show up| grep -w '^ *inet' | awk '{print $2}'| cut -d / -f 1 | grep -vF 127.0.0.1); do
echo "$ip $key" >>/srv/fai/nfsroot/root/.ssh/known_hosts
## grub2 configuration
-set default="FAI server via dns"
+set default="FAI server via dns, no reboot"
set timeout=20
# make sure we can access partitions
menuentry "FAI server via dns to faiserver.b8.nz" {
set gfxpayload=$resolution
search --set=root --file /FAI-CD
- linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt,reboot FAI_CONFIG_SRC=nfs://faiserver.b8.nz/srv/fai/config root=/dev/nfs nfsroot=faiserver.b8.nz:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp
+ linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt,reboot FAI_CONFIG_SRC=nfs://faiserver.b8.nz/srv/fai/config root=/dev/nfs nfsroot=faiserver.b8.nz:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp console=ttyS0,115200
initrd /boot/initrd.img
}
menuentry "FAI server via dns, no reboot" {
set gfxpayload=$resolution
search --set=root --file /FAI-CD
- linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://faiserver.b8.nz/srv/fai/config root=/dev/nfs nfsroot=faiserver.b8.nz:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp
+ linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://faiserver.b8.nz/srv/fai/config root=/dev/nfs nfsroot=faiserver.b8.nz:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp console=ttyS0,115200
initrd /boot/initrd.img
}
menuentry "FAI server via 192.168.122.1, no reboot" {
set gfxpayload=$resolution
search --set=root --file /FAI-CD
- linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://192.168.122.1/srv/fai/config root=/dev/nfs nfsroot=192.168.122.1:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp
+ linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://192.168.122.1/srv/fai/config root=/dev/nfs nfsroot=192.168.122.1:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp console=ttyS0,115200
initrd /boot/initrd.img
}
# ro,noatime,vers=3,rsize=1048576,wsize=same,namelen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.2.0.2,nountvers=3,mountport=49179,mountproto=udp,lock_lock=all,addr=10.2.0.2
menuentry "Autodiscover the FAI server" {
search --set=root --file /FAI-CD
- linux /boot/vmlinuz libata.force=noncq FAI_FLAGS="menu,verbose,createvt" fai.discover rootovl root=/dev/nfs ip=dhcp quiet
+ linux /boot/vmlinuz libata.force=noncq FAI_FLAGS="menu,verbose,createvt" fai.discover rootovl root=/dev/nfs ip=dhcp quiet console=ttyS0,115200
initrd /boot/initrd.img
}