summaryrefslogtreecommitdiff
path: root/package/grub/files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-02-09 04:01:36 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-02-09 04:01:57 +0100
commit571d99e74d42fac830069c2ca2fbd5f505613dc6 (patch)
treedb2700a1dd94b5b6760ee19573ef7395e6e1d901 /package/grub/files
parentfdfd165799d762acd6cf5871bfcb1493da1359e9 (diff)
add dual-boot / fwupdate for systems with grub-support
Diffstat (limited to 'package/grub/files')
-rw-r--r--package/grub/files/grub-dual.cfg50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/grub/files/grub-dual.cfg b/package/grub/files/grub-dual.cfg
new file mode 100644
index 000000000..bae2fa414
--- /dev/null
+++ b/package/grub/files/grub-dual.cfg
@@ -0,0 +1,50 @@
+if [ "x\${timeout}" != "x-1" ]; then
+ if keystatus; then
+ if keystatus --shift; then
+ set timeout=-1
+ else
+ set timeout=0
+ fi
+ else
+ if sleep --interruptible 2; then
+ set timeout=0
+ fi
+ fi
+fi
+
+if [ -s $prefix/grubenv ]; then
+ set have_grubenv=true
+ load_env
+fi
+if [ "${next_entry}" ] ; then
+ set default="${next_entry}"
+ set next_entry=
+ save_env next_entry
+ set boot_once=true
+else
+ set default="${saved_entry}"
+fi
+if [ "${prev_saved_entry}" ]; then
+ set saved_entry="${prev_saved_entry}"
+ save_env saved_entry
+ set prev_saved_entry=
+ save_env prev_saved_entry
+ set boot_once=true
+fi
+
+function savedefault {
+ if [ -z "${boot_once}" ]; then
+ saved_entry="${chosen}"
+ save_env saved_entry
+ fi
+}
+
+menuentry "OpenADK1" {
+ set root=(hd0,2)
+ linux (hd0,2)/kernel root=/dev/@@ROOTDEV@@2 rootfstype=ext4 rootwait panic=5
+}
+menuentry "OpenADK2" {
+ set root=(hd0,3)
+ linux (hd0,3)/kernel root=/dev/@@ROOTDEV@@3 rootfstype=ext4 rootwait panic=5
+}
+