Help - Search - Members - Calendar
Full Version: grub4dos commandline questions...
MSFN Forums > Member Contributed Projects > Install Windows from USB

   


Google Internet Forums Unattended CD/DVD Guide
Siginet
jaclaz had mentioned something in the past about the 'dd' command being used for copying files.

I'm curious exactly how this works.

CODE
dd: dd if=IF of=OF [bs=BS] [count=C] [skip=IN] [seek=OUT] [buf=ADDR] [buflen=SI
ZE]
    Copy file IF to OF. BS is blocksize, default to 512. C is blocks to
    copy, default is total blocks in IF. IN specifies number of blocks to
    skip when read, default is 0. OUT specifies number of blocks to skip
    when write, default is 0. Skipped blocks are not touched. Both IF and
    OF must exist. dd can neither enlarge nor reduce the size OF, the
    leftover tail of IF will be discarded. OF cannot be a gzipped file. If
    IF is a gzipped file, it will be decompressed automatically when
    copying. dd is dangerous, use at your own risk. To be on the safe side,
    you should only use dd to write a file in memory. ADDR and SIZE are
    used for user-defined buffer.


What is IF and OF?

Is this copy from and copy to?

Lets say I wanted to copy CONVERT\XOPO\I386\winnt.sif To $WIN_NT$.~LS\I386\winnt.sif
Is the correct command something like this?:

CODE
dd if=(hd0,0)/CONVERT/XOPO/I386/winnt.sif of=(hd0,0)/$WIN_NT$.~LS/I386/winnt.sif


I know this is a new feature... and maybe I am totally misunderstanding its purpose.

Or is there any way possible to run a cmd or bat file from GRUB4DOS? That way I could make simple batch file to copy files for me.

Can someone give me some examples on how this would work?
Siginet
ok I actually went into the GRUB4DOS commandline and think my syntax is correct. But I don't think it functions quite how I was hoping.

I kept getting an error that the file did not exist.

So I think the "of" (copy to) file needs to exist. Which is rather odd to me. When the "of" exists then I got an error about it being too small. So does that mean that the file sizes have to match?
jaclaz
Yes, this is a limit of the grub4dos command.

QUOTE
dd: dd if=IF of=OF [bs=BS] [count=C] [skip=IN] [seek=OUT] [buf=ADDR] [buflen=SI
ZE]
Copy file IF to OF. BS is blocksize, default to 512. C is blocks to
copy, default is total blocks in IF. IN specifies number of blocks to
skip when read, default is 0. OUT specifies number of blocks to skip
when write, default is 0. Skipped blocks are not touched. Both IF and
OF must exist. dd can neither enlarge nor reduce the size OF, the
leftover tail of IF will be discarded.
OF cannot be a gzipped file. If
IF is a gzipped file, it will be decompressed automatically when
copying. dd is dangerous, use at your own risk. To be on the safe side,
you should only use dd to write a file in memory. ADDR and SIZE are
used for user-defined buffer.


Read here:
http://www.boot-land.net/forums/index.php?...=6119&st=35

You must think of dd in grub4dos more like as a command line hex editor than as a copy utility.

It has it's uses, but not for what you wanted to do:
http://www.boot-land.net/forums/index.php?...ic=7138&hl=

jaclaz
Siginet
****. sad.gif

I also tried playing around with NTFS4DOS... but I couldn't seem to have access to any of the files on the usb drive when I booted into ntfs4dos.

Could you maybe give me an idea how to utalize DOS or some sort of commandline utility which would allow me to copy/move files then go back to the grub4dos menu or launch another grub4dos entry?

Thanks
jaclaz
Sure, you need BOTH NTFS4DOS AND a USB DOS driver, unless you booted from the stick (NON NTFS) and the USB support is given by BIOS.

Otherwise you could use an image (containing DOS and NTFS4DOS) booted from grub4dos.

Or a Recovery Console image:
http://www.boot-land.net/forums/index.php?showtopic=5316

jaclaz
Siginet
Hmm the recovery console sounds like a nice idea. I'll start playing with that and see if I can come up with an automated script to do what I need. Thx!




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.