forked from jiangcuo/pve-iso-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grub.cfg
164 lines (144 loc) · 6 KB
/
grub.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
insmod gzio
insmod iso9660
insmod zfs
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
font=$prefix/unicode.pf2
fi
set gfxmode=1024x768,640x480
# set kernel parameter vga=791
# do not specify color depth here (else efifb can fall back to 800x600)
set gfxpayload=1024x768
#set gfxmode=auto
#set gfxpayload=keep
if loadfont $font; then
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod all_video
insmod png
insmod gfxterm
set theme=/boot/grub/pvetheme/theme.txt
export theme
terminal_input console
terminal_output gfxterm
fi
# Enable serial console
insmod serial
# FIXME: add below to our fixed-modules for next shim-review
insmod usbserial_common
insmod usbserial_ftdi
insmod usbserial_pl2303
insmod usbserial_usbdebug
if serial --unit=0 --speed=115200; then
terminal_input --append serial
terminal_output --append serial
set show_serial_entry=y
fi
if [ -f auto-installer-mode.toml ]; then
set timeout-style=menu
set timeout=10
menuentry 'Install Proxmox VE (Automated)' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox VE Automatic Installer ...'
linux /boot/linux26 ro ramdisk_size=16777216 rw quiet splash=silent proxmox-start-auto-installer
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img
}
fi
menuentry 'Install Proxmox VE (Graphical)' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox VE Installer ...'
linux /boot/linux26 ro ramdisk_size=16777216 rw quiet splash=silent
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img
}
menuentry 'Install Proxmox VE (Terminal UI)' --class debian --class gnu-linux --class gnu --class os {
set background_color=black
echo 'Loading Proxmox VE Console Installer ...'
linux /boot/linux26 ro ramdisk_size=16777216 rw quiet splash=silent proxtui vga=788
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img
}
if [ x"${show_serial_entry}" == 'xy' ]; then
menuentry 'Install Proxmox VE (Terminal UI, Serial Console)' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox Console Installer (serial) ...'
linux /boot/linux26 ro ramdisk_size=16777216 rw splash=verbose proxtui console=ttyS0,115200
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img
}
fi
submenu 'Advanced Options' {
menuentry 'Install Proxmox VE (Graphical, Debug Mode)' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox GUI Installer (debug) ...'
linux /boot/linux26 ro ramdisk_size=16777216 rw splash=verbose proxdebug vga=788
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img
}
menuentry 'Install Proxmox VE (Terminal UI, Debug Mode)' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox TUI Installer (debug) ...'
linux /boot/linux26 ro ramdisk_size=16777216 rw splash=verbose proxdebug proxtui vga=788
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img
}
menuentry 'Install Proxmox VE (Serial Console Debug Mode)' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox TUI Installer (serial, debug) ...'
linux /boot/linux26 ro ramdisk_size=16777216 rw splash=verbose proxdebug proxtui console=ttyS0,115200
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img
}
if [ ! -f auto-installer-mode.toml ]; then
menuentry 'Install Proxmox VE (Automated)' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox VE Automatic Installer ...'
linux /boot/linux26 ro ramdisk_size=16777216 rw quiet splash=silent proxmox-start-auto-installer
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img
}
fi
}
if [ "${grub_cpu}" = "arm64" ];then
menuentry 'Install Proxmox VE With Kernel 6.1 ' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox With Kernel 6.1 ...'
linux /boot/linux26-generic ro ramdisk_size=16777216 rw splash=verbose
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-generic
}
menuentry 'Install Proxmox VE With Kernel 6.1 (Terminal UI) ' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox With Kernel 6.1 ...'
linux /boot/linux26-generic ro ramdisk_size=16777216 rw splash=verbose proxtui vga=788
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-generic
}
menuentry 'Install Proxmox VE With Kernel 6.1 (Graphical, Debug Mode) ' --class debian --class gnu-linux --class gnu --class os {
echo 'Loading Proxmox With Kernel 6.1 ...'
linux /boot/linux26-generic ro ramdisk_size=16777216 rw splash=verbose proxdebug vga=788
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-generic
}
fi
menuentry 'Rescue Boot' --class debian --class gnu-linux --class gnu --class os {
insmod lvm
insmod ext2
set tmproot=$root
if test -e (lvm/pve-root)/boot/pve/vmlinuz; then
echo 'LVM Rescue Boot ...'
linux (lvm/pve-root)/boot/pve/vmlinuz ro ramdisk_size=16777216 root=/dev/mapper/pve-root
initrd (lvm/pve-root)/boot/pve/initrd.img
boot
else
insmod zfs
search --no-floppy --label rpool --set root
if test -e /ROOT/pve-1/@//boot/pve/vmlinuz; then
echo 'ZFS Rescue Boot ...'
linux /ROOT/pve-1/@//boot/pve/vmlinuz ro ramdisk_size=16777216 root=ZFS=rpool/ROOT/pve-1 boot=zfs
initrd /ROOT/pve-1/@//boot/pve/initrd.img
boot
else
echo 'ERROR: unable to find boot disk automatically.'
fi
fi
set root=$tmproot
}
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
fwsetup
}