aboutsummarylogtreecommitdiffstats
path: root/08_linux_linode
blob: 62a15952092ff918d26f7e6d581d58033ad261d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/bash
. /usr/share/grub/grub-mkconfig_lib

devid="$(grub_get_device_id "${GRUB_DEVICE}")"
savedefault=$(save_default_entry)

[ "$devid" ] || exit 1

cat <<EOF
menuentry 'Arch Linux for Linode' --class arch --class gnu-linux --class gnu --class os \$menuentry_id_option 'gnulinux-simple-${devid}' {
	${savedefault}
	set gfxpayload=text
	insmod gzio
	$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)
	echo	'Loading Linux linux-linode ...'
	linux	/boot/vmlinuzll-linux-linode root=${GRUB_DEVICE} loglevel=4 rw rootflags=noatime,nodiratime,data=ordered,barrier=0,commit=5,errors=remount-ro swapaccount=0 kaslr ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} console=ttyS0,19200n8 net.ifnames=0
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-linode.img
}
EOF

echo "Wrote to grub menu: linux-linode" >&2