Cynthia Flynn
2009-Feb-26 02:59 UTC
[syslinux] chainboot from grub to syslinux in logical partition
For reasons I won't get into, I need to use grub (not grub4dos, super grub, or any other variant) as multiboot loader on a USB thumb drive, but I also need some of the partitions to contain bootable content from syslinux-based ISOs. All of these syslinux partitions must be logical rather than primary partitions and they will not be the first partition on the drive. Porting the syslinux configuration menus to grub is not possible nor desirable in some cases (think Ultimate Boot CD as one example). What I was hoping to do was retain the existing syslinux configurations as is and simply chainboot from grub to syslinux the same way I do to pass boot control from grub to the FreeBSD boot loader. My thinking is that this would be possible if I could get syslinux or some other utility to write a proper volume boot record to the logical partition's boot sector without altering the thumb drive's master boot record. I think that when syslinux installs are done that ldlinux.bss and ldlinux.sys are patched according to drive/partition-specific attributes and ldlinux.bss is then written to the boot sector, right? But, in Windows XP it is not normally possible for syslinux.exe to even see anything but the first partition on a thumb drive. Moreover, syslinux.exe would overwrite my MBR. And is it even capable of writing a VBR to a logical partition anyway? I know there's a tool called makebootfat, but it isn't clear to me that it can be made to leave my MBR alone either and I don't think I can point it at my logical partition either. So, is there a way to produce and install the correctly patched ldlinux.bss and ldlinux.sys files appropriate to the destination logical partition such that its VBR can be directly and successfully chainbooted from grub? Cynthia
Kim Mik
2009-Feb-26 07:35 UTC
[syslinux] chainboot from grub to syslinux in logical partition
Porting the syslinux configuration menus to grub is not possible nor desirable in some cases (think Ultimate Boot CD as one example). Just to inform you: UBCD50b12 will have grub4dos support, so the use of syslinux or isolinux isn't necessary anymore for UBCD. Gert Hulselmans
Ferenc Wagner
2009-Feb-26 11:48 UTC
[syslinux] chainboot from grub to syslinux in logical partition
Cynthia Flynn <1cynthia2flynn3 at telus.net> writes:> My thinking is that this would be possible if I could get syslinux > or some other utility to write a proper volume boot record to the > logical partition's boot sector without altering the thumb drive's > master boot record.This is exactly what the syslinux installer does under Linux. Are you sure it's different under Windows? (Warning: I never used syslinux under Windows. I havn't been using Windows for several years. I've never used syslinux to boot from a logical partition.)> I think that when syslinux installs are done that ldlinux.bss and > ldlinux.sys are patched according to drive/partition-specific > attributes and ldlinux.bss is then written to the boot sector, > right?Yes, as far as I know.> But, in Windows XP it is not normally possible for syslinux.exe to > even see anything but the first partition on a thumb drive.Not even with administrator privileges?> Moreover, syslinux.exe would overwrite my MBR. And is it even > capable of writing a VBR to a logical partition anyway?>From http://syslinux.zytor.com/wiki/index.php/SYSLINUX:These are only in the Windows version: -m Mbr; install a bootable MBR sector to the beginning of the drive. So just don't use this option... -- Regards, Feri.
Cynthia Flynn
2009-Feb-27 11:49 UTC
[syslinux] chainboot from grub to syslinux in logical partition
On Thu Feb 26 15:21:51 PST 2009, Jeff Sadowski wrote:>> This is a windows limitation you can not as far as I know mount them >> as their own drive letters in windows. >> If it has a drive letter you can use syslinux on it. I'll experiment >> more with windows and the disk management in it to try and find a way >> around this but it seems like a windows limitation. I'll try vista >> when I get a chance also. > > http://www.lancelhoff.com/make-windows-see-any-usb-flash-drive-as-local-disk/ > here is how to get the second partition to be seen by windows xp then > you can use syslinux on it as normal.Yes, I was well aware of the Windows XP limitation and the possible modification, which is why I said "not normally possible". However, we need a solution that does not require this non-standard configuration of Windows XP. Vista is of no interest to us. On Thu Feb 26 03:48:10 PST 2009, Ferenc Wagner wrote:>> My thinking is that this would be possible if I could get syslinux >> or some other utility to write a proper volume boot record to the >> logical partition's boot sector without altering the thumb drive's >> master boot record. > > This is exactly what the syslinux installer does under Linux. Are you > sure it's different under Windows? (Warning: I never used syslinux > under Windows. I havn't been using Windows for several years. I've > never used syslinux to boot from a logical partition.)Again, the procedure cannot work under in an unmodified Windows XP environment. However, I did follow your Linux lead, Ferenc. Since one of the thumb drive's partitions contains a working live Linux-based file system, I booted that and used the Linux syslinux binary it contained to install the boot sector and ldlinux.sys into the logical partition of interest. I confirmed that the boot sector actually had been modified and that ldlinux.sys appeared in that partition's root. I then added the appropriate entry in my grub configuration file to chainload that logical partition. Unfortunately, all I got when trying to boot that logical partition was the infamous and uninformative "Boot error" message. I believe that comes from syslinux, which would mean that control is indeed being passed from grub to the syslinux boot sector I installed. Beyond that I've no idea what's happening. The target partition has it's own syslinux directory containing it's own configuration menu files which I would expect to be read and acted upon, but I imagine things aren't getting far enough for that. FWIW, I'm using syslinux v3.73 when I install it to the logical partition and two of the logical partitions I'm experimenting with contain Trinity Rescue Kit 3.3 and the Ultimate Boot CD 4.1.1. Both are FAT16 and both give me the "Boot error" message. So, is there some fundamental reason why grub should not be able to chainload a logical partition with a proper syslinux VBR and ldlinux.sys or am I still missing something in my procedure? Perhaps syslinux does not in fact write a proper VBR in a logical partition? Cynthia
Cynthia Flynn
2009-Feb-27 20:29 UTC
[syslinux] chainboot from grub to syslinux in logical partition
On Fri Feb 27 05:25:06 PST 2009, H. Peter Anvin wrote:> There is a bug in quite a few versions of Grub when it comes to > chainloading logical partitions: it passes bogus partition informations > to the chainloaded boot sector. That's most likely what you are running > into.Thanks. Could you point me at more detailed information about this bug? I'm using the grub 0.97_3 port for FreeBSD so it would obviously help to know whether this version is affected or not. All I found was the following report, but since I'm using what the writer would refer to as grub1 instead of grub2 and I'm not getting the error message he saw (or indeed any) from grub itself, I don't imagine this is what you're referring to: http://savannah.gnu.org/bugs/?8252 Cynthia