aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-07-03 09:54:04 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-07-03 09:54:04 -0300
commit4b5352e9a73b1d63f9432b24a4edaaec9f352b23 (patch)
tree3d38049a41593679447d8f93417b7ec24239d9e0 /share
parent4e7b5ca4b492a72186840677b990b2b543a76900 (diff)
downloadhydra-4b5352e9a73b1d63f9432b24a4edaaec9f352b23.tar.gz
hydra-4b5352e9a73b1d63f9432b24a4edaaec9f352b23.tar.bz2
Enhance grub.cfg
Diffstat (limited to 'share')
-rw-r--r--share/config/templates/bootless/grub.cfg29
1 files changed, 19 insertions, 10 deletions
diff --git a/share/config/templates/bootless/grub.cfg b/share/config/templates/bootless/grub.cfg
index 3864c4a..35827db 100644
--- a/share/config/templates/bootless/grub.cfg
+++ b/share/config/templates/bootless/grub.cfg
@@ -29,11 +29,13 @@ function bootfde {
insmod luks
insmod lvm
- cryptomount lvm/${1}
- set root=(crypto0)
-
set volume=${1}
- set version=${2}
+
+ if [ "${2}" ]; then
+ set version=${2}
+ else
+ set version=3.16.0-4-amd64
+ fi
if [ "${3}" ]; then
set source=${3}
@@ -47,10 +49,12 @@ function bootfde {
set target=root
fi
- echo "Loading ${volume}..."
- linux /boot/vmlinuz-${version} root=/dev/mapper/${target} cryptopts=target=${target},source=${source} ro quiet
- echo 'Loading initial ramdisk ...'
- initrd /boot/initrd.img-${version}
+ cryptomount lvm/${volume}
+ set root=(crypto0)
+ echo "Loading ${volume}..."
+ linux /boot/vmlinuz-${version} root=/dev/mapper/${target} cryptopts=target=${target},source=${source} ro quiet
+ echo 'Loading initial ramdisk ...'
+ initrd /boot/initrd.img-${version}
}
#
@@ -59,7 +63,12 @@ function bootfde {
#
function bootimg {
set volume=${1}
- set version=${2}
+
+ if [ "${2}" ]; then
+ set version=${2}
+ else
+ set version=3.16.0-4-amd64
+ fi
if [ "${3}" ]; then
set target=${3}
@@ -79,7 +88,7 @@ function bootimg {
set distro=debian
fi
- echo "Loading ${1}..."
+ echo "Loading ${1}..."
linux /boot/custom/${distro}/vmlinuz-${version} root=/dev/mapper/${rootfs} cryptopts=target=${target},source=${volume} ro quiet apparmor=1 security=apparmor
echo 'Loading initial ramdisk ...'
initrd /boot/custom/${distro}/initrd.img-${version}