more aramo/jammy updates
[automated-distro-installer] / grub.cfg.autodiscover
1 ## grub2 configuration
2 set default="FAI server via dns"
3 set timeout=20
4
5 # make sure we can access partitions
6 insmod part_msdos
7 insmod part_gpt
8 insmod all_video
9 insmod gfxterm
10
11 set gfxmode=auto
12 set color_normal=white/black
13 set color_highlight=red/black
14 set menu_color_normal=white/black
15 set menu_color_highlight=black/yellow
16
17
18 # ian: Added this from fai
19 # note, we could replace faiserver with an ip if we didn't want to mess with dns.
20 # args are copied from myfai-chboot-local.
21 # Note, for a real cd or usb flash, if it is the default boot device, we would need to remove the disk
22 # after install is done very quickly, or else remove the reboot arg here
23 menuentry "FAI server via dns" {
24 set gfxpayload=$resolution
25 search --set=root --file /FAI-CD
26 linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt,reboot FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config root=/dev/nfs nfsroot=faiserver:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp
27 initrd /boot/initrd.img
28 }
29
30 menuentry "FAI server via dns, no reboot" {
31 set gfxpayload=$resolution
32 search --set=root --file /FAI-CD
33 linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config root=/dev/nfs nfsroot=faiserver:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp
34 initrd /boot/initrd.img
35 }
36
37 # 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
38 menuentry "Autodiscover the FAI server" {
39 search --set=root --file /FAI-CD
40 linux /boot/vmlinuz libata.force=noncq FAI_FLAGS="menu,verbose,createvt" fai.discover rootovl root=/dev/nfs ip=dhcp quiet
41 initrd /boot/initrd.img
42 }
43
44 menuentry "Boot OS from first partition on first disk" {
45 if [ "$grub_platform" = "efi" ]; then
46 if [ -f (hd0,gpt1)/efi/debian/grub.cfg ]; then
47 configfile (hd0,gpt1)/efi/debian/grub.cfg
48 elif [ -f (hd1,gpt1)/efi/debian/grub.cfg ]; then
49 configfile (hd1,gpt1)/efi/debian/grub.cfg
50 elif [ -f (hd0,gpt2)/boot/grub/grub.cfg ]; then
51 configfile (hd0,gpt2)/boot/grub/grub.cfg
52 elif [ -f (hd1,gpt2)/boot/grub/grub.cfg ]; then
53 configfile (hd1,gpt2)/boot/grub/grub.cfg
54 else
55 echo "cannot find grub.cfg"
56 sleep 7
57 fi
58 # legacy BIOS booting
59 elif [ -d (cd) ]; then
60 set root=(hd0)
61 chainloader +1
62 else
63 set root=(hd1)
64 chainloader +1
65 fi
66 }