diff --git a/scripts/make_kernel.sh b/scripts/make_kernel.sh new file mode 100755 index 0000000..0065f4b --- /dev/null +++ b/scripts/make_kernel.sh @@ -0,0 +1,28 @@ +#!/bin/sh +set -e + +NEW=$(grep "Kernel Configuration" /usr/src/linux/.config | awk '{print $3}') +echo $NEW + +cd /usr/src/linux-${NEW} +# make clean +# make oldconfig +make -j4 menuconfig +make -j4 all +make -j4 modules_install +make install + +cp /usr/src/linux/.config /etc/kernels/kernel-config-${NEW} + +# rm -f /boot/*.previous +if [ -f "/boot/initrd-${NEW}" ] ; then + mv "/boot/initrd-${NEW}" "/boot/initrd-${NEW}.previous" +fi + +dracut -H --force --strip /boot/initrd-${NEW} ${NEW} + +grub2-mkconfig -o /boot/grub2/grub.cfg + +echo "After successful boot of new kernel run:" +echo " root # module-rebuild rebuild" +# eselect opengl set ati diff --git a/scripts/update_box.sh b/scripts/update_box.sh new file mode 100755 index 0000000..05eb00a --- /dev/null +++ b/scripts/update_box.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# set -x + +emerge --update --deep --newuse --pretend world + +echo "Press Ctrl-C to abort..." +read + +# Trigger mount +# ls /mnt/portage/distfiles /mnt/portage/portage > /dev/null + +emerge --update --deep --newuse --keep-going world + +# echo "Fixing pax flags..." +# ${SCRIPT_DIR}/fix_grsec.sh + +echo "Going to remove unneeded packages ..." +emerge --depclean + +echo "Fixing dependencies..." +revdep-rebuild -i diff --git a/scripts/update_portage.sh b/scripts/update_portage.sh new file mode 100755 index 0000000..f35cbab --- /dev/null +++ b/scripts/update_portage.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# set -x + +PORTAGE=/mnt/portage/portage + +emerge -q --sync +layman -q -S + +# Delete any package mask +[ -f ${PORTAGE}/profiles/hardened/linux/amd64/package.mask ] && rm -f ${PORTAGE}/profiles/hardened/linux/amd64/package.mask +# Reenable nvidia +perl -i -p -e 's/^(nvidia|video_cards_nvidia|vdpau|cuda|opencl)/# $1/;' ${PORTAGE}/profiles/hardened/linux/use.mask ${PORTAGE}/profiles/hardened/linux/amd64/use.mask + +# echo "Cleaning up archives.." +eclean -q packages +eclean -q distfiles