This is from parted -m $d unit MiB print.
It happens when there are no partitions yet.
-# linode notes
+
+######## notes on creating a lan with just 2 computers ########
+
+
+## below assumes eth0 is the ethernet device used to connect to the target computer.
+
+
+# this is not strictly needed. I had my connection die at some point,
+# and I suspected this might help.
+# based on
+# https://support.qacafe.com/knowledge-base/how-do-i-prevent-network-manager-from-controlling-an-interface/
+cat > /etc/NetworkManager/conf.d/99-fai-tmp.conf <<'EOF'
+[main]
+plugins=keyfile
+
+[keyfile]
+unmanaged-devices=interface-name:eth0
+EOF
+ser restart NetworkManager
+
+
+cat >> /etc/network/interfaces <<'EOF'
+iface eth0 inet static
+address 10.0.44.1/24
+EOF
+
+ifup eth0
+
+# note turn off fsf vpn, so route to coresite is the normal route.
+echo 1 > /proc/sys/net/ipv4/ip_forward
+m s iptables -t nat -A POSTROUTING -o $(ip -4 route get 8.8.8.8 | sed -nr 's,^.* dev\s+(\S+).*,\1,p') -j MASQUERADE
+
+
+change /p/c/machine_specific/vps/bind-initial/db.b8.nz
+faiserver 10.0.44.1
+TARGET 10.0.44.2
+
+apt install isc-dhcp-server
+
+cat >> /etc/default/isc-dhcp-server <<'EOF'
+INTERFACESv4="eth0"
+EOF
+
+edit ./dhcpd.conf to change mac address and target host name.
+
+s cp /b/fai/dhcpd.conf /etc/dhcp/
+ser restart isc-dhcp-server
+
+edit /a/bin/fai/fai/config/class/51-multi-boot
+
+pxe-server -d TARGET fai
+
+Then do a pxe boot on the target host
+
+
+
+##### linode notes ######
* create 2 disks, installer (3000 mb, raw), boot (remaining, raw)
* create 2 profiles w direct boot, no helpers:
settings.
-# ubuntu notes
+
+###### ubuntu notes ######
For someone who really needed ubuntu on host tp, otherwise they would
end up on a non-gnu os, and I didn't want to figure out how to get all
--- /dev/null
+#
+
+# iank: just guessing here.
+authoritative;
+
+
+deny unknown-clients;
+option dhcp-max-message-size 2048;
+use-host-decl-names on;
+
+subnet 10.0.44.0 netmask 255.255.255.0 {
+option routers 10.0.44.1;
+option domain-name "b8.nz";
+option domain-search "b8.nz";
+option domain-name-servers 8.8.8.8;
+option ntp-servers 0.ubuntu.pool.ntp.org, 1.ubuntu.pool.ntp.org, ntp.ubuntu.com;
+# iank: not sure why this is here, but not in
+#server-name faiserver;
+option time-offset -18000; # Eastern Standard Time
+}
+
+host community0p {
+next-server faiserver.b8.nz;
+filename "pxelinux.0";
+
+hardware ethernet 00:1f:16:14:01:d8;
+# 1st mobo, mostly fails to boot
+#hardware ethernet 08:60:6e:10:f0:fe;
+fixed-address 10.0.44.2;
+option host-name "x3";
+}
+
+
+default-lease-time 600;
+max-lease-time 7200;
# we hssh and ssh_filter_btrbk for the initial btrbk (alternatively, I could open up the
# permissions in authorized_keys, but that just seems lazy)
install --owner=iank --group=iank -d fai/config/files/usr/local/bin/hssh
-rsync -atL /a/bin/ds/hssh fai/config/files/usr/local/bin/hssh/IANK
install --owner=iank --group=iank -d fai/config/files/usr/local/bin/ssh_filter_btrbk.sh
rsync -atL /a/opt/btrbk/ssh_filter_btrbk.sh fai/config/files/usr/local/bin/ssh_filter_btrbk.sh/STANDARD
usage() {
cat <<EOF
-Usage: ${0##*/} [OPTION]
+Usage: ${0##*/} [OPTION] [HOST]
If grub var set, act like pxe rom and pxe-kexec to faiserver
-f|--force do kexec if we can reach faiserver
try-kexec() {
deadline=$(( `date +%s` + NETWORK_TIMOUT_SECS ))
- while ! timeout -s 9 3 nc -zu faiserver 69; do
+ while ! timeout -s 9 3 nc -zu $faiserver 69; do
if (( `date +%s` > deadline )); then
echo "fai-check: hit $NETWORK_TIMOUT_SECS s tftp server timeout"
return 0
fi
sleep 1
done
- m pxe-kexec -n --ignore-whitelist -l fai-generated faiserver ||:
+ m pxe-kexec -n --ignore-whitelist -l fai-generated $faiserver ||:
}
+force=false
case $1 in
+ -h|--help)
+ usage
+ ;;
-f|--force)
- try-kexec
- exit
+ force=true
+ shift
;;
esac
+faiserver=${1:-faiserver}
+
+
+if $force; then
+ try-kexec
+ exit
+fi
first=true
for dev in $(btrfs fi show / | sed -rn 's#^\s*devid\s.*\s([^0-9 ]+)\S+$#\1#p' \
|sort); do
+ found=false
# Decide which is my grub_ext partition. see partition.DEFAULT file
- # for details
- if [[ $(blockdev --getsize64 ${dev}4) == 8388608 ]]; then
- # Old partition scheme
- grub_extn=${dev}4
- elif [[ $(blockdev --getsize64 ${dev}5) == 8388608 ]]; then
- # Old partition scheme
- grub_extn=${dev}5
- else
- grub_extn=${dev}7
+ # for details. currently it is 4
+ for (( i=4; i<=7; i++ )); do
+ if [[ $(blockdev --getsize64 ${dev}$i) == 8388608 ]]; then
+ grub_extn=${dev}$i
+ break
+ fi
+ done
+ if ! $found; then
+ echo "$0: error: failed to find grub_ext partition."
+ exit 1
fi
mount $grub_extn /mnt
if $first; then
# xorg stopped load nouveau
# https://www.linuxquestions.org/questions/slackware-14/kernel-modules-conflicting-with-nouveau-driver-4175623867/
# https://nouveau.freedesktop.org/InstallNouveau.html
-if lspci|grep -q 'GeForce GTX 6[0-9][0-9]\]'; then
+# And now in t11, things got worse with a newer card also not loading
+# nouveau when it did in t10.
+if 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"
--- /dev/null
+#
+
+# iank: just guessing here.
+authoritative;
+
+
+deny unknown-clients;
+option dhcp-max-message-size 2048;
+use-host-decl-names on;
+
+subnet 209.51.188.0 netmask 255.255.255.0 {
+option routers 209.51.188.1;
+option domain-name "fsf.org";
+option domain-search "fsf.org";
+option domain-name-servers 209.51.188.16;
+option ntp-servers 0.ubuntu.pool.ntp.org, 1.ubuntu.pool.ntp.org, ntp.ubuntu.com;
+# iank: not sure why this is here, but not in
+#server-name faiserver;
+option time-offset -18000; # Eastern Standard Time
+}
+
+host community0p {
+next-server faiserver.fsf.org;
+filename "pxelinux.0";
+
+hardware ethernet ac:22:0b:1d:11:f9;
+# 1st mobo, mostly fails to boot
+#hardware ethernet 08:60:6e:10:f0:fe;
+fixed-address 209.51.188.193;
+option host-name "community0p";
+}
+
+
+default-lease-time 600;
+max-lease-time 7200;
bond=true
shift
;;
+ --no-r)
+ fai_reboot_arg=
+ shift
+ ;;
esac
done
host=$1
+
rm -f /srv/tftp/fai/pxelinux.cfg/*
if [[ ! $1 ]]; then
echo "$0: clearing pxe config and exiting"
exit 0
fi
+# somewhat duplicated in brc hostip()
+ case $host in
+ [0-9:])
+ hostip=$host
+ ;;
+ *)
+ hostip=$(getent ahostsv4 "$host" | awk '{ print $1 }' | head -n1)
+ ;;
+ esac
+
+
# assuming ipv4, or else we might need to deal with multiple addresses
# in an ipv4 + ipv6 network.
-my_ip=$(ip -4 route get 8.8.8.8 | sed -nr 's,^.*src\s+(\S+).*,\1,p')
+my_ip=$(ip -4 route get $hostip | sed -nr 's,^.*src\s+(\S+).*,\1,p')
if [[ ! $my_ip || $my_ip =~ [[:space:]] ]]; then
echo "$0: error: failed to get \$my_ip, got: $my_ip"
exit 1
-d Don't alter dhcp config. Only make sense for fai type, and on network
other than home or fsf, when using fai-cd, or pxe-kexec.
-k Pass -k to myfai-chboot.
+--no-r Pass --no-r to myfai-chboot.
-r Don't redeploy fai config. For example, if there is a different host
that is mid-install.
esac
chboot_args=()
-temp=$(getopt -l help adkrSwh "$@") || usage 1
+temp=$(getopt -l no-r,help adkrSwh "$@") || usage 1
eval set -- "$temp"
while true; do
case $1 in
-a) wait=true; set=false; shift ;;
-d) dhcp=false; shift ;;
-k) chboot_args+=(-k); shift ;;
+ --no-r) chboot_args+=(--no-r); shift ;;
-r) redep=false; shift ;;
-S) chboot_args+=(-S); shift ;;
-w) wait=true; set=true; shift ;;
option src wan
option src_dport 80
option dest lan
- option dest_ip $l.7
+ option dest_ip $l.2
option proto tcp
config rule
option src wan
option src wan
option src_dport 443
option dest lan
- option dest_ip $l.7
+ option dest_ip $l.2
option proto tcp
config rule
option src wan