Será criado um diretório para armazenamento da imagem ISO de cada distribuição
.
Todo este trabalho feito até então, será incapaz de carregar as imagens ISO e dar boot pelas mesmas e iniciar a instalação das distros sem a
configuração do arquivo "grub.cfg".
Após fazer a cópia das imagens ISO para os diretórios criados, é hora de configurar o Grub2 para deixar disponível no menu de boot os sistemas que
desejamos usar para instalar a partir do pendrive.
set default="0"
set timeout=30
menuentry 'Kali
Linux 1.0.6 64 Bits' {
insmod part_msdos
insmod ext2
iso="/kali/kali-linux-1.0.6-amd64.iso"
echo 'Carregando Imagem ISO do sistema...'
loopback loop $iso
set bootoptions='boot=live findiso=$iso noconfig=sudo username=root hostname=kali noswap noautomount'
echo 'Loading Kernel Image...'
linux (loop)/live/vmlinuz $bootoptions
echo 'Loading Initrd Image...'
initrd (loop)/live/initrd.img
}
menuentry 'Ubuntu Server 14.04.1 LTS 64 bits' {
insmod part_msdos
insmod ext2
set bootoptions='root=UUID=62404d73-c42d-449f-acab-984e3014da05 cdrom-detect/try-usb=true priority=low quiet'
echo 'Loading Kernel Image...'
linux ubuntusrv/vmlinuz $bootoptions
echo 'Loading Initrd Image...'
initrd ubuntusrv/initrd.gz
}
menuentry 'Ubuntu 14.04.1 LTS Desktop 64 bits' {
insmod part_msdos
insmod ext2
set bootoptions='locale=pt_BR bootkbd=qwerty/br-abnt2 console-setup/layoutcode=br boot=casper iso-scan/filename=/ubuntu1404/ubuntu-14.04.1-desktop-amd64.iso quiet splash'
echo 'Loading Loopback Image...'
loopback loop "/ubuntu1404/ubuntu-14.04.1-desktop-amd64.iso"
echo 'Loading Kernel Image...'
linux (loop)/casper/vmlinuz.efi $bootoptions
echo 'Loading Initrd Image...'
initrd (loop)/casper/initrd.lz
}
menuentry 'Ubuntu 12.04.5 LTS Desktop 64 bits' {
insmod part_msdos
insmod ext2
set bootoptions='locale=pt_BR bootkbd=qwerty/br-abnt2 console-setup/layoutcode=br boot=casper iso-scan/filename=/ubuntu/ubuntu-12.04.5-desktop-amd64.iso quiet splash'
echo 'Loading Loopback Image...'
loopback loop "/ubuntu1204/ubuntu-12.04.5-desktop-amd64.iso"
echo 'Loading Kernel Image...'
linux (loop)/casper/vmlinuz.efi $bootoptions
echo 'Loading Initrd Image...'
initrd (loop)/casper/initrd.lz
}
menuentry 'Linux Mint Debian 2012-04 64 bits' {
insmod part_msdos
insmod ext2
set root'(hd0,msdos1)'
search --no-floppy --fs-uuid --set b7da-2d5b-4a51-8e89-bafbd815bfda
echo 'Loading Loopback Image...'
loopback loop /mint/linuxmint-201204-mate-cinnamon-dvd-64bit.iso
echo 'Loading Kernel Image...'
linux (loop)/casper/vmlinuz root=UUID=b7da-2d5b-4a51-8e89-bafbd815bfda fromiso=/dev/disk/by-uuid/b7da-2d5b-4a51-8e89-
bafbd815bfda/mint/linuxmint-201204-mate-cinnamon-dvd-64bit.iso boot=live config live-media-path=/casper noprompt quickreboot quiet splash --
echo 'Loading Intrd Image...'
initrd (loop)/casper/initrd.lz
}
menuentry 'Parted Magic 2012_10_10' {
insmod part_msdos
insmod ext2
set root'(hd0,msdos1)'
search --no-floppy --fs-uuid --set b7da-2d5b-4a51-8e89-bafbd815bfda
loopback loop /parted/pmagic_2012_10_10.iso
linux (loop)/pmagic/bzImage uuid=b7da-2d5b-4a51-8e89-bafbd815bfda iso_filename=/parted/ pmagic_2012_10_10.iso edd=off noapic
load_ramdisk=1 prompt_ramdisk=0 rw vga=788 loglevel=9 max_loop=256 livemedia noeject keymap=fr-latin1 en_US
initrd (loop)/pmagic/initrd.img
}
menuentry 'Debian Wheezy 7.8 64 bits' {
insmod part_msdos
insmod ext2
set bootoptions='root=UUID=62404d73-c42d-449f-acab-984e3014da05 cdrom-detect/try-usb=true priority=low quiet'
echo 'Loading Kernel Image...'
linux /debian/vmlinuz $bootoptions
echo 'Loading Initrd Image...'
initrd /debian/initrd.gz
}
Você deve substituir "b7da-2d5b-4a51-8e89-bafbd815bfda", pelo UUID do seu pendrive.