Jump to content











Photo
* * * * * 1 votes

MBRBatch 0.01 ALPHA


  • Please log in to reply
65 replies to this topic

#26 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 17 September 2008 - 05:54 PM

Hello everyone. :huh:
Sorry for my bad English.
I read enough but not write for that reason. In this forum also 911CD and MSFN.
I am using mkimg.cmd but does not work for LBA.
I fixed with mbrbatch.
I was looking at the code and only creates CHS. (Line 126)
The question is? , I can modify the code to add CHStoLBA to mkimg.cmd as mbrbatch?

Greetings to everyone.


Hmmm, last time I looked at it, (when I wrote it :)), mkimg did "work for LBA", and by the way it used mbrbatch.

Unless you have found a bug in the mkimg batch (VERY possible, but improbable as it was never reported before), something else is going "wrong".

Can you post an example (commands you used, expected result, actual result, "fix" you made manually with mbrbatch)?

I would prefer to correct the bug myself, so that the download works, though of course you are perfectly free to use the batches (and modify them) as you wish. :huh:


jaclaz

#27 reirok

reirok
  • Members
  • 7 posts
  •  
    Argentina

Posted 18 September 2008 - 04:35 AM

Hello Jaclaz.
Surely it is a mistake of mine concept. :huh:
Also publish the steps performed.

The commands will be run in an interactive way.
Make the image.
MKIMG.cmd c:\vdk32\mbrbatch\512M.dsk, 512M, 255/63, 0E, / fsz.

Attatch few images to be better understood.
mkimg_512M_0E_LBA.PNG

Now, the problem is the type of partition.
When run
MbrBatch.cmd view c: \ vdk32 \ mbrbatch \ 512M.dsk 512.

I sample 06 (fat16 CHS) instead 0E (fat16 LBA).
Attatch image.
mbrbatch_view1.PNG

Use MbrBatch edit, in an interactive way to solve the problem.
Attatch image.
mbrbatch_edit.PNG

So is solved.
Attatch image.
mbrbatch_view2.PNG

Greetings Reirok.


Edit:
The problem is when the script makes the format in Fat16 or 32, ntfs no problem.
The format for some reason change the type of partition to CHS.


#28 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 18 September 2008 - 04:05 PM

Edit:
The problem is when the script makes the format in Fat16 or 32, ntfs no problem.
The format for some reason change the type of partition to CHS.


Most probably it is not MBRBATCH/MKIMG fault.

Rather, when MKIMG calls FORMAT to create the filesystem, it is FORMAT that, when a smallish partition size is detected, "automagically" changes LBA type of partition to the corresponding CHS one.

In this cases, as you already did, it is needed to change back the partition type.

Since both CHS and LBA values are "balanced", see this also:
http://www.boot-land...?showtopic=5000
all is needed is to change one byte, say from 06 to 0E, which can be made with a simple batch just a few lines long or using gsar, or maybe more conveniently, using a GUI utility, like beeblebrox:
http://students.cs.byu.edu/~codyb/
WHILE the image is mounted.

I cannot remember if this is provided by the "normal" MBRBATCH (in "command line" mode as opposed to "interactive") I will check, and, if it is not, I'll try and add the feature.

jaclaz

#29 reirok

reirok
  • Members
  • 7 posts
  •  
    Argentina

Posted 18 September 2008 - 10:35 PM

Hello Jaclaz.
You're a Bible.
Thank you.

I did not know what format to that.
Anyway, to CORRECT this, use some hex editor like HxD, is only one byte.
I will prove that GUI utility. It used PTEDIT32 but does not see discs mounted with VDK.
It is understood what I write? or my English is as bad as I think. Frankly for this reason, I am ashamed to post.

Greetings.

#30 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 September 2008 - 11:50 AM

I will prove that GUI utility. It used PTEDIT32 but does not see discs mounted with VDK.
It is understood what I write? or my English is as bad as I think. Frankly for this reason, I am ashamed to post.

Greetings.

Actually your English is better (or at least more understandable) than that of many board members.

Noone is expecting a new Charles Dickens :huh:, English is used just as a "common ground" for international users. :huh:

In case of problems, remember that (being Italian - as reknown Italians do it better :) ) I can read Spanish, as well Nuno, being Portuguese can.
If there is something that you think you cannot express properly in English, simply post it in Spanish, preferably using "pseudo-tags" such as:
[Spanish]
Hola, amigo.
No te preocupes, su Inglés es bueno.
[/Spanish]

:)

jaclaz

#31 mr_

mr_

    Frequent Member

  • Members
  • 355 posts
  •  
    Germany

Posted 27 March 2009 - 09:32 PM

jaclaz,

1) Imho this project should be moved to the Project forge. It's a shame to find this project only if you advise it. You could even think about hosting the project at an open source project hosting site.

2) I do not understand why you declare yourself as a non programmer, even Windows Batch is a scripting language. A scripting language is also variety of a programming language. Also for Windows Batch there are integrated development environments available.

#32 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 27 March 2009 - 11:44 PM

jaclaz,

1) Imho this project should be moved to the Project forge. It's a shame to find this project only if you advise it. You could even think about hosting the project at an open source project hosting site.

Well, I don't consider it a "real" project, it's just a handy batch, it needs a lot of work to become a Beta, and it is however dedicated to an audience of "advanced users", as it's use "implies" some "more than average" knowledge on the whole MBR/bootsector/hardisk stuff.

2) I do not understand why you declare yourself as a non programmer, even Windows Batch is a scripting language. A scripting language is also variety of a programming language. Also for Windows Batch there are integrated development environments available.


Mainly to harass and annoy "real" programmers, and, from time to time, to make their feet touch the ground ^_^:
http://www.boot-land...?...c=5881&st=0

^_^

More seriously, point is that I am a fervent sustainer of interpreted languages as opposed to compiled ones, (read scripting languages) expecially given the enormous amount of computing power of modern CPU's and the triviality of some chores.

And of course, the reason why I love batches is because they are "human readable", easily customizable, don't need "strange" compilers/libraries and whatnot, and because from time to time someone comes out with a "you can't do that"....
http://www.boot-land...?showtopic=2986

:good:

jaclaz

#33 anewerauser

anewerauser

    Newbie

  • Members
  • 15 posts
  •  
    Brazil

Posted 10 April 2009 - 09:49 AM

Hi jaclaz
Thank you for your great contribution to this community of USB booting.
I have been reading hundreds of posts here and there and finally succeeded in understanding
about 80 % of the USB boot process.
I just want to know what is the final conclusion you recommend in a few words [please do not give much links] :)
The point that I want to understand is what is the difference betwee "AAAA.BS" and the boot sector of partition C: on XP for example.
What is the recommended tool ,either free or commercial ,to manage the backing up and restoring and creating [this is the most important for me] of the boot sectors and MBR of the USB flash Sticks.

Please do not say that I did not read.
Believe me I have been reading for 12 days and going to three different forums you link to.
I am just confused about what is latest recommendation if I have a USB flash stick and i want to implement the GRUB and BOOT.ini method.
I know all the steps and even succeded to make reatogo to boot from yhe USB flash of 2GB.
The tool PE2USB is good in this field,but when I want to make use of 8GB flash stick,it can NOT do the trick.
I heard that ther is a "hacked" version of PE2USB but it is not compatible with your MEHOD of " *.BS"
It gives me error and the flash can not continue the loading of DOS for example.
I read also about "hacked" version of HP Format Tool but I do not know what its function exactly compared to the normal HP Format Tool.

You see I am nearly very close to the understanding of the whole process but I am in need of concise clarification from experts like WIMB and Jaclaz.
Sorry if I bother you.
Thanks in advance.

anewerauser

#34 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 10 April 2009 - 01:27 PM

Well, 80% is good :) but even 99% is a little bit less than what is needed. :)

A good GUI tool to backup/restore MBR's and bootsectors (remember 1 sector for FAT16, 7 sectors for fat32, 16 sectors for NTFS) is HDHacker:
http://dimio.altervista.org/eng/

Otherwise use dsfo/dsfi.

One of the possible uses of MBRBatch/MKimg is EXACTLY that of AVOIDING the use of PETOUSB or of the HP tool.

One way is described here:
http://www.boot-land...?showtopic=5000
http://www.boot-land...?...c=5000&st=1

Another way is to use a filter driver and use "normal" Disk management, or "flip the bit" on your sticks.

You can always use, if needed, MBRBatch to apply, if needed, the HP hack.

The point that belongs to the missing 20% and that a lot of people simply fail to understand is that for a single partitioned USB stick, all is needed is the MBR and one valid partition table entry.
You write to the \\.\PHYSICALDRIVEn corresponding to the stick an "empty" (i.e. without DATA) MBR, with dsfo or with MBRFIX:
http://www.sysint.no...ting/mbrfix.htm
Pseudo-GUI:
http://home.graffiti...z:graffiti.net/

Then you write in it with any tool you like, for example beeblebrox:
http://students.cs.byu.edu/~codyb/
or with an hex editor, a VALID partition table entry covering the size of the stick.

To calculate the values, you can use the small spreadsheet here:
http://www.boot-land...?showtopic=2959

Once a proper partition table entry is established, you just disconnect and re-connect the USB stick and use "normal" FORMAT on the drive letter Explorer will assign to the partition on the stick.

jaclaz

#35 anewerauser

anewerauser

    Newbie

  • Members
  • 15 posts
  •  
    Brazil

Posted 10 April 2009 - 05:36 PM

First of all thanks for your instant reply.
Do you mean by "for a single partitioned USB stick" = A USB stick that only has ONE partition ?

Still you left me in a little doubt,pardon me.
You said that HDHacker is a good tool ,isn't it?
OK,Does it produce the required geometry needed for your batches?
Sorry I can not express what I want.
Please jaclaz kindly elaborate on the final conclusion.
If I can see my Stick as a fixed disk either by "Micro Hitachi filter" or "Dummy.sys",will this helps in solving any probable problems?
Moreover ,I can not see the second partition from within XPE ot Reatoo PE.
Can you tell me how I may implement a method by which the secon or even the third partition is seen from within PE Environment?


What about the calculations that most of your posts show?
Can I ignore these calculations at all if I let The USB to be seen as a fixed disk?
That is ,being seen and recognized as a fixed disk , the USB flash stick will behave normally.


You also did not answer me regarding what I will do with the 8GB flash which can NOT be formatted as FAT and which can NOT be formatted with PE2USB.
What is the recommended approach to such big sized USB Sticks?

Forgive me being so ignorant but I hope you will be patient and let me understand the tricks behind the USB booting.

My regards
anewerauser

#36 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 10 April 2009 - 06:19 PM

Do you mean by "for a single partitioned USB stick" = A USB stick that only has ONE partition ?

Yep. :(

Still you left me in a little doubt,pardon me.
You said that HDHacker is a good tool ,isn't it?

NO, I said it's a good GUI tool to backup/restore sectors.

OK,Does it produce the required geometry needed for your batches?

Definitely NOT, it's a good GUI tool to backup/restore sectors, ONLY. :(
My batches produce the data, you give the geometry (99.99% it is 255/63 :) )

Sorry I can not express what I want.

Maybe you overestimated the 80%? :)
I think I will decrease the percentage by 5% for each subsequent question :), right now you are down to 70% (since I am a nice guy, I won't count first question :( )


If I can see my Stick as a fixed disk either by "Micro Hitachi filter" or "Dummy.sys",will this helps in solving any probable problems?

Sure, as said you can use Disk Management allright if you have a filter driver installed.

Moreover ,I can not see the second partition from within XPE ot Reatoo PE.
Can you tell me how I may implement a method by which the secon or even the third partition is seen from within PE Environment?

Installing the filter driver to the PE. :(

Read these:
http://www.911cd.net...o...=17701&st=6
http://www.911cd.net...o...=21113&st=0

Then search for posts by user online here on boot-land or on 911CD.

What about the calculations that most of your posts show?
Can I ignore these calculations at all if I let The USB to be seen as a fixed disk?
That is ,being seen and recognized as a fixed disk , the USB flash stick will behave normally.

Yep, as long as everything works.
Not anymore as soon as you have a problem in booting, and you'll need to check/change them. :)


You also did not answer me regarding what I will do with the 8GB flash which can NOT be formatted as FAT and which can NOT be formatted with PE2USB.
What is the recommended approach to such big sized USB Sticks?

Yes I did :) . Try re-reading, slowly this time :(, this:

One of the possible uses of MBRBatch/MKimg is EXACTLY that of AVOIDING the use of PETOUSB or of the HP tool.

One way is described here:
http://www.boot-land...?showtopic=5000
http://www.boot-land...?...c=5000&st=1

Another way is to use a filter driver and use "normal" Disk management, or "flip the bit" on your sticks.

You can always use, if needed, MBRBatch to apply, if needed, the HP hack.


NO "recommended" solution, just listing possibilities, a further one is using Swissknife:
http://www.compuapps.../swissknife.htm

but noone seems to want to test it and report.

:)

jaclaz

#37 anewerauser

anewerauser

    Newbie

  • Members
  • 15 posts
  •  
    Brazil

Posted 10 April 2009 - 09:05 PM

Again I am very grateful for your help and dedicated effort and time.

Regarding the percentage of my knowledge on this USB booting topic ,it does not matter as long as you are concerned ,since I know that you are playing in your real realm of Batches and Scripts [unintentional pun].I am negative N % in this field if Would compare my knowledge and experience to yours.
I am not flirting you at all ,but I think every one agree to a great extent that you really making a hard work and a vital continual activities in all the four or five forum you are a member of.

The problem is anyone even the expert one who tries to trace a subject in these forums ,he find himself reading hundreds of posts and some of them contradict the others .
Some posts declare solutions to some problems but other posts also declare other solutions with no connections to the previously mentioned ones.
The forums need some filtering and the outdated data to be eliminated.
I do not criticize or blame the admins of the forums but just want to say that the information in these four forums are not found elsewhere in the Internet.
It just needs some ordering and reorganization.May God help the admins and the moderators of these forums.
one last out of topic question:
You frequently says that your English is not good.I do not agree with you.I have read about 400 pages of your posts in the 911 CD and BootLand and MSFN ,etc ,and really astonished of your proficiency in explaining topics and solutions in good plain correct English although you may be as I heard that you are Italian.
By the way my condolence is for you and the Italians regarding the latest earthquake.
I think you took a degree in English from a certain university,didn't you?

That is enough for now.

Thanks for your interest in offering help to all the "ignorant " guys ,including me.

anewerauser

#38 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 11 April 2009 - 11:32 AM

Yes, the problem with Forums is that the info can be mixed together, this is the reason why it is needed the contribution of people that can sum up things and put them together in "tutorials" or "guides".

On the other hand, don't underestimate the (indirect) contribution people asking questions actually make.

I can point you to tens of "methods" that were developed and found only because someone won his own shyness and actually posted a problem.

This whole techical field is basically made by:
  • some knowledgeable PRO's, that carefully avoid to post anything that may deprive them from their earnings
  • a large numbers of "leechers" that just read whatever is posted and if the solution is not a "one-size-fits-all" "one-or-two-clicks-away" one, simply go somewhere else
  • a few "ignorant" (but willing to learn :() people like you or many other members here
  • a very few people, that even without being experts on the single topic, try to understand it and then use their capabilities to explain it in an easier and replicable manner
  • a very few knowledgeable (:)) AMATEURS, that try to explain and report their experiences and more generally solve problems

People belonging to Group #1 won't help.
People belonging to Group #2 won't help.

People in Group #3 may become easily part of Group #4 and after some time even be "promoted" to group #5.

It is a great personal success for me when I manage to induce someone to "escalate" from #3 to #4 and then to #5.

The essence of the net, expecially of technical boards and particularly of boot-land, is the collaborative effort towards a given goal, the whole Winbuilder thingie has been made possible by the contributions of the members, after the initial "spark" by Nuno.

A "minor" but still innovative and useful project, the "Install XP from USB" method:
http://www.msfn.org/...p?showforum=157
was actually born from a "proposed deal":
http://www.msfn.org/...opic=81788&st=6
which later was taken by a number of good guys:
http://www.msfn.org/...howtopic=111401

As well, some "documentation" project like the grub4dos Guide, has been made possible by the time diddy dedicated to it, but would have been pretty much less complete without a few hints by me and ilko, and without all the topics posted on the board.

Would you be game for some of this stuff? :)

Maybe a "MBR/partitioning everything" guide? :(

We already have member online, and recently member Nour El2mar that contributed in the specific field, maybe you could make a common project?


FYI:

I think you took a degree in English from a certain university,didn't you?

I got TWO of them :(:
one from a Hawaii based university :):
REIMOA
(Reading English: I Am Old Alas)
and the other one from a Turkish one :)
RAFYMY
(Reading Again For Yet More Years)

:)

:)

jaclaz

#39 diddy

diddy

    Member

  • Tutorial Writer
  • 78 posts

Posted 25 June 2009 - 04:36 AM

Hello jaclaz

Firstly, thanks for the script. It's taken me a while to get around to using it due to my fear of the command line :lol:

Although I've tried a number of tools for creating bootable USB sticks I now find this method the most versatile. I have not had any problems using it in interactive mode but for some reason cannot use the EDIT command from a command line.

Just a quick note to let you know that the HELP EDIT command starts by giving EDIT usage but then mentions the CHANGE command - see last line of the HELP EDIT command for example -
mbrbatch.cmd CHANGE my_MBR.mbr 255/63 1 0B 80 LBA 63 2056257

Anyway, when using the following from either a command prompt, or called from another batch...
mbrbatch.cmd EDIT my_MBR.mbr 255/63 1 0B 80 LBA 63 2056257
...I automatically enter the interactive mode.

Am I missing something or is this a bug?

Regards

diddy

#40 diddy

diddy

    Member

  • Tutorial Writer
  • 78 posts

Posted 25 June 2009 - 06:51 AM

Hello again jaclaz,

After a bit more messing around I found the correct syntax for LBA mode -

mbrbatch.cmd EDIT Geometry LBA Part PartType Active StartLBA SectorsLBA

Using the previous example (see post above) -

mbrbatch.cmd EDIT my_MBR.mbr 255/63 LBA 1 0B 80 63 2056257

Can you please update the batch HELP EDIT command to avoid confusion.

diddy

p.s. Thanks again for all your hard work writing this batch.

#41 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 25 June 2009 - 04:28 PM

I'll check and see if I can find the glitch and fix it.

If I get it right the "HELP" suggests a wrong syntax (missing target filename)? ;)

It could be the "right" occasion to finally "integrate" MKIMG with MBRBATCH. ;)

:lol:

jaclaz

#42 diddy

diddy

    Member

  • Tutorial Writer
  • 78 posts

Posted 25 June 2009 - 05:44 PM

If I get it right the "HELP" suggests a wrong syntax (missing target filename)? :lol:


Sorry jaclaz, it was an early morning post and I should have perhaps explained better. HELP EDIT gives two examples, which both then replace EDIT command with CHANGE command. Syntax is also in the wrong order. The example for LBA mode -
CHANGE [source] Geometry Part PartType Active LBA StartLBA SectorsLBA
is not working. Following works -

EDIT [source] Geometry LBA Part PartType Active StartLBA SectorsLBA

note LBA mode must be the second [MBRparams] not fifth as stated in help.

Hope this helps ;)

diddy

#43 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 26 June 2009 - 03:22 PM

First check and I found that Bo Branten changed his page:
http://www.acc.umu.se/~bosse/

and mksparse seem not anymore there.

Attached is a copy of last version which is still available from:
http://www.acc.umu.s...se/mksparse.zip

(but not anymore linked to on main page) :lol:


Maybe it's time to "convert" to fsutil.exe or maybe some other tool, the Co-linux site has an interesting one:
http://colinux.wikia.com/wiki/MkFile
but it's a BLOAT, sized at 2 or 3 Mbytes vs. 24,576 bytes of mksparse. ;)

jaclaz

Attached Files



#44 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 26 June 2009 - 04:10 PM

Version 0.03 attached.

ONLY "glitch" in
mbrbatch.cmd HELP EDIT
(hopefully :lol:) fixed.

Please verify/check.

;)

jaclaz

Attached Files



#45 diddy

diddy

    Member

  • Tutorial Writer
  • 78 posts

Posted 27 June 2009 - 08:05 AM

Version 0.03 attached....Please verify/check.


Thanks jaclaz,

Version 0.03 working fine.

diddy

#46 nu852

nu852

    Member

  • Members
  • 52 posts
  •  
    Hong Kong

Posted 18 November 2009 - 11:51 AM

I have downloaded mbrbatch003, and run following command.
"mbrbatch.cmd create O:\disk_images\mbr.bin"
but it shows SYNTAX ERROR.
(mbrbatch_g1.jpg)

when I use notepad to open mbrbatch.cmd,
It seems that the file contents many special characters.
(mbrbatch_g2.jpg & mbrbatch_g3.jpg)

when I use Scite to open mbrbatch.cmd,
It appears SUPERSCRIPT words.
(mbrbatch_g4.jpg)

I use WinXP SP3 (Traditional Chinese),
Does it cause the problem?

Attached Thumbnails

  • mbrbatch_g1.jpg
  • mbrbatch_g2.jpg
  • mbrbatch_g3.jpg
  • mbrbatch_g4.jpg


#47 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 18 November 2009 - 01:18 PM

Strange. :dubbio:

the "superscript 3"=³ is actually an ASCII 179 character, which in DOS (and in CMD prompt) will/should result as a vertical dividing line:
http://www.asciitable.com/
same thing applies to lines like:

SET Lineb=ÚÄÄÄÄÄÂÄÄÄÄÂÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ
¿


To see them "appropriately" use EDIT (which uses DOS/CMD prompt characters).

But is should result in a "garbled" screen output, at the worst.

By issuing a "create" command, this is what happens on a "western" system:
C:\Downloaded\mbrbatch\New_version>mbrbatch create test.mbr

Creating a MBR from C:\WINDOWS\System32\dmadmin.exe with dsfo.exe:

OK, 512 bytes, 0.000s, MD5 = 61a174a7d3cbe41d9996de0f124b7ebf



C:\Downloaded\mbrbatch\New_version>
The:

Parameters are as follows:

come from the sub-routine:
:ConfirmParams
which is NOT called in any way from the "main" :MBRCREATE:
:MBRCREATE

IF %INTERACTIVE%.==1. CALL :MBRCREATEI

SET gsarstring=gsar -b -s:x33:xC0:x8E:xD0:xBC:x00:x7C:xFB:x50

SET Sysfile=%SystemRoot%\System32\dmadmin.exe

REM SET Sysfile=%SystemRoot%\System32\spcmdcon.sys

REM SET Sysfile=%SystemRoot%\ServicePackFiles\I386\setupdd.sys

FOR /F "tokens=3 delims=:" %%A IN ('%gsarstring% %Sysfile%^|FIND "%Sysfile%"^| FIND /V "match found"') DO SET /A Offset=%%A

SET /A Offset=%Offset%

Set /A Length=512

SET Target=%2

ECHO Creating a MBR from %Sysfile% with dsfo.exe:

REM IF EXIST %Target% del %Target%

dsfo %Sysfile% %Offset% %Length% %Target%

GOTO :EOF

It seems like the batch does not "understand" the GOTO :EOF and goes on....:cheers:.

Try doing the following:
change first line of the batch from:
@ECHO OFF
to:
REM @ECHO OFF
then run as:
mbrbatch.cmd create O:\disk_images\mbr.bin >log.txt 2>&1
compress the resulting log.txt in a .zip or .7z archive and attach it to your next post.

Please note that this:

I have downloaded mbrbatch003, and run following command.
"mbrbatch.cmd create O:\disk_images\mbr.bin"
but it shows SYNTAX ERROR.
(mbrbatch_g1.jpg)

is NOT what is in the screenshot, which is:

call mbrbatch.cmd create O:\disk_images\mbr.bin



:cheers:

jaclaz

#48 cdob

cdob

    Gold Member

  • Expert
  • 1440 posts

Posted 17 January 2010 - 06:53 PM

@jaclaz or jaclaz's parallel universe companion

Can you add aligning to 4 kb boundaries?
E.g. StartSector 64 or 128

http://www.ocztechno...ead.php?t=48309
http://support.micro...kb/923076/en-us
http://www.wdc.com/e...advancedformat/

#49 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14959 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 17 January 2010 - 07:24 PM

Well, I guess it is possible, but it is VERY dangerous for XP users apparently (at least on multipartitions, that however the Mkimg does not create):
http://www.boot-land...?...ic=9897&hl=

If I get this right the geometry of the device remains the "normal" 255/63 one and one simply creates "crazy" CHS and LBA values - not respecting cylinder and head boundary? :confused1:

This is already possible with mbrbatch EDIT using LBA mode.....

Doesn't Vista uses normally a 1024 Kb alignment ? :rolleyes:

Wonko

Source:testmbr.mbr

┌─────┬────┬────┬───────────────┬───────────────┬───────────┬─────────────┐

│Part │Type│Boot│  Begin   CHS  │   End   CHS   │ LBA Start │ LBA Sectors │

│  #  │	│	│ BCyl │BHd│BSec│ ECyl │EHd│ESec│		   │			 │

├─────┼────┼────┼──────┼───┼────┼──────┼───┼────┼───────────┼─────────────┤

│	1│  07│  80│	 0│  1│   1│	97│254│  63│		 63│	 34475427│

├─────┼────┼────┼──────┼───┼────┼──────┼───┼────┼───────────┼─────────────┤

│	2│  00│  00│	 0│  0│   0│	 0│  0│   0│		  0│			0│

├─────┼────┼────┼──────┼───┼────┼──────┼───┼────┼───────────┼─────────────┤

│	3│  00│  00│	 0│  0│   0│	 0│  0│   0│		  0│			0│

├─────┼────┼────┼──────┼───┼────┼──────┼───┼────┼───────────┼─────────────┤

│	4│  00│  00│	 0│  0│   0│	 0│  0│   0│		  0│			0│

└─────┴────┴────┴──────┴───┴────┴──────┴───┴────┴───────────┴─────────────┘



Drive geometry: 255/63 Program Mode: LBA

┌─────┬────┬────┬───────────────┬───────────────┬───────────┬─────────────┐

│Part │Type│Boot│  Begin   CHS  │   End   CHS   │ LBA Start │ LBA Sectors │

│  #  │	│	│ BCyl │BHd│BSec│ ECyl │EHd│ESec│		   │			 │

├─────┼────┼────┼──────┼───┼────┼──────┼───┼────┼───────────┼─────────────┤

│	1│  07│  80│	 0│  1│   2│  2145│254│  63│		 64│	 34475426│

(The Ending Cylinder will be written as 1023)

Are you sure you want to write the above values to file testmbr.mbr?

Type YES to confirm: YES

Writing data....

PartType=07

Active=80

BCyl=00

BHd=01

BSec=02

ECyl=FF

EHd=FE

ESec=FF

StartLBA=40000000

SectorsLBA=A20D0E02


#50 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14959 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 February 2010 - 12:46 PM

A hopefully "bettered" and x32/x64 compatible, and with added features by Lancelot can be found here:

http://www.boot-land...?showtopic=5000
http://www.boot-land...?...c=5000&st=5

:cheers:

Wonko




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users