dd is roughly as old as the time the sun began to rise in the morning
though it's name, which is the short form of copy and convert is not exctly self-explaining , see:
http://reboot.pro/to...uest-for-ddexe/
is a very handy tool that in it's most basic form simply copies bytes from a source if or InFile to a target of OutFile.
It was originated in the *nix world where *everything* is a file, so it can deal with block devices as well.
So, dd if=/mylinux1.cfg of=/syslinux.cfg simply writes, byte-by-byte the contents of mylinux1.cfg to syslinux.cfg, or, given that both the source and target files are exactly the same size, after you have run the command syslinux.cfg will become EXACTLY the same as mylinux1.cfg.
When you dd if=/mylinux2.cfg of=/syslinux.cfg syslinux.cfg will become EXACTLY the same as mylinux2.cfg.
If you have two "my" config files, the syslinux.cfg will be EXACTLY the same as either of them, but of course you can have a "backup" copy of the original and re-dd it any time.
Since more or less you want to have two (or more choices) I would be better IMHO to have only one choice in the various Syslinux .cfg's which would be something like "change Syslinux.cfg" pointing to a grub4dos menu.lst where you can choose between the two (or more) options:
- Copy mylinux1.cfg contents to Syslinux.cfg (or "Change language to English")
- Copy mylinux2.cfg contents to Syslinux.cfg (or "Change language to Vietnamese")
A suitable menu.lst could be something *like*
color blue/green yellow/red white/magenta white/magenta
timeout 30
title Copy mylinux1.cfg contents to Syslinux.cfg
find --set-root /syslinux.cfg
dd if=/mylinux1.cfg of=/syslinux.cfg
chainloader /syslinux.bin
title Copy mylinux2.cfg contents to Syslinux.cfg
find --set-root /syslinux.cfg
dd if=/mylinux2.cfg of=/syslinux.cfg
chainloader /syslinux.bin
Of course given that syslinux.cfg, mylinux1.cfg, mylinux2.cfg and syslinux.bin are all in the root of the same device.
See also:
http://www.rmprepusb...inload-syslinux
to understand the usage of syslinux.bin in this context (basically you avoid re-booting as you simply pass control from grub4dos to syslinux).
There was an attempt to have ldlinux.sys to be directly chainloaded by grub4dos but cannot say if it ever reached usability.
As ALWAYS, you NEVER try writing something without first having tested it thoroughly on command line.
In other words, instead or trying to load grub.exe with a config file, you should FIRST just load the grub4dos and test the commands on command line.
You should always additionally be very sure of the paths used in grub4dos commands.
/syslinux.cfg means ()/syslinux.cfg , i.e. (<current root>)/syslinux.cfg
When on the grub4dos command line if you issue a
root
command you will know what is <current root>
You will need some time here:
http://diddy.boot-la...os/Grub4dos.htm
particularly on:
http://diddy.boot-la...iles/syntax.htm
http://diddy.boot-la...iles/basics.htm
http://diddy.boot-la...s/files/cli.htm
Make sure to use a decently recent grub4dos version.
Wonko