Ultimate Boot CD

Add Grub4dos support to UBCD
Page 1 of 1

Author:  poorman [ Wed Oct 29, 2008 2:34 pm ]
Post subject:  Add Grub4dos support to UBCD

OK, I've been researching this everywhere, and I could not find any more information about this. However, it looks like Grub4Dos allows direct booting of ISO and Floppy Images. (Even gzipped images!)

Currently, I'm using a USB stick, and I had syslinux on it, but when I would boot a DOS image with memdisk, it would hang. With DFT with PC DOS and virtually any image with FreeDOS. I tried the new FreeDOS image, but it did not help. (I got a new Invalid OpCode instead of hanging at INIT.)

In any case, Grub4Dos is great. Here's what you need to boot a floppy (or even ISO image, but not all ISO images work currently.)

title Partition magic 8.05
find --set-root /images/pmagic8.ima
map --mem /images/pmagic8.ima (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

That's it! This solves all of my problems trying to get UBCD + Bart PE + Acronis True Image + Ubuntu....ALL ON ONE USB DRIVE. It's amazing.

I still have to rename all the menus for Grub4Dos from syslinux, but it would be great if someone did this officially at the UBCD project. I'd be happy to help in any way.



Author:  Icecube [ Wed Oct 29, 2008 3:17 pm ]
Post subject: 

It would be nice if you can convert all the menu's.

Post them in this topic.

Author:  poorman [ Wed Oct 29, 2008 3:59 pm ]
Post subject: 

OK, I'll get started on it. It would be great if someone from the main project would contact me for any info.

FYI, to create submenu in Grub:

Suppose the submenu file is called submenu.lst and located at /boot/grub
We can call this submenu by placing the configuration below in menu.lst

# calling submenu
title Sub-menu
configfile (hd0,2)/boot/grub/submenu.lst

In submenu.lst file we must have the configuration to come back to the main menu. Below is such an example

# submenu.lst file
# Go to main menu
title Main-menu
configfile (hd0,2)/boot/grub/menu.lst

Author:  Icecube [ Wed Oct 29, 2008 5:43 pm ]
Post subject: 

Use find --set-root to set the root directory to the right place (instead of defining (hd0,2)/boot/grub/submenu.lst).

Place the submenus in /ubcd/menus/grub4dos/.
# calling submenu
title Sub-menu
configfile /ubcd/menus/grub4dos/submenu.lst

See the next link for more information about the grub4dos menu:

Ilko of boot-land.net has translated the menus for UBCD411 (he still uses memdisk).
Read: http://www.boot-land.net/forums/index.php?showtopic=4486&st=10
I don't know if you can do much with it, because it doesn't contain the help text like in UBCD500.
You can also download the file from here (rename it to grub4dos-menus-411.7z after you have downloaded it):

ktp has the same memdisk problem that you have. You better report it to the syslinux mailing list: http://www.zytor.com/mailman/listinfo/syslinux so they can solve it. Mention that floppy emulation with grub4dos works.

A grub4dos forum can be found at:

I posted a link to this topic. So maybe you get help.

Author:  Icecube [ Tue Dec 23, 2008 8:27 am ]
Post subject: 

With some luck, the grub4dos config files will exist :D:

All help is appreciated.

Author:  pio [ Wed Dec 24, 2008 3:23 pm ]
Post subject: 

Yes, grub4dos is great.

Now it's better then syslinux. I see no reason to continue syslinux but the work to convert the menus.

Author:  Icecube [ Wed Dec 24, 2008 3:28 pm ]
Post subject: 

pio wrote:
Now it's better then syslinux. I see no reason to continue syslinux but the work to convert the menus.

It has many features but it is lacking (at least currently) to pass options to the freedos image which is used extensively on UBCD. The suggestion of tinybit (see http://www.boot-land.net/forums/index.php?showtopic=6119) will probably work, but the use of numbers won't make it easy to edit.

Do you want to help converting the menus?

Author:  Icecube [ Fri Dec 26, 2008 8:25 am ]
Post subject: 

My post at http://www.boot-land.net/forums/index.php?showtopic=6119&st=0&gopid=53041&#entry53041:
Zw2312914 have invented a new approach. He make use of the existing features of “default” and “savedefault” command to write an integer value into the file “default”.

Thanks, it works (but you have to add a number (e.g.: 0) in the beginning of the DEFAULT file (replace the first space), else you get an error).
  • Ungzip /ubcd/images/fdubcd.igz (rename to fdubcd.img.gz first).
  • Edit mount fdubcd.img.
  • Add a directory /args/ to the image.
  • Rename the DEFAULT file (2048 bytes) of the grub4dos package to grub4dos.arg
  • Change the first space in the grub4dos.arg to a 0.
  • Make grub4do2.arg and a grub4do3.arg file with the same content.
  • Save/unmount the fdubcd.img.
  • Gzip fdubcd.img and save as /ubcd/images/fdubcd.igz.

[size="5"]Converting a UBCD entry which uses the freedos image (fdubcd.igz) and the ubcdcmd= parameter to grub4dos syntax.[/size]
MENU LABEL Intel Processor Frequency ID V7.2.20041115 (P3 and below)
 Reports information about your Intel CPU, including brand name, rated and
 tested speed, cache memory, technologies and classification. Supports older
 Intel CPU (P3 and below).
KERNEL memdisk
APPEND initrd=/ubcd/images/fdubcd.igz ubcdcmd=intelfid

Luckily for us, the “default” and “savedefault” command to write an integer value into a specified file can be done multiple times in the same menu entry.

Make a menu.lst file:
# Save the value after the ubcdcmd= parameter in the grub4do*.arg files
# Because the default command only accepts numbers,
# we have to convert all characters of the ubcdcmd parameter
# to ASCII codes (only the 2 cipher ones).
# Each grub4do*.arg file can hold 7 ciphers at maximum,
# we can use only 6 of them because when the total number
# starts with a 0, it will be stripped by grub4dos.
#   e.g.: "0123456" becomes "123456"
# We have 3 files to which we can save the ASCII codes (grub4do*.arg).
# So the maximum parameter name of the ubcdcmd parameter
# must be limited to 9 (3 files * 3 ASCII codes).
# The ubcdcmd parameter contains filenames of files without
# extension in the /ubcd/dosapps/ directory.
# The limit of 9 ASCII codes won't give a problem because
# filenames in dos are limited to 8 characters
# ( + 3 for the extension).
# Use the the following table to convert the charaters after
# the 'ubcdcmd=' parameter to ASCII codes:
#   0: 48        A: 65        K: 75        U: 85  #
#   1: 49        B: 66        L: 76        V: 86  #
#   2: 50        C: 67        M: 77        W: 87  #
#   3: 51        D: 68        N: 78        X: 88  #
#   4: 52        E: 69        O: 79        Y: 89  #
#   5: 53        F: 70        P: 80        Z: 90  #
#   6: 54        G: 71        Q: 81               #
#   7: 55        H: 72        R: 82               #
#   8: 56        I: 73        S: 83               #
#   9: 57        J: 74        T: 84               #
# We treat small and capital letters the same (A=a=65).
# For dos filenames it doesn't matter if it a small or a capital letter .

title Intel Processor Frequency ID V7.2.20041115 (P3 and below)
   find --set-root /ubcd/images/fdubcd.igz
   map --mem /ubcd/images/fdubcd.igz (fd0)
   map --hook
   chainloader (fd0)+1
   root (fd0)

   # What follows it the replacement of the ubcdcmd=intelfid parameter for grub4dos
   # Write the first 3 characters ('int') in ASCII (=737884) /args/grub4dos.arg
   default (fd0)/args/grub4dos.arg
   savedefault 737884
   # Write the next 3 characters ('elf') in ASCII (=697670) /args/grub4do2.arg
   default (fd0)/args/grub4do2.arg
   savedefault 697670
   # Write the last 2 characters ('id') in ASCII (=7368) to /args/grub4do3.arg
   default (fd0)/args/grub4do3.arg
   savedefault 7368


When you type vc (F3 to view file content) at the end of the boot process, you can find the right values in the grub4do*.arg files.

So a script can now read and convert the ubcdcmd parameter that is needed to unpack and launch the right package from the /ubcd/dosapps folder.

I am no dosguru so I don't know (yet?) how to do it.

Is there a way to replace (or to add below) the following text with a help text like the menu.c32 and vesamenu.c32 of syslinux can do?
Use the ↑ and ↓ keys to highlight an entry. Press ENTER or 'b' to boot.
Press 'e' to edit the commands before booting, or 'c' for a command line.

@pio: do you know a way to add a help text that gets displayed when you move trough the menu, like menu.c32 of sylinux does?

Author:  Icecube [ Sun Feb 08, 2009 10:48 pm ]
Post subject: 

Grub4dos support is almost ready.

Features that needed to be added to grub4dos are added:
- enhanced write command, needed to pass the ubcdcmd=parameter to the freedos image:
- support for multiple initrds (Offline password and registry editor)
- help text support: http://www.boot-land.net/forums/index.php?showtopic=6627&st=0&gopid=58552&#entry58552

Main tread about the development oft grub4dos support for UBCD50:

Author:  Icecube [ Wed Feb 11, 2009 10:12 am ]
Post subject: 

I made an xdelta patch, which contains all changes I made compared to ubcd50b11.iso. Most of them are for grub4dos support.

Download UBCD50b11 from http://www.ultimatebootcd.com/forums/viewtopic.php?t=1786.
Download the xdelta patch from: http://ubcd.partedmagic.com/downloads/ubcd-grub4dos/ubcd50b11_to_ubcd50b11-grub4dos.xdelta.

Download xdelta from: http://code.google.com/p/xdelta/downloads/list.

Apply the patch:
xdelta3 -d -vfs "ubcd50b11.iso" "ubcd50b11_to_ubcd50b11-grub4dos.xdelta" "ubcd50b11-grub4dos.iso"

This patch probably won't be the final one for UBCD50b12, but any testers are welcome to test, so bugs that may exist, can be solved.

Author:  Icecube [ Thu Mar 05, 2009 8:35 am ]
Post subject: 

UBCD50b12 has grub4dos support.

Author:  JDWho [ Wed Mar 18, 2009 8:25 pm ]
Post subject: 

I just added the UBCD50b12 ISO to a USB key that boots various ISOs using GRUB4DOS (including UBCD411 with Ilko's menus). I was surprised to find that I could run the items I tested (MemTst86+, SeaTools) using the ISOLinux/SysLinux menus, and didn't need to choose the GRUB4DOS menus.

Is this because of the "grub4dos support" or are the GRUB4DOS menus only required to load certain images?

Author:  Icecube [ Wed Mar 18, 2009 8:53 pm ]
Post subject: 

The syslinux/isolinux menu contains the same menu items.
Some floppy images dont work on all PCs with memdisk floppy emulation. In that case you can use the grub4dos menu.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group