Sorry - I am sure this is easy and probably detailed somewhere - but I can't seem to find it.
But before I start - can I just say - this is AWESOME. I have been struggling with multi booting for YEARS and always struggle with Grub and kernel upgrades and... so much. I have been crashing to the grub command line on my personal PC to boot my current flavor of Linux or my Android X86 install. Now - I have those both working right from the Grub2Win menu!!!
Anyway - Is there an easy way to add an entry that would boot a USB drive? Or even close that I can give it an "e" command and type something in?
Thanks in advance for any help!
TC
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey since I am here - I guess please teach me (or point me) to how to boot another flavor of linux that is not listed?
I have
set prefix=(hd0,gpt5)/boot/grub
insmod normal
normal
I know that is not the correct way - and honestly it gives me an error error: file '/boot/grub/x86_64-efi/gzio.mod' not found
It is for Manjaro linux and there is a gzio.mod file in /boot/grub/i386-pc but I am not sure where I point grub to that?
I tried adding an entry for linux and win2grub wrote this:
menuentry 'Ubuntu Linux ' --class ubuntu --class icon-ubuntu {
set gfxpayload=1920x1080
set reviewpause=2
set root='(hd0,5)'
echo Boot disk address is $root
echo The boot mode is Partition Address
g2wsleep
linux /vmlinuz root=/dev/sda5 verbose nomodeset
initrd /initrd.img
savelast 3 'Ubuntu Linux'
echo GNU Grub is now loading Ubuntu Linux
}
that results in
error: file '/vmlinuz not found
error: you need to load the kernel first
Anyway - teach me or point me to what I am missing.
Thanks again!
Last edit: Tomas Catone 2019-06-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay - so solved my second question - how to add Manjero to Grub2win
Click on add a new entry
Set Type to Custom Code
Click load sample code
Click Edit custom code
Open that in notepad and edit the code...
For me and my most recent install that looks like:
set root='(hd0,5)'
linux /boot/vmlinuz-4.19-x86_64 root=/dev/sda5
initrd /boot/initramfs-4.19-x86_64.img
Save that file.
Click apply and then ok to close inner menu
Then click apply to close that menu
Thenk click ok
Reboot and enjoy...
BTW - inside steps are that you have to boot to your linux distro and find exactly where and what the file name of your vmlinuzxxxx file is and of your initramxxxxx.img file are and place them into the custom code above. So you can see I added '/boot/' in front of my linux and initrd command lines... Of course - I am certain more knowlegeable folks will eplain the vmlinuz file is the kernel etc... But being self taught and leaning by doing it means I have lots of missing knowledge... But leaving this bread crumb for others!
Still looking to answer the first post and make a generic - "Boot from USB"...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You shouldn't have to boot your lin ux distro to find what and where the files are. Visiting the install with a file manager should reveal that info. The hard part is knowing what boot parms are used to reference the boot drive.
For example possible ISO boot parms are: from=all, from=$iso, fromiso=$iso, findiso=$iso, iso-scan/filename=$iso, bootfrom=/dev/sda6$iso and you only need to use one of them.
As for USB booting here are some menus that I use.
menuentry " Porteus 4.0 USB - AF'" --class slackware --class icon-porteus {
set porteus_parms="volume=33 reboot=cold extramod=/Modules;/Modsavedat noload=save.dat;cinnamon"
set bootdrv=$root
search -f /boot/syslinux/vmlinuz --set=root
if [ $root != $bootdrv ]; then
linux /boot/syslinux/vmlinuz $porteus_parms
initrd /boot/syslinux/initrd.xz
else
echo "----------------------------------------"
echo USB drive NOT found.
echo
sleep -v -i 10
fi
set root=$bootdrv
}
menuentry " Porteus 4.0 USB - EFI" --class slackware --class icon-porteus {
set bootmgr=/EFI/boot/bootx64.efi
set bootdrv=$root
search -f $bootmgr --set=root
if [ $root != $bootdrv ]; then
chainloader $bootmgr
else
echo "----------------------------------------"
echo USB drive NOT found.
echo
sleep -v -i 10
fi
set root=$bootdrv
}
Hope they help you.
Ed
Last edit: Ed P 2019-06-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry - I am sure this is easy and probably detailed somewhere - but I can't seem to find it.
But before I start - can I just say - this is AWESOME. I have been struggling with multi booting for YEARS and always struggle with Grub and kernel upgrades and... so much. I have been crashing to the grub command line on my personal PC to boot my current flavor of Linux or my Android X86 install. Now - I have those both working right from the Grub2Win menu!!!
Anyway - Is there an easy way to add an entry that would boot a USB drive? Or even close that I can give it an "e" command and type something in?
Thanks in advance for any help!
TC
Hey since I am here - I guess please teach me (or point me) to how to boot another flavor of linux that is not listed?
I have
set prefix=(hd0,gpt5)/boot/grub
insmod normal
normal
I know that is not the correct way - and honestly it gives me an error
error: file '/boot/grub/x86_64-efi/gzio.mod' not found
It is for Manjaro linux and there is a gzio.mod file in /boot/grub/i386-pc but I am not sure where I point grub to that?
I tried adding an entry for linux and win2grub wrote this:
menuentry 'Ubuntu Linux ' --class ubuntu --class icon-ubuntu {
set gfxpayload=1920x1080
set reviewpause=2
set root='(hd0,5)'
echo Boot disk address is $root
echo The boot mode is Partition Address
g2wsleep
linux /vmlinuz root=/dev/sda5 verbose nomodeset
initrd /initrd.img
savelast 3 'Ubuntu Linux'
echo GNU Grub is now loading Ubuntu Linux
}
that results in
error: file '/vmlinuz not found
error: you need to load the kernel first
Anyway - teach me or point me to what I am missing.
Thanks again!
Last edit: Tomas Catone 2019-06-19
Okay - so solved my second question - how to add Manjero to Grub2win
Click on add a new entry
Set Type to Custom Code
Click load sample code
Click Edit custom code
Open that in notepad and edit the code...
For me and my most recent install that looks like:
set root='(hd0,5)'
linux /boot/vmlinuz-4.19-x86_64 root=/dev/sda5
initrd /boot/initramfs-4.19-x86_64.img
Save that file.
Click apply and then ok to close inner menu
Then click apply to close that menu
Thenk click ok
Reboot and enjoy...
BTW - inside steps are that you have to boot to your linux distro and find exactly where and what the file name of your vmlinuzxxxx file is and of your initramxxxxx.img file are and place them into the custom code above. So you can see I added '/boot/' in front of my linux and initrd command lines... Of course - I am certain more knowlegeable folks will eplain the vmlinuz file is the kernel etc... But being self taught and leaning by doing it means I have lots of missing knowledge... But leaving this bread crumb for others!
Still looking to answer the first post and make a generic - "Boot from USB"...
Hi Tomas.
You shouldn't have to boot your lin ux distro to find what and where the files are. Visiting the install with a file manager should reveal that info. The hard part is knowing what boot parms are used to reference the boot drive.
For example possible ISO boot parms are: from=all, from=$iso, fromiso=$iso, findiso=$iso, iso-scan/filename=$iso, bootfrom=/dev/sda6$iso and you only need to use one of them.
As for USB booting here are some menus that I use.
Hope they help you.
Ed
Last edit: Ed P 2019-06-19
Ed - thanks for the reply.
Still working on this. But I am just missing a few things. But here is some more details and a new wrinkle.
I installed Android on an SD card. But I can not boot it no matter what.
So here is the disk list with the card installed.:
Disk 0 Style GPT Sector 512 Size 29 GB Used 29 GB 100% SanDisk DF4032
Partition 1 Windows Recovery FS NTFS Size 450 MB
Partition 2 EFI Partition FS FAT32 Size 100 MB
Partition 3 Not Formatted Size 16 MB
Partition 4 Windows Boot Letter C: FS NTFS Size 29 GB 81% Full
Flash 1 Style GPT Sector 512 Size 59 GB Used 59 GB 100% Generic SL64G SD Card
Partition 1 EFI Partition Letter D: FS FAT32 Size 260 MB Label = EFI
Partition 2 Linux Filesystem Letter E: FS EXT4 Size 59 GB 3% Full
UUID = 033e8fc7-4cfe-9454-bc59-df7329ca862d
So - as you can guess - the android x86 is installed on the flash card. I will have to boot into Linux to show the files inside the partitions.
I really wanted to quickly get back to you and say thanks. But we are out tonight so it might be a little bit until I post more intel.
Thanks again,
TC
Tomas, FWIW my bootable flash drives are single partition FAT32 drives. EFI & Linux are on the same partition.