Skip to content

Instantly share code, notes, and snippets.

@fajarnugraha
fajarnugraha / grub.cfg
Last active August 29, 2015 14:16
Grub config to enable automatic creation of grub menu entries on zfs root, needs lua module. Download to /rpool/grub/grub.cfg
set timeout=5
menuentry 'Ubuntu Trusty boot menu' {
configfile /ROOT/ubuntu/@/boot/grub/grub.cfg
}
menuentry "--- Auto-generated zfs root entries ---" {
insmod zfs
}
@fajarnugraha
fajarnugraha / zfsroot.lua
Last active November 7, 2016 09:45
Grub lua script to enable automatic creation of grub menu entries on zfs root. Download to /rpool/grub/zfsroot.lua
-- Change this two variables with your actual setup
rpool="rpool"
zfs_rootdir="ROOT"
-- End of user-editable section
ds = ""
snap = ""
snap_dir = ""
function find_kernel_pair (name)
#!/bin/sh
#
# lxc: linux Container library
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.