Add 10.4 - Install grub

This commit is contained in:
Aditya 2023-01-14 22:14:19 +05:30
parent 7422caeede
commit 0335438582
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#!/bin/bash
# Exit this line
# grub-install /dev/sda
cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext2
set root=(hd0,2)
menuentry "GNU/Linux, Linux 5.19.2-lfs-11.2" {
linux /boot/vmlinuz-5.19.2-lfs-11.2 root=/dev/sda2 ro
}
EOF

View file

@ -1572,3 +1572,15 @@ then
stop_script "chapter10/10.3-kernel.sh" stop_script "chapter10/10.3-kernel.sh"
fi fi
# Chapter 10.4
# ============
echo "Installng grub"
su -c "bash $SCRIPT/chapter10/10.4-grub.sh"
# Exit on error
check_exit_code
if [ $exit_status -ne 0 ]
then
stop_script "chapter10/10.4-grub.sh"
fi