Post by Joe RosevearPost by Bit TwisterIn the majority of the cases the answer is yes.
For the other cases you have to have some application that can boot an
iso file from disk.
For example, I am running grub2 as my system boot loader.
I dropped a script into /etc/grub.d/ which creates menu entries to
boot the iso of possible interest/usage.
This is how I do the above. I used a text editor to make a grug.cfg
default='0'
timeout='3'
menuentry 'Slackware 14.2 Installation '{
root='hd1,msdos9'
isofile='/Slackware/slackware-14.2-iso/slackware-14.2-install-d1.iso'
loopback loop $isofile
echo 'Loading Linux kernel ...'
linux (loop)/kernels/hugesmp.s/bzImage
echo 'Loading initial ramdisk ...'
echo 'Starting Slackware Linux ...'
initrd (loop)/isolinux/initrd.img
}
I thought you would like to see this, because I think it does the same
as what you described, but more directly and without the use of
/etc/grub.d.
For any lurkers, be aware that the next execution of update-grub will
wipe any custom changes you make to grug.cfg
Post by Joe RosevearI like it mainly because it lets me install Slackware directly from the
downloaded iso files--no need to burn CDs.
But you have remember to edt grub.cfg for the new iso. :(
With a script you can have boot selections like
$ grep menuentry /boot/grub2/grub.cfg | grep iso
menuentry 'Mageia-4.1-x86_64-DVD.iso' {
menuentry 'Mageia-5.1-x86_64-DVD.iso' {
menuentry 'Mageia-6-LiveDVD-Xfce-x86_64-DVD.iso' {
menuentry 'Mageia-6-netinstall-nonfree-x86_64.iso' {
menuentry 'Mageia-6-netinstall-x86_64.iso' {
menuentry 'Mageia-6-x86_64-DVD.iso' {
menuentry 'Mageia-Cauldron-netinstall-nonfree-x86_64.iso' {
menuentry 'Mageia-Cauldron-netinstall-x86_64.iso' {
menuentry 'System Rescue ISO (64-bit) ' {
All I do is add/remove iso files, run update-grub and have an up to
date grub.cfg.
For anyone interested. and keep in mind you have to modify the code to
where you store your iso files, and have to modify it to do what is
needed to make the iso run.
$ cat /etc/grub.d/20a_Mageia_isos_xx__grub
#! /bin/sh
#******************************************************************************
#* 20a_Mageia_isos_xx__grub - boots image for Network/hard drive installs
#*
#* Assumptions
#* downloaded Mageia iso files are in the "/spare" partition
#* and the partition is labeled spare.
#*
#* If not, change the _iso_loc variable to match partition
#* name and label.
#*
#* Install procedure:
#* save script in /etc/grub.d/
#* chmod +x /etc/grub.d/20a_Mageia_isos_xx__grub
#*
#* and rebuild /boot/grub*/grub.cfg with
#* update-grub
#* or update-grub2 depending on your install
#*
#*
#* Note: name of script dictates location in menu. Run
#* ls -1 /etc/grub.d/*_* to see menu selection order.
#*
#* You may need to change vmlinuz command line arguments to match
#* your setup. To get curren list of arguments, run
#* cat /proc/cmdline
#*
#* This is free software released to public domain.
#* Do with it whatever you want.
#*
#*
#******************************************************************************
set +e
prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"
. "/usr/share/grub/grub-mkconfig_lib"
_iso_fn=""
_iso_loc="spare"
_root='${root}'
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
#*********************************************************
#* create grub2 menu stanza using iso name as menuentry
#* GRUB_CMDLINE_* variables are found in /etc/default/grub
#*********************************************************
iso_menu () {
cat <<EOD
menuentry '${_iso_fn}' {
insmod regexp
insmod part_gpt
insmod gzio
insmod ext2
search --no-floppy --label --set=root $_iso_loc
loopback loop ($_root)/$_iso_fn
linux (loop)/isolinux/x86_64/vmlinuz vga=791 noiswmd nokmsboot
initrd (loop)/isolinux/x86_64/all.rdz
}
EOD
}
#***********************************************************
#* look through /$_iso_loc for Mageia*.iso files
#* and create a menu entry using its name.
#***********************************************************
_tmp_fn="/tmp/20a_Mageia_isos_xx__grub.tmp"
_exclude_list="_NETWORK_|bkup|dvd|VBoxGuestAdditions"
ls -1 /$_iso_loc/Mageia*.iso | grep -vE "$_exclude_list" > $_tmp_fn
while read -r line; do
_size=$(stat --format=%s $line)
if [ $_size -gt 400000 ] ; then
_iso_fn=${line##*/}
iso_menu
fi
done < $_tmp_fn
rm --force $_tmp_fn
#******************* end /etc/grub.d/20a_Mageia_isos_xx__grub **************