25 lines
746 B
Bash
25 lines
746 B
Bash
#!/bin/bash
|
|
surum=4.18.12
|
|
sonek=milis
|
|
depmod ${surum}-$sonek
|
|
cd /boot
|
|
[ -L /boot/kernel ] && rm -rf /boot/kernel
|
|
ln -s kernel-$surum kernel
|
|
if [ -f initramfs ];then
|
|
mv initramfs initramfs_eski
|
|
fi
|
|
|
|
[ -f /usr/bin/dracut ] && dracut -N --force --xz --omit systemd --add-drivers "ahci" -f /boot/initramfs $surum-$sonek
|
|
[ -f /usr/bin/os-prober ] && os-prober
|
|
|
|
mkdir -p /boot/grub
|
|
if [ -f /boot/grub/grub.cfg ];then
|
|
mv /boot/grub/grub.cfg /boot/grub/grub.cfg.eski
|
|
fi
|
|
[ ! -f /boot/grub/grub.cfg.new ] && cp /etc/default/grub/grub.cfg /boot/grub/grub.cfg.new
|
|
[ ! -d /boot/grub/i386-pc ] && cp -r /usr/lib/grub/i386-pc /boot/grub/
|
|
[ ! -f /boot/grub/unicode.pf2 ] && cp /usr/share/grub/unicode.pf2 /boot/grub/
|
|
grub-mkconfig -o /boot/grub/grub.cfg
|
|
|
|
cd -
|