mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-12-22 15:22:56 +00:00
Add 10.4 - Install grub
This commit is contained in:
parent
7422caeede
commit
0335438582
2 changed files with 30 additions and 0 deletions
18
scripts/chapter10/10.4-grub.sh
Normal file
18
scripts/chapter10/10.4-grub.sh
Normal 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
|
||||
|
|
@ -1572,3 +1572,15 @@ then
|
|||
stop_script "chapter10/10.3-kernel.sh"
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue