Add missing files for network boot
This commit is contained in:
parent
bf6d06e794
commit
f33a0b8a21
6 changed files with 111 additions and 0 deletions
22
roles/netboot-grub/files/bootupdate.sh
Executable file
22
roles/netboot-grub/files/bootupdate.sh
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Podali niste nobenih argumentov"
|
||||||
|
echo "Podati jih morate v obliki:"
|
||||||
|
echo "[ime skripte] [novi default] [datoteke z nastavitvami]"
|
||||||
|
echo "Npr.:"
|
||||||
|
echo "bootupdate 1 by_classroom/pr05/*"
|
||||||
|
echo "Ali:"
|
||||||
|
echo "bootupdate windows by_name/pr05-*.cfg"
|
||||||
|
else
|
||||||
|
option=$1
|
||||||
|
shift
|
||||||
|
for filename in $@; do
|
||||||
|
if output=$(sed -i --follow-symlinks '1 c\set default='"$option"'' $filename); then
|
||||||
|
echo "Default boot v datoteki $filename je spremenjen na $option"
|
||||||
|
else
|
||||||
|
echo $output
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
fi
|
2
roles/netboot-grub/files/common/default.cfg
Normal file
2
roles/netboot-grub/files/common/default.cfg
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
set default=windows
|
||||||
|
source /grub/common/default_efi.cfg
|
4
roles/netboot-grub/files/common/default_efi.cfg
Normal file
4
roles/netboot-grub/files/common/default_efi.cfg
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
set timeout=5
|
||||||
|
set fallback=0
|
||||||
|
source /grub/common/main_efi.cfg
|
||||||
|
source /grub/common/netboot_entries.cfg
|
23
roles/netboot-grub/files/common/main_efi.cfg
Normal file
23
roles/netboot-grub/files/common/main_efi.cfg
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
menuentry "Reboot" --unrestricted --id uefi-reboot {
|
||||||
|
reboot
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Windows" --unrestricted --id windows {
|
||||||
|
# set root='hd0,gpt2'
|
||||||
|
# search --no-floppy --set root --label "EFI system partition"
|
||||||
|
search --no-floppy --set root --fs-uuid "3CD4-212D"
|
||||||
|
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Local Ubuntu" --unrestricted --id ubuntu {
|
||||||
|
insmod part_gpt
|
||||||
|
insmod ext2
|
||||||
|
insmod gzio
|
||||||
|
# search --no-floppy --set root --label "/"
|
||||||
|
search --no-floppy --set root --fs-uuid "78793264-76ab-4b98-bb46-687b75e8330d"
|
||||||
|
# set root='(hd0,gpt5)'
|
||||||
|
linux /@/boot/vmlinuz root=UUID=78793264-76ab-4b98-bb46-687b75e8330d pcie_aspm=off nvme_core.default_ps_max_latency_us=0 snd_hda_intel.pmic_detect=0 intel_iommu=on i915.enable_guc=0 i915.enable_gvt=1 rootflags=subvol=@ ro quiet splash
|
||||||
|
# linux /boot/vmlinuz root=PARTUUID= pcie_aspm=off nvme_core.default_ps_max_latency_us=0 snd_hda_intel.pmic_detect=0 intel_iommu=on i915.enable_guc=0 i915.enable_gvt=1 ro quiet splash
|
||||||
|
initrd /@/boot/initrd.img
|
||||||
|
}
|
||||||
|
|
53
roles/netboot-grub/files/common/maintenance_menu.cfg
Normal file
53
roles/netboot-grub/files/common/maintenance_menu.cfg
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
|
||||||
|
# ocs_live_run="/usr/sbin/ocs-sr -g auto -e1 auto -e2 -batch -j2 -o1 -scr -p poweroff restoredisk frth_test sda" text --
|
||||||
|
# ; tcpdump -i enp2s0 port 2232 -s 0 -vvv -w /tmp/mc.log &
|
||||||
|
|
||||||
|
# linux kernels/clonezilla_stable/vmlinuz boot=live union=overlay username=user netboot=nfs nfsroot=212.235.182.240:/srv/nfs/clonezilla/stable noprompt locales=en_US.UTF-8 keyboard-layouts=NONE ocs_prerun="mount -t nfs 212.235.182.240:/srv/nfs/clonezilla_images /home/partimag; cp /home/partimag/*.sh /usr/share/drbl/postrun/ocs/; ifconfig eno1 promisc; ip route add 224.0.0.0/4 dev eno1" ocs_live_run="/usr/sbin/ocs-sr -g auto -e1 auto -e2 -batch -j2 -o1 -scr -k -y2 -p choose --max-time-to-wait 120 --mcast-port 2232 multicast_restoredisk frth_test sda" text --
|
||||||
|
|
||||||
|
# linux kernels/clonezilla_stable/vmlinuz boot=live union=overlay username=user netboot=nfs nfsroot=212.235.182.240:/srv/nfs/clonezilla/stable noprompt locales=en_US.UTF-8 keyboard-layouts=NONE ocs_prerun="mount -t nfs 212.235.182.240:/srv/nfs/clonezilla_images /home/partimag" ocs_live_run="sudo /home/partimag/deploy.sh; sleep 30; sudo /home/partimag/script.sh" text --
|
||||||
|
|
||||||
|
|
||||||
|
submenu "Maintenance Menu" --users pope {
|
||||||
|
|
||||||
|
menuentry "Clonezilla TEST" --id clonezilla-default {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux kernels/clonezilla_stable/vmlinuz boot=live union=overlay username=user netboot=nfs nfsroot=212.235.182.240:/srv/nfs/clonezilla/stable noprompt locales=en_US.UTF-8 keyboard-layouts=NONE ocs_prerun="mount -t nfs 212.235.182.240:/srv/nfs/clonezilla_images /home/partimag; /home/partimag/polz_scripts/prerun.sh" ocs_live_run="/home/partimag/polz_scripts/live_run.sh" text --
|
||||||
|
initrd kernels/clonezilla_stable/initrd.img
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
menuentry "Clonezilla 20190108 - premount" {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux kernels/clonezilla_stable/vmlinuz boot=live union=overlay username=user netboot=nfs nfsroot=212.235.182.240:/srv/nfs/clonezilla/stable ocs_prerun="mount -t nfs 212.235.182.240:/srv/nfs/clonezilla_images /home/partimag" splash --
|
||||||
|
initrd kernels/clonezilla_stable/initrd.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Clonezilla 20190108" {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux kernels/clonezilla_stable/vmlinuz boot=live union=overlay username=user netboot=nfs nfsroot=212.235.182.240:/srv/nfs/clonezilla/stable splash --
|
||||||
|
initrd kernels/clonezilla_stable/initrd.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Clonezilla Beta_1010 Automated" {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux kernels/clonezilla_beta_1010/vmlinuz boot=live union=overlay username=user netboot=nfs nfsroot=212.235.182.240:/srv/nfs/pxe/clonezilla_beta_1010 noprompt locales=en_US.UTF-8 keyboard-layouts=NONE ocs_prerun="mount -t nfs 212.235.182.240:/srv/nfs/clonezilla_images /home/partimag" ocs_live_run="/usr/sbin/ocs-sr -g auto -e1 auto -e2 -r -j2 -scr -p shutdown restoredisk ask_user ask_user" text --
|
||||||
|
initrd kernels/clonezilla_beta_1010/initrd.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Clonezilla Normal Automated" {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux kernels/clonezilla/vmlinuz boot=live union=overlay username=user netboot=nfs nfsroot=212.235.182.240:/srv/nfs/pxe/clonezilla noprompt locales=en_US.UTF-8 keyboard-layouts=NONE ocs_prerun="mount -t nfs 212.235.182.240:/srv/nfs/clonezilla_images /home/partimag" ocs_live_run="/usr/sbin/ocs-sr -g auto -e1 auto -e2 -r -j2 -scr -p shutdown restoredisk ask_user sda" text --
|
||||||
|
initrd kernels/clonezilla/initrd.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Automated Deploy FKKT" --unrestricted{
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux kernels/clonezilla_beta_2708/vmlinuz boot=live union=overlay username=user netboot=nfs nfsroot=212.235.182.240:/srv/nfs/pxe/clonezilla_beta_2708 noprompt locales=en_US.UTF-8 keyboard-layouts=NONE ocs_prerun="mount -t nfs 212.235.182.243:/images /home/partimag" ocs_live_run="/usr/sbin/ocs-sr -g auto -e1 auto -e2 -r -j2 -scr -p shutdown restoredisk 2018-09-18-17-LenovoM83FKKT sda" text --
|
||||||
|
initrd kernels/clonezilla_beta_2708/initrd.img
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
set superusers="pope"
|
||||||
|
password_pbkdf2 pope grub.pbkdf2.sha512.10000.C793C2D189306C790C3252592875ED9BE55A5362D1C3FB0880C784EC097325C60D50DD40F8593D9A27C3ABFEA1F7AC7616315E0B6CEE6324513748F2E2269A5F.E7F1265D94B61D81FD9EA1E03390BBCB59A5DBCFFAD4EB007E167C5EA9DEB2E90B14BCF02A48EAC7DA1D6554B4BBC099D93051EE80888E7B425D308FF26F2021
|
7
roles/netboot-grub/files/common/util_efi.cfg
Normal file
7
roles/netboot-grub/files/common/util_efi.cfg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
menuentry 'System setup' --unrestricted --id 'uefi-firmware' {
|
||||||
|
fwsetup
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'Memory test (memtest86)' --unrestricted -id 'memtest' {
|
||||||
|
chainloader /grub/memtest/BOOTX64.efi
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue