Showing posts with label syslinux. Show all posts
Showing posts with label syslinux. Show all posts

Wednesday, December 10, 2008

Multi-booting from USB stick

While still looking for a better way to boot several OS distributions, I'm writing down the one I use with satisfaction.
There are a lot of how-tos about the topic on the web: they often contain steps which are distribution-specific, like renaming or moving folders to other locations, in order to avoid conflicts, for example. I dont'like it. I like, instead, a more general, systematic way:

  1. suitably partition (FAT filesystem) the usb drive:


    • the first primary partition, with the bootable flag set, reserved to hold some shared data (some operating system do recognize only the first one on removable media), and to hold a bootmanager to deal with the multi-boot scheme;

    • allocate (generally) one partition per distro to avoid conflicts;


  2. copy the distro (generally the content of an .iso image) on its devoted partition;

  3. install syslinux on that partition;

  4. edit "syslinux.cfg" accordingly; if the distro comes from a bootable .iso, most of the time it's enough to:


    • copy the "isolinux" folder over the "syslinux" one;

    • in the new folder "syslinux", rename "isolinux.cfg" to "syslinux.cfg";


  5. install a bootmanager, like Grub4DOS, to the master boot record of the bootable partition;

  6. in the bootmanager menu, add an entry for each partition to chainload its own syslinux.

Tuesday, December 2, 2008

Booting FreeDOS from USB sticks

These are only my quick notes on how to boot FreeDOS from an usb stick, mainly taken from this short and confusing post and from this more detailed guide.
  1. get and install syslinux on a FAT32 (or FAT) usb stick;
  2. get a FreeDOS distribution;
  3. copy the "fat32lba.bin" (or "fat16.bin" in case of FAT), "command.com" and "kernel.sys" files from the FreeDOS distro to the root directory of the stick;
  4. rename the "*.bin" file as "*.bss";
  5. edit "syslinux.cfg" to be:

  6. timeout 1
    default fdos
    prompt 0

    label fdos
    BSS fat32lba.bss
    append -

  7. if necessary add a suitable autoexec.bat and config.sys;
  8. unmount the usb stick and reboot.

Tuesday, September 30, 2008

Grub chainloads syslinux and back

Some introductory considerations:
  • Booting from an USB device with GRUB is quite easy (here and there..).
  • Booting from an USB device with syslinux is also quite easy (here).
  • Chainloading GRUB from syslinux seems not to be possible without tricks: syslinux boots from the boot record and sees its own partition only, thus GRUB should reside on the same partition and be packaged as an "xxxx.bin" file to be passed to syslinux via the "kernel /path_to/xxxx.bin" directive. Never tried and I'll never too, until I'll not find somehow useful.
  • Chainloading syslinux from GRUB seems not to be possible without a patch. I don't know about GRUB2. This could be useful for multi-booting (syslinux-based) partitions.
  • Chainloading GRUB4dos from syslinux is possible, because "grub.exe" can reside on the same FAT partition where syslinux is. Only an entry in "syslinux.cfg" with the "kernel /path_to/grub.exe" directive is needed
  • Chainloading syslinux from GRUB4dos (on the same partition) should be possible because GRUB4dos is more flexible than GRUB, but I didn't manage to make it work, even if I tried all combinations of paths, mappings and syntaxes, like here.
  • Chainloading syslinux from GRUB4dos (on different partitions) is possible. I managed it through the mapping, explained (again) here. It solves some problems in multi-booting usb devices.

To load syslinux (on different partitions) from GRUB4dos, my steps were:
  1. take a partitioned device;
  2. take the first primary partition, formatted as FAT;
  3. get GRUB4dos and install it on the master boot record of that partition;
  4. get syslinux and install it on (some of) the other partitions;
  5. edit "menu.lst" in the proper grub4dos folder in order to chainload syslinux with the entry:

    title -your entry title-
    map (hdx,y)+1 (fd0)
    map --hook
    root (fd0)
    chainloader +1
    boot

    where x and y identify the syslinux-based partition in the usual grub-style form.
    I tried to map the syslinux-based partition to an "hd_" device instead of "fd0", but no success: I don't know why.