summarylogtreecommitdiffstats
path: root/08_linux_linode
blob: b781127b61212af175f5f7ea295c9e143b5feeea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /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/vmlinuz-linux-linode root=${GRUB_DEVICE} rw ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-linode.img
}
EOF