Jump to content











Photo
- - - - -

stuck here with clonedisk tutorial about adjusting partition image for booting


  • Please log in to reply
22 replies to this topic

#1 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 25 July 2016 - 04:48 AM

Im back to this tutorial on ErwinI's blog here: http://labalec.fr/erwan/?p=1550

Im trying to make a primary partition image bootable. here is what I have:


the HDD partition that i have made a partition image of the first partition:
C2QMHHk.jpg


what I have entered for step #3 in ErwinI's guide:
duiWBiN.jpg


where Im stuck (step #5)
EgPAlqr.jpg

Im not sure what to enter here or how to determine what to enter here, more help needed please.

thanks

#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 25 July 2016 - 08:30 AM


Im not sure what to enter here or how to determine what to enter here, more help needed please.

thanks

Are you serious? :unsure:

How big (how many sectors) did you put in front of the partition image with the copy /B?

Or how big is (in sectors) the "header.img"?

Strangely enough, since you shifted the beginning of the partition by n sectors (the size of the header.img you pre-pended to the partition image) you need to have both in the MBR and in the PBR that n number of sectors (as "Sectors Before" in the MBR and as "HiddenSec" in the PBR).

If you prefer, the PBR which was first sector of the partition image is now sector n, since you added n sectors before it.

 

:duff:

Wonko



#3 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 25 July 2016 - 09:02 AM

hi Wonko, yeah im serious lol. may be very simple to you but its very confusing to me.. step #1 I entered "1" because it says "Create a 1 MBytes (2048*512=1MB) header file"

then right after those words he has this note: "Note : instead of 2048 sectors, you can go for 63 or 128 or whatever « sectors before » may suit you – just report that number in the following steps."

what that has to do with step #1, creating a 1mb file? i dont get that part. that note, why put it there? I entered "1" in that box because it says "size in megabytes" and it is to create a 1mb file. is "1" incorrect for that box entry?

off topic, I pulled out my old w2000 disc and will try to make it even smaller than the XP in this partition Im trying to make into an .img that i can boot from grub4dos. after I get this figured out anyway.

thanks

#4 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 25 July 2016 - 10:43 AM

Imagine a book (in the sense of a stack of printed sheets of paper carrying a page number at the bottom).

 

It's first page will have 1 neatly printed at the bottom, 2nd page will have 2, etc.

The printed page number reflects the actual position of the sheet of paper in the stack. 

Now you want to bind those sheets into a "proper" book.

 

So you add in front of it at least a cover (or you may want to add also a blank page, a title page and - say - two pages listing the chapters).

The number printed on each sheet does not represent anymore its position in the stack, there is a constant "offset" that needs to be added to the page number to represent its position in the stack.

 

The "header.img" in that tutorial represents the same thing as this/these pages you add in front of the book (pre-pend).

 

So if you add just one page, the offset will be 1, if you add 2 pages it will be 2, etc.

 

When you make a 1 Mb header.img you are adding 2048 pages (each page being 512 bytes).

 

So if you add 2048 sectors, you write 2048 as "Sectors before" in the MBR and 2048 as "HiddenSec" in the PBR.

If you want to write 63 to those fields (and have the thingy work), the header.img image needs to be 63 sectors in size, i.e. 512*63=32256 bytes

If you want to write 128 to those fields ((and have the thingy work), header.img image needs to be 128 sectors in size, i.e. 512*128= 65536 bytes

...

 

Check the size of the header.img you made, possibly :unsure: there is typo in the GUI, and those are Kbytes and not Mbytes, in the screenshot on the tutorial the entered number is 1024 and since 1024*1024=1048576=2048*512....

Conversely, if this is the case, unless it accepts 31.5 you won't be able to make a 63 sectors file.

You can use FSUTIL or fsz (part of the DSFOK tools) to make a file with size exact to the byte. 

 

 

Naah I just checked a (recent) clonedisk I have around, the new dialog allows to specify the unit of measure).

 

:duff:

Wonko



#5 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 25 July 2016 - 07:56 PM

good analogy. im using clonedisk that is current (i just downloaded this one) 2.3.5

the header img size for the .img that I made entering "1" is 1024kb

so does the "enter sector offset" box entry depend on the size of what size you enter in step #1 for raw image and if so, how so?
im still unclear on how mega byte is converted into sectors, is the formula for that a static one or instead dynamic in that is depends on some other variable?

it seems like the step im stuck at should be either 63, or 128, or maybe even 2048, no? for now I'll go with 63 i guess and see what happens.

#6 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 25 July 2016 - 09:23 PM

when i try to do step #5, as soon as I load "disk.img" the pop up "enter sector offset" appears. if i enter anything other than "2048" all the fiels appear blank:

2R0GE33.jpg

if i enter "2048" though, the fields are filled in with this:

yvQbfLC.jpg

i dont see anything here to "change mbr" so I exit clonedisk and reboot into grub4dos to try and boot this disk.img:

lAEwryf.jpg

what should i try now?

#7 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 25 July 2016 - 10:37 PM

Oh, you're not stuck here at all. Unlike the hotel referenced in The Eagles' "Hotel California", you can check in any time you like, but you can also leave (as far as I'm concerned, anyway).

 

Maybe next time just say you're stuck on an issue, not stuck here.



#8 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 25 July 2016 - 11:26 PM

Oh, you're not stuck here at all. Unlike the hotel referenced in The Eagles' "Hotel California", you can check in any time you like, but you can also leave (as far as I'm concerned, anyway).

Maybe next time just say you're stuck on an issue, not stuck here.



trolls are so predictable.

#9 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 25 July 2016 - 11:55 PM

I just figured I would nail you on a technicality. Next time, name your topic using proper English, which you seem to be lacking somewhat. This is funny considering that you claim to be from the Isle of Man. I would expect you guys to have better English skills than an American like myself.

 

You can't spell for shit, your punctuation is like a natural disaster. Where did you learn English, China?



#10 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 26 July 2016 - 12:42 AM

I just figured I would nail you on a technicality. Next time, name your topic using proper English, which you seem to be lacking somewhat. This is funny considering that you claim to be from the Isle of Man. I would expect you guys to have better English skills than an American like myself.

You can't spell for shit, your punctuation is like a natural disaster. Where did you learn English, China?



the programmed mind is so predictable. english is a program, a script. originally known as dog latin. all words have more than one meaning. in the beginning was...

are you truely an american? what is the definition of that? who created that definition? and why do you think you are something your not? i'll tell ya... its part of the program.

what is real?

#11 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 26 July 2016 - 01:05 AM

Here you go, off on a wild tangent with your conspiracy theories.

 

You have made the claim that "the programmed mind is so predictable". Do you have proof that the human mind (or the mind of any thinking creature, for that matter) is merely something that is programmed to respond to stimuli and react in a predictable way, and incapable of spontaneity and freedom of thought? No? I didn't think so either.

 

English, or language for that matter, is neither a program nor a script, it is a means of communication created so that we humans can better understand each other and express our thoughts. Animals also, of course, use language to communicate. It doesn't take a rocket scientist to figure that out.

 

I do not consider myself an American, or a patriot of this country. I am, rather, a world citizen that is fed up with nationalism. It is one of the things that serves to divide humanity. And I could care less about the so-called "one world order", the Illuminati (if it even exists), etc. I am also very much a lone-wolf type. I only used the term American to prove a point. I could care less what the definition of the word is or who originally defined it.

 

Edit: There is only one instance I can think of when I would support nationalism, and that is in regards to Mr. Donald J. Trump. He is a pure businessman that won't back down. And he isn't beholden to special interests. He really cares about this country, and is tired of America being walked on by other countries. Like me, he is very brash and vocal. I believe that, in comparison to Clinton, he will be the better person for the job. And while a president can only do but so much, he will certainly acomplish more positive change than she can. Americans must choose the least of 2 evils. I normally wouldn't care about politics and consider myself apolitical, aligned with no party. And I will vote for the person I think is best for the job, whoever that may be (which is usually noone, most of the time). But in Trump's case I get a different feeling.



#12 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 26 July 2016 - 01:22 AM

might the proof you seek be write in front of you?

#13 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 26 July 2016 - 04:55 AM

the characters are coded to perform on thought alone

#14 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 July 2016 - 07:41 AM

Zoso, it's not difficult.

A "normal" hard disk like device is a so called "block device".

It is normally addressed by a notation called LBA (Large Block Addressing).

A block (or sector) is normally 512 bytes in size (new hard disks, may be "AF (Advanced format)  and have internally a 4K sector size but still externally expose 512 bytes sector, newer ones are called "native 4 K"  and expose a 4096 bytes sector).

 

The first sector of your partition/volume image (the PBR or boot record) is 1st sector, it is at offset or LBA 0.

 

You put BEFORE it a file filled with 00's sized 2048 sectors.

 

What is now the LBA address of the PBR?

1. 2048 (as in 0+2048=2048)

2. 42

3. 63

4. 128

:frusty:

 

Hint, when you tell clonedisk to load a PBR at a given offset, when you input 2048 (since the file you pre-pended is 2048 sector in size as 2048*512=1.048.576=1 Mb) it does load some PBR values, when you use a different offset, like 42, 63, 128 the fields are all 00's.

 

What (the heck) is the issue?

 

Create the header.img of the size in sectors you want the partition offset.

 

New example:

If you want 63 sectors before create the header.img 63*512=32256 bytes in size (i.e. 63 sectors, i.e. 63 blocks)

If you want 128 sectors before create the header.img 128*512=65536 bytes in size (i.e. 128 sectors, i.e. 128 blocks)

If you want 2048 sectors before create the header.img 2048*512=1048576 bytes in size (i.e. 2048 sectors, i.e. 2048 blocks)

 

What is so difficult in the above concept?

You insert an amount of bytes before the PBR, the PBR's address is shifted of that amount of bytes, you can only insert bytes as multiples of 512 bytes that are called sectors or blocks.

 

About the MBR, click on the tab called "Master Boot Record", the screenshots you posted are of the tab called "Boot Sector".

 

:duff:

Wonko



#15 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 26 July 2016 - 08:10 AM

alright.. hang on, i was just about to get radical with it as ive backed up the mbr and imaged the whole drive and the only way i can access it to do what i want to do, unfortunately is hirens becasue of such low ram and to boot that i am booting it from the HDD that i will be wiping!

so id rather do it this way but ive gone over and ove that tutorial and your posts and haven't been able to put it together correctly.


the first two screen shots are the mbr tab but ill brb with the current mbr screencaps as-is.


OK, this is the disk image i just remade following step 1&2:

R0DEHKe.jpg

doesnt look right at all but what do i know..


edit: i just checked the partition image i made first and then loaded it to view this same tab in clonedisk. it is identical to the "disk.img" made by step 1&2??

somethings not correct here. Im gonna make another image of the partition to see if it comes out the same way. takes a while on this old equipment even though its a very small partition.


edit2: new partition image looks the same as the screencap above.

can we talk about a plan B now?

#16 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 July 2016 - 12:32 PM

No.
There is not any plan B (there is but it is much more complicated than plan A, that works flawlessly for every one but you, which means that there is something that either you do not understand or that is not explained properly, in the tutorial or in my previous posts).
You are clearly doing something that is NOT written anywhere or that you fail to report.
 
Please answer these questions EXACTLY:
1) how big in size is the part.img (the image that you made out of the partition)? (EXACT size, in bytes)
2) how (exactly) did you create that image (part.img)?
3) how many sectors do you want to put before that image or how large do you want to make the header.img? (Please choose between 63, 128 or 2048 sectors)
 
If you prefer, run in a command prompt:
DIR E:\*.img
and post the output, it should look *like*:
 
C:\batches\GPTTESTS>fsz K:\part.img 2147483648
OK
C:\batches\GPTTESTS>fsz K:\header.img 1048576
OK
C:\batches\GPTTESTS>K:

K:\>copy /b header.img+part.img disk.img
header.img
part.img
        1 file copiati.

K:\>DIR *.img
 Il volume nell'unità K è NONAME
 Numero di serie del volume: 38BD-5255

 Directory di K:\

26/07/2016  14.29     2.148.532.224 disk.img
26/07/2016  14.20         1.048.576 header.img
26/07/2016  14.20     2.147.483.648 part.img
               3 File  4.297.064.448 byte
               0 Directory   3.712.917.504 byte disponibili
Please note how disk.img size is the sum of header.img + part.img.
 
:duff:
Wonko

#17 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 26 July 2016 - 01:27 PM

this is the partition im trying to make into a bootable .img:
Kakc944.jpg

i created it with clonedisk located on E: by clicking the 1 PART D: [Toshiba 1] 321 309 12 NTFS bar selection then clicking the clone tab on the right side then clicking the back up to image then clicking OK and saving it in E:

UGZqWPB.jpg


of making the header.img:
COBwCDt.jpg

and the sizes and cmd info:
nia9a35.jpg

now I see the header is 0, that might be the problem?

edit: but the "part.img" image (not the edited "disk.img") is still just like this when checked out again:

R0DEHKe.jpg

ive made it three times now and each time this is what it looks like. is this output expected?

IIRC i partitioned this with xp disk manager but then later resizing with AOMIE but that was years ago now and maybe i used a different tool to resize.

#18 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 July 2016 - 05:12 PM

If you add a 0 sized header.img, the resulting disk.img will be identical to part.img, of course.

Since the first sector of the part.img is a boot sector or PBR, it remains the first sector of disk.img and it CANNOT be viewed as a MBR (actually it can, but all values will be crazy), so your output is expected, you are using a "template" for a MBR on a sector that actually contains a bootsector, click on the tab "Boot Sector" and values should begin making some sense.

It is possible that there is a bug in clonedisk, but anyway you DO NOT want to make a header.img sized 1024 Mb, which is 1 Gb! :frusty:

You want to have in that small window, for 2048 sectors B selected and write in the size field 1048576 or have KB selected and write in the size field 1024. (or for 63 sectors have B selected and write in the size field 32256, etc.)

In any case, in the DIR *.img you want to have a header.img sized 1048576 bytes before running the copy /b.

 

Should - for whatever reason - clonedisk not work to create the header.img of the correct size, open a command prompt and in it type:

del E:\header.img
fsutil file createnew E:\header.img 1048576

or

del E:\header.img
fsutil file createnew E:\header.img 32256

etc.

:duff:
Wonko


 



#19 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 27 July 2016 - 02:30 AM

ok, new header file but this time with radio button switch set at "B" and "63" entered in size box.

that is what i was missing, now it works, at least its trying to boot now but a new problem. BSOD 6b PROCESS_INTITIALIZATION_FAILED.

could this be related to the image adjustments or something else? im inclined to think something else as ive seen it before many times when experimenting but not sure. this OS is a tiny XP with usboot, ewf, firadisk & winvblock.

ive searched around about this 6b error and seems it could be related to many things. MS says ntdll but some threads here indicate ewf, or other drivers, hard to guess but ive done a few different images now that at least start to boot until they get 6b error. first just as it was, another, with ewf disabled, another with mnt devs registry key cleared and so far they all get 6b error so im running out of guesses. could conflicting disk signature have anything todo with it?

or maybe step 4 "Inject boot code (nt6) (this will also fix the mbr magic byte AA55)" could that have anything to do with it since im booting the image on the exact same hardware it was taken from?

thanks alot for the help so far with clonedisk Wonko! at least i no longer need to try something radical that might turn this into a brick now. i would like to get this image working because it is the smallest xp ive made for this hardware specifically to boot from image as a service os spent lots of time on that so i dont want to give up with it now.

edit: if the original OS that im imaging then trying to boot is still in the first partition then this image boots up without a 6b error but it is mixed up and showing up as drive F: and system is C: so it is using the original os files to boot, indicates the original os is booted but this image is mounted and showing in diskmanager as F:.

wierd but maybe thats a clue of why it gets 6b when the original os is removed from hdd?

#20 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 27 July 2016 - 10:50 AM

No. 

You CANNOT (or SHOULD HAVE NOT) made a header.img 63 bytes in size  :ranting2:  (this is what you just reported).

 

Really, I cannot understand if you are just playing a game with me or are - by nature - so inaccurate and imprecise as to do what appear "random" or "crazy" things or however report whatever you did in such vague ways that making head or tail of your reports is made so complex by mistake. :dubbio:

 

It is really tiring/difficult to follow you. :(

 

Why (the heck) would you need Firadisk OR Winvblock (and NEVER both) in a "plain" XP on a hard disk partition? :frusty:

 

Surely EWF (of which there several versions), and EWF by itself means little, may be part of the issue, but did you "generalize" the XP (ither online or offline)?

 

In case:
http://www.911cd.net...hp?showforum=43

 

I love to see people (and hopefully help them) "trying things to see if they work", but you seem like doing random things without a proper "plan" and/or without having studied - even minimally - "previous art".

 

I will mention - in passing by - the term "Disk Signature" which is what NT systems use to reference to assign drive letters, your C: and F: troubles are 99% connected to the fact that the FIRST BASIC thing when "porting" an XP install is to EITHER duplicate the Disk Signature or (better) correct  the link in HKEY_LOCAL_MACHINE\SYSTEM\ MountedDevices, or even better remove it and let the XP recreate it, among the zillion references on this board, I have picked one in the Clonedisk thread (the one you should know by heart):
http://reboot.pro/to...nedisk/?p=96637

(which specific course of action to choose is to be seen specifically)

 

This piece of info is however all over bootland/reboot.pro, you cannot have missed that, a few older examples (with some more details):

http://reboot.pro/to...m-a-hdd-solved/

http://reboot.pro/to...ash-didnt-work/

http://reboot.pro/to...nsically-sound/

 

:duff:

Wonko



#21 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 27 July 2016 - 06:51 PM

hey Wonko,

no.. im not playing games with you. lol and the 63 byte header i guess was a mistake but it seems to work. i thought that size could be either 63, 129, or 2048 and since 63 is smallest, i chose that. seems to work but why it should not be 63?

i am naturally unorthodox though so that im sure has alot to do with reports seem difficult, thats not my intent at all (to confuse you).

Ive always added firadisk and winvblock together, why not?

no, have not generalized anything but that first link leads me to the forum only and not a topic. all i know about generalizing is it may have something to do with sysprep or sometimes a BCD entry IIRC needs to be generalized to clear the volume id or something like that.

yeah, Im trying random things because its stuff that ive learned one way or the other works for BSOD errors in other cases so maybe it works in this one. no way to know unless i try them.

the BSOD 6b error changed to 7b one after i uninstalled usboot components (driveguard, serviceguard, arcguard, & device guard) i did that because i knew this image wasnt going to be booted from usb. it was there because the original OS on the first partition came from a universal XP to begin with. so anyway, now working on 7b error which from my limited experience is much easier to overcome than 6b one.

my thought on that at this point is to try wimbs intellppm registry key entry and to reinstall usboot driveguard only. was going to try those next.

yes, I have been removing the mounted devices in the registry first but then tried it without removing them to see if that had any effect. usually i remove them always when moving XP somewhere else.


from your last post, i think i need to look into how to "generalize" XP and check the disk signatures.

thanks

#22 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 27 July 2016 - 07:25 PM

Ok, then insist on having made a 63 bytes header.img and that it is working, if you are happy with it.

 

I will try again.

 

You reported that you selected "B" for bytes and then input 63 as the size in the dialog.

 

This would have produced a 63 bytes sized header.img.

 

Such a header image will not EVER work or boot.

 

What you did is most probably that after having selected "B" you input (as you were told) 32256, which would have created a 32256 bytes header.img (i.e. a 63 sectors sized header.img) that will obviously work.

 

I have spent several posts (and lots of time) only to try and explain you how a sector is made of 512 bytes, how bytes is not the same thing as sectors, how extreme accurateness is needed when dealing with these matters and this is the result? :frusty:

 

Your is not being "unorthodox", it is pure and simple being "sloppy", and totally lacking any form of respect towards me or any good will in attempting to communicate (BTW at the scope of assisting you in your issue(s)).

 

I have to analyze each and every single §@ç#ing sentence and piece of data that you write and guess what you actually meant as what you write is never proper, accurate or complete.  :ranting2:

 

If you were doing this on purpose, you managed to trick me into it, it has been fun :), but now it would be time to stop it.

 

If you were doing unknowingly, now you know, so it would still be the right time to stop it.

 

You had a problem in following a simple set of steps of a Clonedisk tutorial, that problem is now seemingly solved.

 

Good luck with solving your 6b (or now 7b) issue, keep adding and removing kernel drivers and Registry entries at random, surely before or later you will find a way to boot that XP successfully  :thumbup:  .

 

:duff:

Wonko



#23 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 27 July 2016 - 07:56 PM

yep, the header.img is 32kb. so i must have entered 32256 then. youve helped alot here Wonko and i appreciate it but this stuff is confusing so youll have to forgive me for any mistakes reporting or at least try to overlook them.

maybe you can fix that first link about generalize to 911cd forum? or explain why firdaisk and winvblock should not be used together? i think that might have something to do with the phantom partition that shows up when i boot os in ram sometimes? i think i showed that to you before but just like now, you probably thought i was playing tricks on you. WTF is that all about anyway?

i think it is solved though. the problem in OP anyway and what youve explained here is much clearer now but still a little fuzzy so i'll read through your posts again.

if i dont find a way to boot this XP (i probably will) then I will move onto the new 2000 since it seems I can make it even smaller and still have the same level of functionality for this project. i'll bet you cant waith to help me with that now. lol

:-)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users