Grub-configmake updated with a config it saves to
This commit is contained in:
parent
0284540455
commit
6f9e73714d
1 changed files with 20 additions and 7 deletions
|
@ -1,9 +1,22 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo -ne 'Running grub-configmake'
|
echo -ne 'Running grub-configmake'
|
||||||
|
if [ -z "${init_path}" ]
|
||||||
|
if [ -z "${grub_root} "]
|
||||||
read -p "What is the install root you are using?" install_root
|
read -p "What is the install root you are using?" install_root
|
||||||
mkdir -p ${install_root}/boot/grub | echo "You probably didn't make /boot" && exit 2
|
mkdir -p ${install_root}/boot/grub | echo "You probably didn't make /boot" && exit 2
|
||||||
read -p "What drive do you want to set root to? (Only <number> otherwise it won't work.)" grub_root
|
read -p "What drive do you want to set root to? (Only <number> otherwise it won't work.)" grub_root
|
||||||
read -p "Init binary (full path only)" init_path
|
read -p "Init binary (full path only)" init_path
|
||||||
|
cat > ${install_root}/etc/grub-defaults.cfg << "EOF"
|
||||||
|
install_root=${install_root}
|
||||||
|
init_path=${init_path}
|
||||||
|
grub_root=${grub_root}
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
else
|
||||||
|
read -p "What is the install root you are using?" install_root
|
||||||
|
. ${install_root}/etc/grub-defaults.cfg
|
||||||
|
fi
|
||||||
|
fi
|
||||||
cat > ${install_root}/boot/grub/grub.cfg << "EOF"
|
cat > ${install_root}/boot/grub/grub.cfg << "EOF"
|
||||||
set default=0
|
set default=0
|
||||||
set timeout=5
|
set timeout=5
|
||||||
|
@ -15,5 +28,5 @@ menuentry "Alnux+Busybox/Linux" {
|
||||||
linux /boot/bzImage root=/dev/sda${grub_root} rw init=${init path} rw
|
linux /boot/bzImage root=/dev/sda${grub_root} rw init=${init path} rw
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
echo "grub-configmake made it's job"
|
echo "grub-configmake made the config . . ."
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue