LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   chainloading syslinux from grub2 (https://www.linuxquestions.org/questions/linux-software-2/chainloading-syslinux-from-grub2-4175517405/)

pounsfos 09-04-2014 06:57 PM

chainloading syslinux from grub2
 
Hey guys

Been searching for months by myself and turned up nothing

1x usb
1x fat32 partition
has grub, grub4dos, syslinux, on it
can't figure out how to chainload syslinux from grub.cfg

or alternatively, how can I get grub2 to load a wim file or the windows BCD file

they al reside on the same partition, so chainloading just doesn't work, I pretty much need to be able to physically point it at a file

Anyone know or can help

yancek 09-05-2014 01:40 PM

Chainloading basically points to the IPL of a partition and the first bootloader turns booting over to the second bootloader at that location. You have three bootloaders on the same partition? Why. Grub/Grub2 chainload windows and do not boot windows directly and I don't think you will have much luck booting it directly. If you do come up with a way, I'm sure there will be kudos all around. I'm curious about your setup and why the multiple bootloaders on one partition and what are you trying to boot with them, other than another bootloader.

jefro 09-05-2014 04:06 PM

If you have grub, why do you want syslinux?




menuentry "Syslinux root drive" {

set root=(hd1,3)

chainloader +1

}



From here maybe. http://unix.stackexchange.com/questi...linux-cfg-menu

pounsfos 09-09-2014 09:56 PM

so I have my boot drive with multpiple OS's, windows PE environments, testing tools etc....

My syslinux file is highly modified, and trying to get it over to grub would just be a right nightmare......

Syslinux did it all for me and I used grub as a kernal to boot Iso's, (but from the syslinux cfg file
(eg:# HDClone
label hdc
menu label ^HDClone
kernel /bootprog/grub.exe
append --config-file="find --set-root /iso/hdclone.iso; map /iso/hdclone.iso (hd32); map --hook; chainloader (hd32)"
)

anyway with the new UEFI bootloaders finally taking over, I need to move to a EFI bootloader, introducing GRUB2, unfortunatly GRUB2 seems VERY limited in what it can do compared to syslinux, (it can't boot PE Environments, older kernals it has problems with etc...), so the need to still be able to boot from syslinux on a EFI machine is necessary, otherwise we have to go in and enable CSM mode in the bios which wastes time

I can boot 5 linux distros, 4 PE environements and a bunch of other stuff from Syslinux (which it's EFI is still in beta with little progress)
I can boot 3 linux environments, 0 Pe environments and not much of anything else

I may need more training on Grub2 but I have a pretty good grasp already

I also boot Macs using grub for testing them as well

pounsfos 09-10-2014 09:38 PM

*****************update**************

I have gotten the PE environments to load........ kinda

maybe there is hope for grub2 after all

jefro 09-11-2014 03:22 PM

Thanks for the update.

Syslinux has been a fantastic work for a long time. Grub and Grub2 (and oddities like gru4dos etc) have been in the works also. At one time there were some great boot loaders all gui driven that maybe should have been used but we are stuck with what we have and the complexities of hardware and software and changes.

I wrote an example on how to chainload in prior message.

pounsfos 09-11-2014 04:51 PM

your way didnt work, but i really apreciate you helping me as it led me to this discovery

After alot of modifying to efi files I have it kinda booting

I load grub2 from the usb
I then go
"Chainloader /path/to/bootmgfw.efi"
this loads up the BCD data with all my WIM info stored
but after selecting the Wim image I want
It loads it into memory but "black screens" with an error about Winload.exe and for my 8.1 wim an error about "the signature beeing invalid"
This might be because of a BCD setting in the .WIm file but that is where I am now
So technically it grub boots it, but on UEFI it doesn't get all the way into the .WIM
*big sigh* back to google

jefro 09-11-2014 08:25 PM

I haven't had time to look at this but may be of some help. efilinux loader.

And
http://www.easy2boot.com/add-payload...g-uefi-images/

pounsfos 09-16-2014 07:12 PM

*********update**************

It looks like this whole chainloading thing is just not going to happen

but, I have figured out how to boot my .wim images in grub (or more so a pure EUFI environment)

the problem wasnt grub the problem was that inside the bcd, I had the "application path" set to "/windows/system32/winload.exe"
this needed to be changed to "/windows/system32/winload.EFI"

I have my wims back, (woohoo), I guess I will have to start writing, looks like syslinux will never be fully UEFI *touchwood*

jefro 09-17-2014 10:09 PM

Thanks for the update.

Peter Anvin is a guru way beyond my humble abilities. He has worked on Syslinux and some other projects for years.

Steve6375 10-13-2016 10:04 AM

Quote:

Originally Posted by pounsfos (Post 5235341)
so I have my boot drive with multpiple OS's, windows PE environments, testing tools etc....

My syslinux file is highly modified, and trying to get it over to grub would just be a right nightmare......

Syslinux did it all for me and I used grub as a kernal to boot Iso's, (but from the syslinux cfg file
(eg:# HDClone
label hdc
menu label ^HDClone
kernel /bootprog/grub.exe
append --config-file="find --set-root /iso/hdclone.iso; map /iso/hdclone.iso (hd32); map --hook; chainloader (hd32)"
)

Errm - that is a syslinux menu entry which is running grub.exe. grub.exe is grub4dos NOT grub! Commands such as find --set-root are in grub4dos syntax, not grub or grub2.
So actually it is booting via grub4dos.
You may find
http://www.rmprepusb.com/tutorials/chainload-syslinux
useful too.

BW-userx 10-14-2016 09:18 PM

have you ever tried supergrub2 off a USB seeings how you can only boot one os at a time?


All times are GMT -5. The time now is 07:29 PM.