Bläddra i källkod

Set kernel options within grub

Bob Mottram 7 år sedan
förälder
incheckning
c49e53eaee
2 ändrade filer med 6 tillägg och 0 borttagningar
  1. 4
    0
      src/freedombone-image-customise
  2. 2
    0
      src/freedombone-utils-setup

+ 4
- 0
src/freedombone-image-customise Visa fil

@@ -1069,6 +1069,8 @@ function image_setup_utils {
1069 1069
 
1070 1070
     if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'i386' ]]; then
1071 1071
         chroot "$rootdir" apt-get -yq install grub2
1072
+        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
1073
+        chroot "$rootdir" update-grub
1072 1074
     fi
1073 1075
 
1074 1076
     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
1380 1382
 if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'i386' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' ]]; then
1381 1383
     chroot "$rootdir" apt-get install -y cryptsetup zsh pinentry-curses iotop bc
1382 1384
     chroot "$rootdir" apt-get install -y grub2 hostapd
1385
+    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
1386
+    chroot "$rootdir" update-grub
1383 1387
 fi
1384 1388
 
1385 1389
 sed -i "s|#host-name=.*|host-name=${PROJECT_NAME}|g" $rootdir/etc/avahi/avahi-daemon.conf

+ 2
- 0
src/freedombone-utils-setup Visa fil

@@ -225,6 +225,8 @@ function initial_setup {
225 225
 
226 226
     if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'i386' ]]; then
227 227
         apt-get -yq install grub2
228
+        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
229
+        update-grub
228 230
     fi
229 231
 
230 232
     if [ ! -d $INSTALL_DIR ]; then