summaryrefslogtreecommitdiff
path: root/grub-efi.sh
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-04-29 14:36:26 -0400
committerAndrew Cady <d@jerkface.net>2016-04-29 14:36:30 -0400
commit153d299a41b9be4e15dab1ca29bb93a74bd2445d (patch)
tree96fbfbe7c64f0b3f02f3d755e2b129917785bb98 /grub-efi.sh
parent5f41fb879ca830e5ad3345878e59072f3d6573bc (diff)
fix paths (in progress)
Diffstat (limited to 'grub-efi.sh')
-rwxr-xr-xgrub-efi.sh48
1 files changed, 0 insertions, 48 deletions
diff --git a/grub-efi.sh b/grub-efi.sh
deleted file mode 100755
index 76ee34a..0000000
--- a/grub-efi.sh
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2grub_config()
3{
4 cat <<EOF
5insmod echo
6echo GRUB
7insmod part_acorn
8insmod part_amiga
9insmod part_apple
10insmod part_bsd
11insmod part_dvh
12insmod part_gpt
13insmod part_msdos
14insmod part_plan
15insmod part_sun
16insmod part_sunpc
17
18insmod linux
19insmod iso9660
20
21echo Loading vmlinuz...
22linux /linux/vmlinuz boot=samizdat components quiet splash
23echo Loading initrd.img...
24initrd /linux/initrd.img
25echo Booting.
26echo
27boot
28
29EOF
30}
31
32real_destdir=grub-efi
33destdir=grub-efi.tmp
34
35set -e
36rm -r "${destdir}" 2>/dev/null || true
37mkdir -p "${destdir}"/grub/i386-pc/
38cp -r /usr/lib/grub/i386-pc/* "${destdir}"/grub/i386-pc/
39rm "${destdir}"/grub/i386-pc/*.img || true
40
41grub_config > "${destdir}"/load_cfg
42set -x
43grub-mkimage -O i386-pc -d /usr/lib/grub/i386-pc/ -o "${destdir}"/core.img -c "${destdir}"/load_cfg --prefix=/grub iso9660 biosdisk
44cat /usr/lib/grub/i386-pc/cdboot.img "${destdir}"/core.img > "${destdir}"/grub/i386-pc/eltorito.img
45cat /usr/lib/grub/i386-pc/boot.img "${destdir}"/core.img > "${destdir}"/embedded.img
46
47rm -r "$real_destdir" 2>/dev/null || true
48mv -T "$destdir" "$real_destdir"