Jump to content











Photo
- - - - -

Chaining Syslinux to Syslinux ?


  • Please log in to reply
12 replies to this topic

#1 Thibaut

Thibaut

    Member

  • Developer
  • 32 posts
  •  
    France

Posted 05 May 2011 - 10:33 AM

Hi there,

I'm looking for a way to chainload syslinux to another syslinux or isolinux to make a multiboot live USB.

All the files will be stored on a FAT32 system and each system will be placed in a sub-folder.

Example :

  • a usb key containing a folder "boot" with the first syslinux
  • two subfolders containing files from Ubuntu 10.10 ISO and Mint 10 ISO

I would like to be able to really load the original boot menu of both Ubuntu 10.10 and Mint 10.

Do you think it could be done ?

It would be a great way to have MultiBoot Live USB keeping the original boot menus of each system.

Thank you for your help,

Thibaut

#2 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 05 May 2011 - 02:28 PM

I'm looking for a way to chainload syslinux to another syslinux or isolinux to make a multiboot live USB.

This is usually accomplished via the chain.c32 COMBOOT32 module. It has a usage statement if you run it from Syslinux without any arguments. Or you could see the comments at the beginning of the source code, inside com32/modules/chain.c

Directly chaining an LDLINUX.SYS file is not supported at this time, but has previously been discussed. Chaining an ISOLINUX.BIN file is supported, if I recall correctly.

I would like to be able to really load the original boot menu of both Ubuntu 10.10 and Mint 10.

Do you think it could be done ?

If these Linux distributions are not too wildly afar from modern Syslinux, you could simply use the menu.c32 COMBOOT32 module with the other menus. See Syslinux' doc/menu.txt file's "USING AN ALTERNATE CONFIGURATION FILE" section.

#3 Thibaut

Thibaut

    Member

  • Developer
  • 32 posts
  •  
    France

Posted 05 May 2011 - 02:47 PM

Thank you for the answer.

I've already tried a few of this options but none really worked.

Chainloading to isolinux.bin seems to be reserved to ISOLINUX.

Chainloading LDLINUX.SYS is not an option since there is only one on the USB key.

I also tried something like :

COM32 chain.c32
APPEND /boot/ubuntu/isolinux/isolinux.cfg

(with and without absolute paths) but none really worked.

#4 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 05 May 2011 - 03:35 PM

Thank you for the answer.

You're welcome, I'm sure.

Chainloading to isolinux.bin seems to be reserved to ISOLINUX.

Agreed (see above).

Chainloading LDLINUX.SYS is not an option since there is only one on the USB key.

Understood. Since the files are coming from .ISOs, it's likely that they would not include an LDLINUX.SYS.

I also tried something like :

COM32 chain.c32
APPEND /boot/ubuntu/isolinux/isolinux.cfg

Problem: chain.c32 is for chaining programs rather than config-files. This looks like you would be interested in the menu.c32 documentation I referred you to, above.

#5 Thibaut

Thibaut

    Member

  • Developer
  • 32 posts
  •  
    France

Posted 05 May 2011 - 03:39 PM

I will try something like that :




LABEL Ubuntu 10.10

	MENU LABEL Ubuntu 10.10

	KERNEL vesamenu.c32

	APPEND /boot/ubuntu/isolinux/isolinux.cfg



Do you see any other methods ?

#6 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 05 May 2011 - 04:09 PM

I will try something like that :




LABEL Ubuntu 10.10

	MENU LABEL Ubuntu 10.10

	KERNEL vesamenu.c32

	APPEND /boot/ubuntu/isolinux/isolinux.cfg

Please try to avoid spaces in plain LABEL statements, only because I do not recall if they are acceptable and I don't believe they are. Spaces are certainly fine in MENU LABEL statements.

Do you see any other methods ?

Only a convoluted one: If you can figure out how to make your USB disk an "isohybrid" style, then if the distros' ISOLINUX are new enough, you could chain.c32 them. I haven't really worked with the "isohybrid" stuff.

#7 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 06 May 2011 - 04:30 PM

I will try something like that :




LABEL Ubuntu 10.10

	MENU LABEL Ubuntu 10.10

	KERNEL vesamenu.c32

	APPEND /boot/ubuntu/isolinux/isolinux.cfg



Do you see any other methods ?

As mentioned, you are on the right path! Keep moving forward. And don't be afraid to chain from SYS/ISOLinux to GRUB...Look at the UBCD stuff and how it chains back and forth to pmagic...Once you start reading the actual cfg (or menu.lst) files, you will continue to learn! :cheers:

#8 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 07 August 2011 - 10:42 PM

Do you see any other methods ?

Actually, there's another possibility... Using boot-sectors.

Suppose the Ubuntu 10.10 uses ISOLINUX 4.01. That means that when "chaining" to it, you'd want to use SYSLINUX 4.01. Suppose the directory with the ISOLINUX stuff on your USB storage is called ubuntu/boot/. So install SYSLINUX 4.01 to the USB storage using that directory:

--directory ubuntu/boot

Now save the boot-sector with DD:

dd if=/dev/sdXY of=~/ubuntu.bs count=1

Then install whatever Syslinux version you want, using whatever directory you want. You can then chain to the ubuntu.bs file to start the other Syslinux:

LABEL ubuntu

  BOOT ubuntu/boot/ubuntu.bs



#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15185 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 August 2011 - 09:59 AM

For the record (and possibly it has been changed :confused1:) a frustrating experience with syslinux in the past was that file extension did matter:
http://www.911cd.net...showtopic=21902
and a bootsector HAD to have the .bss extension.

:cheers:
Wonko

#10 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 08 August 2011 - 11:25 AM

For the record (and possibly it has been changed :confused1:) a frustrating experience with syslinux in the past was that file extension did matter:
http://www.911cd.net...showtopic=21902
and a bootsector HAD to have the .bss extension.

The file extension still matters if you use KERNEL as keyword.

Use the appropriate keyword for you file instead (you can name your file, how you want):
  • LINUX image: Linux kernel
  • BOOT image: Bootstrap program (.bs, .bin)
  • BSS image: BSS image (.bss)
  • PXE image: PXE Network Bootstrap Program (.0)
  • FDIMAGE image: Floppy disk image (.img)
  • COMBOOT image: COMBOOT program (.com, .cbt)
  • COM32 image: COM32 program (.c32)
  • CONFIG file: CONFIG will restart the boot loader using a different configuration file.
http://syslinux.zytor.com/wiki/index.php/SYSLINUX#KERNEL_file

#11 Thibaut

Thibaut

    Member

  • Developer
  • 32 posts
  •  
    France

Posted 08 August 2011 - 12:02 PM

Actually, there's another possibility... Using boot-sectors.

Suppose the Ubuntu 10.10 uses ISOLINUX 4.01. That means that when "chaining" to it, you'd want to use SYSLINUX 4.01. Suppose the directory with the ISOLINUX stuff on your USB storage is called ubuntu/boot/. So install SYSLINUX 4.01 to the USB storage using that directory:


--directory ubuntu/boot

Now save the boot-sector with DD:

dd if=/dev/sdXY of=~/ubuntu.bs count=1

Then install whatever Syslinux version you want, using whatever directory you want. You can then chain to the ubuntu.bs file to start the other Syslinux:

LABEL ubuntu

  BOOT ubuntu/boot/ubuntu.bs


This is the method I'm looking for. With this method I shouldn't have to worry about syslinux version of each Linux. I will try it as soon as I can.

#12 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 08 August 2011 - 12:17 PM

This is the method I'm looking for. With this method I shouldn't have to worry about syslinux version of each Linux. I will try it as soon as I can.

Well, the idea is that you'd have multiple Syslinux versions "installed;" each directory would have an LDLINUX.SYS file in it, for example, and you'd have a boot-sector file to chain each different Syslinux. But concerns about deviating from the version used by each distro could be fewer... If a Linux distribution has customizations to their Syslinux source code, the concerns could only be totally removed by building from such a customized source tree.

I hope it works for you!

#13 Thibaut

Thibaut

    Member

  • Developer
  • 32 posts
  •  
    France

Posted 11 August 2011 - 02:51 PM

I tried this method and it's working well. There is still a very long way before finding out which method is the best to add multiboot to my software.

What is great about this method is that boot menu is untouched (example : you can still select language in Ubuntu's menu).

But this is not enough since most (not to say all) Linux distributions have hardcoded absolute paths in their boot menus. And even worse : most of them will need an additional append parameter to find the Live folder (live-media-path for Debian/ubuntu, live_dir for Fedora ....).

As usual each distribution has its own way of doing things and this is A REAL PAIN IN THE ASS.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users