I try my best to detail my question. If it would run out of your patience, go to lastest paragraph.

I downloaded Ubuntu 13.04 from its official site and extracted files to a folder ubuntu\ on USB stick( Z: for example). So files are now in Z:\ubuntu\

Before that, I downloaded Syslinux 5.10( 6.00 has bugs) and used it to install boot code to USB stick with this command:

syslinux.exe --mbr --active --directory /boot/syslinux/ --install Z:

Then I copied chain.c32 and required libs to Z:\boot\syslinux and added to syslinux.cfg( unimportant part is ignored):

COM32 chain.c32

APPEND isolinux=/ubuntu/isolinux/isolinux.cfg

Syslinux booted successfully but failed to boot Ubuntu, saying:

Err: option 'maps' requires a sector'', but I didn't know what it meant.

Then I tried loading Ubuntu's isolinux configure using:

config /ubuntu/isolinux/isolinux.cfg /ubuntu

But only got message saying:

Loading gfxboot... Failed: No such file or directory

I tried again with:

config /ubuntu/isolinux/isolinux.cfg /ubuntu/isolinux/

And it said:

Failed to load COM32 file gfxboot.c32

But I could see LABELs with [TAB] Key:


live live-install check memtest hd mainmenu help

So I tried booting Ubuntu via command line:

boot: live

And it showed that:

Loading /casper/vmlinuz failed: No such file or directory

I think Syslinux recognizes Z:\ as root directory /, not Z:\ubuntu\, so it failed to load vmlinz. So I moved files to Z:\ and reboot. Though syslinux still failed to load gfxboot but I booted into Ubuntu successfully with

config /isolinux/isolinux.cfg /isolinux/

boot: live

I don't understand why it could not load gfxboot.c32 when it read isolinux configure correctly. Maybe syslinux I use and isolinux Ubuntu uses are not the same, and the bootcode and gfxboot are not compatible.

Syslinux Wiki mentions that CONFIG can restart the boot loader using a different configuration file and set new home directory using:

CONFIG /path/to/cfg/file/configfile.cfg /path/to/new/base/dir

I followed the guide but filed to let Syslinux set Z:\ubuntu\ as root directory. Maybe I misundertood this guide.

So my question is, how to put Ubuntu or other Operation System into a standalone folder and configure syslinux properly to set direcotry where Ubuntu or other OS is as root directory so that I could boot the OS successfully?

  • I dont have much experience with syslinux, but have you considered looking at arch wiki? Most of documentation is relevamnt to other distros, too. – Szymon Szydełko Jul 4 '13 at 8:53
  • By the way, what filesystem is Z:? NTFS? I suspect it is beacuse of `\` – Szymon Szydełko Jul 4 '13 at 8:54
  • @SzymonSzydełko thanks for your promptly reply. Syslinux supports FAT filesystem only, So filesystem of Z: is FAT(32). I have had a quick look at Arch Wiki, it seems there are not information I need. – Noverull Jul 4 '13 at 9:49
  • @SzymonSzydełko I suspect it is beacuse of '\'. What do you mean? – Noverull Jul 4 '13 at 9:53
  • You want to put ubuntu on FAT-32 drive? – Szymon Szydełko Jul 4 '13 at 10:06

I do not know if this is relevant anymore, but I am having the same issues and am still playing around with it. I have had some success, which I wish to share.

First of all, since I am trying to achieve the same thing I knew right away what he is trying to achieve. He is trying to make a multi-boot usb stick for installing several Linux distros.

To integrate each OS and make updates easier it thus makes sense to try and load the boot loader of each distro, as if it was alone on the filesystem. Thus he tried to chainload their isolinux setup (that comes with the .iso). I too tried this, but I have not had any luck yet.

The only workaround I found (only tested with netboot iso) is to use the method of just loading the new configuration (in this case /path/to/distro/isolinux.cfg), using CONFIG statement. Only, in this case that got some errors so I tried its child config "menu.cfg". That skipped the Ubuntu boot menu, but it did load the Ubuntu installer successfully.

Remember that you also need to specify the new home either on the CONFIG line or using APPEND bellow.

Lastly some comments on the question. When it comes to PATH (Z:) is irrelevant here, since when you are actually running from the USB stick you are not using Windows and UNIX rules applies. So only enter the path the UNIX way /xxx/zzz. For example "I think Syslinux recognizes Z:\ as root directory /" makes no sense, because /=root, in Windows (drive letter+)\ (\=root).

Since you do have the exact same goal and issues as myself I will share any progress I have in the future.

EDIT: Here is the answer that most probably will solve everything.

The simple fact you have to remember is that the COM32 files is incompatible between different versions of SYSLINUX/ISOLINUX. SYSLINUX & ISOLINUX themselves are compatible with each others.

On the Ubuntu Netboot.iso only one COM32 file is used, vesamenu.c32. I simply replaced this with the one from my main syslinux install on the usb (/boot/syslinux/vesamenu.c32).

Then simply point your boot menu to the file that would otherwise start the OS install (/boot/ubuntu/isolinux.cfg). Use CONFIG for this & it will just magically work. No more "Could not load vesamenu.c32".

  • Hi, thanks for your sharing. I putted Ubuntu 14.04 files into Z:\ubuntu\ and tried using CONFIG /ubuntu/isolinux/isolinux.cfg /ubuntu/isolinux/ to load configure and boot Ubuntu by typing live but told /casper/vmlinuz.efi not found. No problem when files was in Z:\. I find no way to do this( Put files into Z:\ubuntu\ and boot Ubuntu successfully) without modifying ubuntu/isolinux/txt.cfg. May you detail your circumstance? I don't understand why there is ubuntu/ in /boot/ – Noverull Jul 28 '14 at 8:38

Ok, after assembling facts and re-re-reading question and our discussion: You can't install Operating system to "folder" (That is, you can't install Linux to folder like /ubuntu/, you need to install it to/folder). Linuxes want a full featured partition: they need to put/usr,/var`, on root of what they see as filesystem. (chrooting aside)

Also, Linux can't be installed on FAT-32. This file system lack symlinks and some other facilities which are bedrock of Linux operation.

You need ext3/4, xfs or other supported real filesystem. However, you can just install ubuntu on usb like on any normal hdd - just setup: fat32 or ext2 partition for boot{manager,loader} and kernel image, and ext4 for operating system. You'll be able to apt-get programs on in, save documents and whatnot.

  • Sorry for my poorly expressing( and for my poor English). Yeah, I'm intended to install a Linux Ditro on my USB stick, and if I were to do it, I would have to follow your tutorial. But That's my further plan. Canonical provides a ISO image for users to burn to CD with which they could install Ubuntu. I call the ISO image installation. I want to install Ubuntu but I don't want to burn it to CD. And Syslinux Allows me to put Ubuntu installation to USB Stick and boot it. And I don't want to make the USB Stick unusable. And I want to put Ubuntu installation to a folder. And now I have troubles. – Noverull Jul 4 '13 at 12:29
  • You want to simultaneously have both ubuntu installer and installation on the same stick, right? If so, try something like this: make three partitions on the disk: 1. ext2 and use it as /boot/ from ... 2. ext4 on which install normal ubuntu/other linux of choice 3. here, dd installation .iso and make sure it is chainloaded from 1st partition. somewhat hacky, but that's best I can invent – Szymon Szydełko Jul 4 '13 at 15:46
  • Sorry for my poorly expressing again. I means installer here. It's better to keep one partition, for Windows couldn't recognizes more than one partition. And I want to put Ubuntu installer to a folder. You may be Curious why I have to put all the files in one folder. That's because, if I did it, I could do the same thing to other OS's installer. Just simply put different installers into different folders. Then I could choose which one to boot when plug in the USB stick. And it's easy to add and remove one. I remember I have ever successfully done such thing before. – Noverull Jul 4 '13 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.