grub.cfg 5.35 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11

if loadfont /boot/grub/font.pf2 ; then
	set gfxmode=auto
	insmod efi_gop
	insmod efi_uga
	insmod gfxterm
	terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
Gustav Geier's avatar
Gustav Geier committed
12

13 14
set pager=1

Gustav Geier's avatar
Gustav Geier committed
15 16
function set64 {
  set bits="64"
Christopher's avatar
Christopher committed
17
  set arch="x86_64"
Gustav Geier's avatar
Gustav Geier committed
18 19 20 21 22
  set altbits="32"
}

function set32 {
 set bits="32"
Christopher's avatar
Christopher committed
23
 set arch="i686"
Gustav Geier's avatar
Gustav Geier committed
24 25 26
 set altbits="64"
}

27

Gustav Geier's avatar
Gustav Geier committed
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
function guesscpu {
  if cpuid -l
  then
    echo "Dein System scheint ein 64-bit System zu sein."
    set64
  else
    echo "Dein System scheint ein 32-bit System zu sein."
    set32
  fi
  echo "Die weiseste Wahl sollte $bits bits mit $iso und $isoinitrd zu sein"
  echo
}

#elif is not working in this grub version !?!
if test -z $bits
then
  guesscpu
else
  if test 64 == $bits
  then
    set64
  else
    set32
  fi
fi

54 55
set gfxpayload=keep

56 57 58 59 60 61 62 63 64 65 66
#default values
set lip_flavor="Kubuntu"
set lip_version="14.04"
set lip_release="trusty"
set lip_extra_info=""

#if lipinfo.cfg exists use it to get better values for the lip_* variables.
if [ -f /grub/lipinfo.cfg ]; then
  source /grub/lipinfo.cfg
fi

67 68
# Start a Debian style Casper Kernel
function LoadCasper {
69
	echo	"Loading kernel-${arch} (takes up to 2 minutes)"
Gustav Geier's avatar
Gustav Geier committed
70
	linux	/casper/vmlinuz-${arch} boot=casper file=/cdrom/preseed/kubuntu.seed ${cmdline} unionstack=lip-common.squashfs:lip-${arch}.squashfs nosplash verbose --
71 72
	echo 	"Loading initrd-${arch} (takes up to 5 minutes)"
	initrd	/casper/initrd-${arch}.lz
Gustav Geier's avatar
Gustav Geier committed
73 74 75
	echo 	"Starting kernel"
}

76
menuentry "Empfohlen: ${lip_flavor} ${lip_version}${lip_extra_info} ${bits}bit (deutsch)" {
77
	set cmdline="debian-installer/language=de keyboard-configuration/layoutcode?=de"
78
	LoadCasper
Gustav Geier's avatar
Gustav Geier committed
79 80
}

81
menuentry "Empfohlen: ${lip_flavor} ${lip_version}${lip_extra_info} ${bits}bit (english)" {
Christopher's avatar
Christopher committed
82
	set cmdline=""
83
	LoadCasper
Gustav Geier's avatar
Gustav Geier committed
84 85 86 87 88 89
}

menuentry "========================= Helfermenu ===============================" {
	echo "hier ist nichts"
}

90 91 92 93 94 95 96 97 98 99 100 101 102
#menuentry "Helfermenu. Nur Nach Ruecksprache mit einem Install-Helfer benutzen." {
#   export bits
#   set autobits=${bits}
#   export autobits
#   configfile (${root})/boot/grub/helfer.cfg
#}

menuentry "Toggle 32/64 bits" {
     set tmp cbit=${bits}
     set bits=${altbits}
     set altbits=${cbit}
     export bits
     configfile ($root)/grub/grub.cfg
Gustav Geier's avatar
Gustav Geier committed
103 104
}

105
menuentry "Tool: Check ${bits}bit install medium for defects" {
Christopher's avatar
Christopher committed
106
	set cmdline="integrity-check"
107
	LoadCasper
Gustav Geier's avatar
Gustav Geier committed
108 109
}

110 111
menuentry "Tool: 32bit GParted Live CD (laeuft im RAM -> mindestens 224MB)" {
  # Hint: remove "toram=..." to make it work with 128mb ram
112
  loopback loop ($root)/gparted-live-i686.iso
113
  echo 	   "Loading 32 bit GParted kernel (takes up to 2 minutes)"
114
  linux    (loop)/live/vmlinuz boot=live config noswap noprompt nosplash findiso=/gparted-live-i686.iso toram=filesystem.squashfs
115 116 117
  echo 	   "Loading initrd from iso (takes up to 5 minutes)"  
  initrd   (loop)/live/initrd.img
  echo 	   "Starting 32 bit GParted kernel"
Gustav Geier's avatar
Gustav Geier committed
118 119
}

120 121
menuentry "Tool: 64bit GParted Live CD (laeuft im RAM -> mindestens 224MB)" {
  # Hint: remove "toram=..." to make it work with 128mb ram
122
  loopback loop ($root)/gparted-live-x86_64.iso
123
  echo 	   "Loading 64 bit GParted kernel (takes up to 2 minutes)"
124
  linux    (loop)/live/vmlinuz boot=live config noswap noprompt nosplash findiso=gparted-live-x86_64.iso toram=filesystem.squashfs
125 126 127 128 129
  echo 	   "Loading initrd from iso (takes up to 5 minutes)"  
  initrd   (loop)/live/initrd.img
  echo 	   "Starting 64 bit GParted kernel"
}

130
menuentry "${lip_flavor} ${lip_version}${lip_extra_info} ${bits}bit (deutsch, failsafe)" {
Christopher's avatar
Christopher committed
131
	set cmdline="debian-installer/locale=de_DE console-setup/layoutcode=de nomodeset noplymouth nosplash verbose text noacpi"
132 133 134
	LoadCasper
}

135
menuentry "${lip_flavor} ${lip_version}${lip_extra_info} ${bits}bit (english, failsafe)" {
Christopher's avatar
Christopher committed
136
	set cmdline="nomodeset noplymouth nosplash verbose text noacpi"
137
	LoadCasper
Gustav Geier's avatar
Gustav Geier committed
138 139
}

140 141 142 143 144 145 146 147 148 149
menuentry "${lip_flavor} ${lip_version}${lip_extra_info} ${bits}bit (deutsch, fnord)" {
        set cmdline="debian-installer/locale=de_DE console-setup/layoutcode=de fnord"
        LoadCasper
}

menuentry "${lip_flavor} ${lip_version}${lip_extra_info} ${bits}bit (english, fnord)" {
        set cmdline="fnord"
        LoadCasper
}

150 151
menuentry "Show bootflags" {
	cat "/bootflags.txt"
152
	read
153 154
}

155
menuentry "${lip_flavor} ${lip_version}${lip_extra_info} ${bits}bit (deutsch, load casper from first disk)" {
156 157 158 159
        set cmdline="debian-installer/locale=de_DE console-setup/layoutcode=de live-media=/dev/sda1"
        LoadCasper
}

160
menuentry "${lip_flavor} ${lip_version}${lip_extra_info} ${bits}bit (english, load casper from first disk)" {
161 162 163 164
        set cmdline="live-media=/dev/sda1"
        LoadCasper
}

165
menuentry "Tool: Memtest86+" {
Christopher's avatar
Christopher committed
166
  loopback loop ($root)/gparted-live-i686.iso
167 168 169
  echo     "Loading memtest"
  linux16  (loop)/live/memtest
  echo 	   "Starting Memtest86Plus"
Gustav Geier's avatar
Gustav Geier committed
170
}
171 172 173 174 175 176 177 178 179 180 181 182 183 184

menuentry "Tool: FreeDOS (nicht mit EFI)" {
 echo      "Loading memdisk"
 linux16   /FreeDOS/memdisk
 echo      "Loading FreeDOS"
 initrd16  /FreeDOS/freedos144.img
 echo      "Starting FreeDOS"
}

menuentry "Tool: EFI-Shell" {
 echo      "Loading EFI-Shell"
 chainloader /EFI/shell/Shell.efi
}

185
menuentry "Chainload full featured grubx64.efi" {
186 187 188 189 190 191 192
  if [ -f /EFI/boot/grubx64-unsigned.efi ]; then
    echo      "Chainloading /EFI/boot/grubx64-unsigned.efi"
    chainloader /EFI/boot/grubx64-unsigned.efi
  else
    echo      "Chainloading /EFI/grub/grubx64.efi"
    chainloader /EFI/grub/grubx64.efi
  fi
193 194
}

195 196 197 198 199 200 201
menuentry "Tool: System-Firmware" {
 echo      "Entering Firmware"
 fwsetup
}

#end;