[syslinux] USB Thumbdrive + dos ghost boot image + drive too small= confusion
Shao Miller
Shao.Miller at yrdsb.edu.on.ca
Wed Mar 17 15:18:34 PDT 2010
Matthew Holevinski wrote:
>
> ...So it appears as though, ghost is "trying" to copy my ghosted image to
> the thumbdrive and not the local hard drive, I don't suppose
> someone could lend a helping hand with my syslinux.cfg would you...
>
This reads quite true. You wish to boot a MEMDISK floppy and to swap
BIOS drives 0x80 (your USB when booted from USB) and 0x81 (your HDD when
booted from USB).
MEMDISK is a combo of {establish RAM disk, boot RAM disk}.
chain.c32 can establish a swapping hook, but chain.c32 also tries to
boot, as that is its primary purpose.
It might be nice to split these functions apart in Syslinux someday, but
I don't believe it's currently possible.
Having said that, the responsibility for your drive ordering is the
BIOS' doing, so any capability Syslinux might offer is a work-around.
Here's a work-around:
LABEL ghost
KERNEL memdisk
INITRD ghost.vfd
APPEND drive=1
In your ghost.vfd floppy image, use an as-yet-unofficial MDISKCHK.COM[1]
as part of your AUTOEXEC.BAT startup process:
...
rem Default drive is 0
set DRIVE=0
echo @echo off>setenv.bat
mdiskchk.com -b>>setenv.bat
call setenv.bat
rem setenv.bat might have overridden which drive to use
...
Calling this generated setenv.bat will populate environment variables
based on kernel arguments to MEMDISK. You will end up with the
envionment variable DRIVE=1. You can then use this in your batch file
that starts Ghost and pass Ghost the %DRIVE% parameter to choose the
correct drive. Be sure to test. :) Incorporating this allows you to
use the same floppy image no matter your original boot media; the
difference will be in your syslinux.cfg file.
- Shao Miller
[1]
http://git.etherboot.org/?p=people/sha0/syslinux.git;a=tree;f=dosutil;h=1775526ad61d70e52981ce851cfbdae3b40dc7df;hb=9d93d1c005a56842c6026cac7c25af89ae4b241a
More information about the Syslinux
mailing list