Set kernel options within grub

This commit is contained in:
Bob Mottram 2017-06-20 11:00:06 +01:00
parent d86e29088a
commit c49e53eaee
2 changed files with 6 additions and 0 deletions

View File

@ -1069,6 +1069,8 @@ function image_setup_utils {
if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'i386' ]]; then
chroot "$rootdir" apt-get -yq install grub2
sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="quiet ifnames=0 slub_debug=FZP slab_nomerge page_poison=1"|g' $rootdir/etc/default/grub
chroot "$rootdir" update-grub
fi
chroot "$rootdir" apt-get -yq install locales locales-all debconf
@ -1380,6 +1382,8 @@ chroot "$rootdir" apt-get install -y locales locales-all debconf wireless-tools
if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'i386' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' ]]; then
chroot "$rootdir" apt-get install -y cryptsetup zsh pinentry-curses iotop bc
chroot "$rootdir" apt-get install -y grub2 hostapd
sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="quiet ifnames=0 slub_debug=FZP slab_nomerge page_poison=1"|g' $rootdir/etc/default/grub
chroot "$rootdir" update-grub
fi
sed -i "s|#host-name=.*|host-name=${PROJECT_NAME}|g" $rootdir/etc/avahi/avahi-daemon.conf

View File

@ -225,6 +225,8 @@ function initial_setup {
if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'i386' ]]; then
apt-get -yq install grub2
sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="quiet ifnames=0 slub_debug=FZP slab_nomerge page_poison=1"|g' /etc/default/grub
update-grub
fi
if [ ! -d $INSTALL_DIR ]; then