2020-11-13 03:43:10 +01:00
|
|
|
# Kali Grub config
|
|
|
|
# from GLIM
|
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
set this_isopath="${isodev}${isopath}/kali"
|
2020-11-13 03:43:10 +01:00
|
|
|
|
|
|
|
# abuse for to check for existence
|
2023-04-07 19:45:36 +02:00
|
|
|
for isofile in ${this_isopath}/kali-linux-*.iso; do
|
|
|
|
if [ ! -e "$isofile" ]; then break; fi
|
|
|
|
|
|
|
|
echo "Found Kali Linuxes in ${this_isopath}"
|
2020-11-13 03:43:10 +01:00
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
submenu "Kali Linux >" "${this_isopath}" --class kali {
|
|
|
|
this_isopath=$2
|
2020-11-13 03:43:10 +01:00
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
for isofile in ${this_isopath}/kali-linux-*.iso; do
|
2020-11-13 03:43:10 +01:00
|
|
|
if [ ! -e "$isofile" ]; then break; fi
|
|
|
|
|
|
|
|
regexp \
|
|
|
|
--set 1:isoname \
|
|
|
|
--set 2:version \
|
|
|
|
--set 3:arch \
|
2023-04-07 19:45:36 +02:00
|
|
|
"^.*/(kali-linux-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
|
2020-11-13 03:43:10 +01:00
|
|
|
|
|
|
|
menuentry "Kali ${version} ${arch}" "${isofile}" "${isoname}" --class kali {
|
|
|
|
set isofile=$2
|
|
|
|
set isoname=$3
|
2023-04-07 19:45:36 +02:00
|
|
|
|
|
|
|
regexp \
|
|
|
|
--set 1:isodev \
|
|
|
|
--set 2:isofile \
|
|
|
|
"^(\(.*\))?(.*)\$" "${isofile}"
|
|
|
|
|
2020-11-13 03:43:10 +01:00
|
|
|
echo "Using ${isoname}..."
|
2023-04-07 19:45:36 +02:00
|
|
|
loopback loop "${isodev}${isofile}"
|
|
|
|
linux (loop)/live/vmlinuz-*-amd64 fromiso=${isofile} boot=live components splash username=root hostname=kali
|
2020-11-13 03:43:10 +01:00
|
|
|
initrd (loop)/live/initrd.img-*-amd64
|
|
|
|
}
|
|
|
|
menuentry "Kali ${version} ${arch} (forensic mode)" "${isofile}" "${isoname}" --class kali {
|
|
|
|
set isofile=$2
|
|
|
|
set isoname=$3
|
2023-04-07 19:45:36 +02:00
|
|
|
|
|
|
|
regexp \
|
|
|
|
--set 1:isodev \
|
|
|
|
--set 2:isofile \
|
|
|
|
"^(\(.*\))?(.*)\$" "${isofile}"
|
|
|
|
|
2020-11-13 03:43:10 +01:00
|
|
|
echo "Using ${isoname}..."
|
2023-04-07 19:45:36 +02:00
|
|
|
loopback loop "${isodev}${isofile}"
|
|
|
|
linux (loop)/live/vmlinuz-*-amd64 fromiso=${isofile} boot=live components splash username=root hostname=kali noswap noautomount
|
2020-11-13 03:43:10 +01:00
|
|
|
initrd (loop)/live/initrd.img-*-amd64
|
|
|
|
}
|
|
|
|
done
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# kill for loop
|
|
|
|
break
|
|
|
|
done
|