Jump to content











Photo
- - - - -

Please help me fix the computer

grub windows 7

  • Please log in to reply
73 replies to this topic

#51 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 15 November 2014 - 10:39 PM

Both chainloading and the cat --hex command on ESWJT produced Error 17: Cannot mount....

Same with cat --hex /bootsect.bak.

There was E.S.J.W.T across lines 6 and 7 for (hd0)1+1.



#52 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 16 November 2014 - 10:43 AM

There was E.S.J.W.T across lines 6 and 7 for (hd0)1+1.

Interesting.

I have seen a similar thing on a system that needed fixing, but never connected that "random" string with a loader, I thought that it was the effect of some malware (of which the system was full).
So i can now revise the previous hypothesis.
The original was likely:
BIOS->PBR->BOOTMGR->\boot\BCD->Windows 7
and what you have now is likely to be:
BIOS->PBR->"ESWJT"->BOOTMGR->\boot\BCD->Windows 7
 
I  still believe that the "ESWJT" is - one way or the other - a version of grub4dos, somehow modified, so what happens may be that *somehow*  the "direct" chainloading of BIOS->PBR->BOOTMGR worked while inserting before BOOTMGR *something* else makes the thing fail.
 
 

Both chainloading and the cat --hex command on ESWJT produced Error 17: Cannot mount....
Same with cat --hex /bootsect.bak.

I don't believe you. :w00t::ph34r:

In the sense :) that error 17 should mean that you haven't established correctly root, i.e. (on a fresh reboot) either of:

root (hd0)
cat --hex /ESWJT
chainloader /ESWJT
cat --hex /bootsect.bak

or

cat --hex (hd0)/ESWJT
chainloader (hd0)/ESWJT
cat --hex (hd0)/bootsect.bak

should work fine.

 

I still need answers to these questions:

 


In case of need do you have available?:
  • a Windows 7 install DVD or .iso
  • an "expendable" USB stick that we can use (i.e. that contains no important data, as they will be lost in the attempts)?

 

In order to go ahead and suggest (hopefully) a repair procedure.

 

Additionallly, can you please try running:

help cat

(we don't know the actual grub4dos version that is booting right now, older versions did NOT have the  --replace= switch, which would be useful)

If the output is like this one:

http://diddy.boot-la...ommands.htm#cat

you have an older version, a current one would look like:

 

cat [--hex] [--skip=S] [--length=L] [--locate[i]=STRING] [--replace=REPLACE]
[--locate-align=A] [--number=n] FILE
Print the contents of the file FILE,Or print the locations of the string STRING in FILE,
--replace replaces STRING with REPLACE in FILE.--number use with --locate,the max number for locate

 

 

:duff:

Wonko



#53 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 16 November 2014 - 06:17 PM

Ah I forgot to root before the commands. I am so inexperienced I didn't realise I needed to. And I thought I had answered those two questions already. I have a USB but I don't think the windows ISO I have is genuine and might make it worse. Where can I get a genuine one? I will try the commands again when I get home.

#54 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 16 November 2014 - 07:40 PM

I did the commands and ESWJT ones produced Error 15 this time (I think it was file not found .
The bootsect.bak one produced a very long list. It says "N.T.F.S" on the first line, then "A disk read error occurred...BOOTMGR is missing... BOOTMGR is compressed... Press Ctrl+Alt+Del to restart" on lines 00000180 - 000001F0. "B.O.O.T.M.G.R" on line 00000200, "N.T.L.D.R" on lines 00000250 - 00000260, then it seems to be random stuff then it goes to all 0s for a bit. There is no replace on the help cat command.

#55 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 November 2014 - 10:45 AM

"B.O.O.T.M.G.R" on line 00000200, "N.T.L.D.R" on lines 00000250 - 00000260, then it seems to be random stuff then it goes to all 0s for a bit.

Good :), it is another good sign that the bootsect.bak is actually a backup of the original bootsector.
 

There is no replace on the help cat command.

Bad :(, in the sense that we will need *something* else to attempt fixing the booting sequence.

The "generic" plan now is the following:

  1. make a backup copy of the current bootsector on a USB stick
  2. make a copy of the bootsect.bak (still on the USB stick)
  3. copy the bootsect.bak to the bootsector
  4. attempt booting from the SSD

There is no real *need* for doing the above of a windows 7 install disc (or similar), it would have been nice to have one because it would have allowed for some alternate attempts/repair methods.

 

You mentioned before that you booted from a Linux on USB stick, right?

Which version/distro is it?

Can you check if it contains the dd command? 

Do you know how to open a command prompt in Linux, right? (or check if your distro contains a GUI hex/disk editor)

 

:duff:

Wonko



#56 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 17 November 2014 - 04:50 PM

I am running Ubuntu 14.04 LTS on USB. How should I backup the current boot sector? And could I back up onto one of my hard drives instead?

#57 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 17 November 2014 - 04:53 PM

I am running Ubuntu 14.04 LTS on USB. How should I backup the current boot sector? And could I back up onto one of my hard drives instead?

#58 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 November 2014 - 07:27 PM

I am running Ubuntu 14.04 LTS on USB. How should I backup the current boot sector? And could I back up onto one of my hard drives instead?

Find reply in the attached image (browser or site crashed, don't ask :ph34r:  :frusty:  ).

 

:duff:

Wonko

Attached Thumbnails

  • dd_img.jpg


#59 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 18 November 2014 - 09:16 PM

I don't have much experience in any Linux really, I used Ubuntu once before for a very short amount of time but find it difficult to install stuff. I will have a go with terminal though if you know roughly what I should type. I don't know any syntax myself though. I'll try those commands now and then report back.

#60 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 18 November 2014 - 09:28 PM

"Failed to open '/mnt/sdc1/bootsect.now': No such file or directory"

#61 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 19 November 2014 - 07:33 PM

Hmmm, that could be because the "target" is non existing (not mounted or mounted to another mounting point) or because of a permission issue or because the target is NTFS.
 
If you are not familiar with the Linux terminal, it will be complex to assist you, but you could still do something else.
 
Create a "new" bootable USB stick, making use of RMPREPUSB (which is an easy enough way to have a bootable stick including a new, updated version of grub4dos which will include the needed commands).
You will need a "work computer" running a Windows, however.
Get RMPREPUSB from here:
http://www.rmprepusb.com/
use it to create a bootable USB stick boo

#62 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 20 November 2014 - 04:22 PM

I was really really hoping that this would work and it seemed like the commands ran fine but when I boot normally it just had a blinking underscore after the motherboard screen. It doesn't go to the old grub4dos.

#63 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 20 November 2014 - 06:13 PM

I was really really hoping that this would work and it seemed like the commands ran fine but when I boot normally it just had a blinking underscore after the motherboard screen. It doesn't go to the old grub4dos.

Well, this is not (yet) a sign of "defeat".

 

The blinking underscore is usually a sign of an issue with geometry/size.
Maybe the bootsect.bak was a backup of a bootsector taken "before" something else changed the setup.
It is possible that we can "mix" the two bootsectors, AFAICU the stupid loader only changes second sector (code only) of the bootsector, changing the OS loader used from BOOTMGR to the ESWJT.
You can try booting from the grub4dos stick and run the command (again CHECK which drive is which):

dd if=(hd0,0)/bootsect.now of=(hd1)0+1 count=1

this will replace the first sector (the one that contains the actual volume size data) with the one that was in use till last attempt.

 

The "original" problem still has no answer, however, i.e. how exactly did the PC boot "before", I still believe that the SSD being not partitioned is the "root of all evil", and I am still wonder how the heck it could have worked originally. :unsure:

 

Besides trying the above, you should try re-connecting your other hard disks, now.

 

It is possible that the loader, besides altering the bootsector on the SSD, has *somehow* changed the booting sequence and "moved" or copied to the SSD the BOOTMGR file and \boot\BCD to the SSD (while they were before on one of the other hard disks partitions).

 

The theory of operation of the Windows 7 OS is that there can be a "single" volume (which is at the same time "system" and "boot" ) or it is possible that the OS is split into two volumes a "boot" and a "system" one (Microsoft has it the "wrong" way and calls "system" the volume that contains the "booting files" BOOTMGR and \boot\BCD and "boot" volume the one that contains the actual operating system.

 

So, try the above command.

 

If it still gets to a blinking underscore, you should "revert" the situation restoring the "bootsect.now" entirely.

 

That would be (still booted from the stick with the newish  grub4dos):

dd  if=(hd0,0)/boosect.now of=(hd1)0+16 count=16

Then, still in the new grub4dos, you could try again chainloading the BOOTMGR directly.

map (hd1) (fd0)
map --hook
root (fd0)
chainloader /bootmgr
boot

:duff:

Wonko



#64 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 21 November 2014 - 02:25 PM

I was checking the drives again but now I can't do root (hd1) so I can't check that's still the SSD. Shall I assume it is? I think the other drives are my other hard drives

#65 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 21 November 2014 - 02:55 PM

I was checking the drives again but now I can't do root (hd1) so I can't check that's still the SSD. Shall I assume it is? I think the other drives are my other hard drives

Well, you can go "by subtraction", if you have 3 hard disk like devices, and you boot form the USB stick (the fourth device), the USB stick is likely to be (hd0) and the internal devices will be (hd1), (hd2), (hd3).

So, if you identify (say) the USB stick as (hd0), the first hard disk as (hd2) and the secnd hard disk as (hd3), the SSD cannot but be (hd1).

 

BUT I suspect :dubbio: (no offence intended but you are a little too "quick" in doing - or not doing - something and completely failing to report accurately what you did) that you may have messed up the whole thing by executing the grub4dos commands without adequate verification of the devices involved. :ph34r:

 

If you did correctly the suggested operations, you would have restored the saved bootsector.now BEFORE re-adding the other hard disks and verified that you were in EXACTLY the same previous situation.

 

Or maybe I was not clear enough :unsure:.

  1. DO NOT reconnect the other hard disks.
  2. Try copying the first sector only of the bootsect.now -> dd if=(hd0,0)/bootsect.now of=(hd1)0+1 count=1
  3. Verify that you can get root to (hd1)
  4. Try booting without the stick inserted
  5. If you cannot root to (hd1) copy back the WHOLE bootsect.now -> dd if=(hd0,0)/boosect.now of=(hd1)0+16 count=16
  6. Now you should be (if you executed all commands correctly and on the "right" devices) EXACTLY in the initial situation
  7. Try booting without the stick inserted
  8. Reconnect the other hard disks
  9. Try again booting from the stick and chainloading the BOOTMGR as in last part of post #63

 

:duff:

Wonko



#66 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 21 November 2014 - 05:58 PM

I already had the hard drives in and they have been in for a few days because I have needed to access my files through Ubuntu. I thought it would be better to leave them in so the SSD would (hopefully) stay as hd1. If you had told me to remove them before the whole bootsect business then I must have missed that. I can't check that it is definitely hd1 but I have found at least 2 of the 5 drives to be hard drives and that leaves just one alternative, which I doubt is the SSD. I will try copying the first sector back to hd1 now.



#67 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 21 November 2014 - 06:46 PM

zIyU7IM.jpg

After copying the first sector. I thought I should wait for your instruction before putting the old bootsect back.

Edited by Anon10, 21 November 2014 - 06:48 PM.


#68 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 21 November 2014 - 07:25 PM

I already had the hard drives in and they have been in for a few days because I have needed to access my files through Ubuntu. I thought it would be better to leave them in so the SSD would (hopefully) stay as hd1. If you had told me to remove them before the whole bootsect business then I must have missed that. I can't check that it is definitely hd1 but I have found at least 2 of the 5 drives to be hard drives and that leaves just one alternative, which I doubt is the SSD. I will try copying the first sector back to hd1 now.

Well, it's fine as well, you posted on post #22:
http://reboot.pro/to...er/#entry188414
that you had removed them, and never (or I missed it :unsure:) posted that you had reconnected them.

About the image you just posted, can you describe what exactly you did to get to it?

 

If you ran the 

dd if=(hd0,0)/bootsect.now of=(hd1)0+1 count=1

then rebooted without the stick inserted and you got to that screen you posted an image of, it means that we succeeded to by-pass the loader, with the machine that boots directly to the BOOTMGR (but fails *somehow* in the \boot\BCD).

 

You are in the same situation as in post #36:

http://reboot.pro/to...puter/?p=188514

but now we can exclude the grub4dos mapping of the (hd0) as cause.

 

It is possible that there is an actual issue with the \boot\BCD (i.e. that it is corrupted) but it is still possible that the problem is that BOOTMGR simply doesn't find it (because it doesn't like the non-partitioned SSD).

 

What do you have now on the USB stick (besides the grub4dos)?

How (which filesystem) is it formatted in?

How big in size is it?

Can you add to it a .iso (downloading it)?

The size of a Windows 7 .iso is around 2.4 Gb, you can get one from Digital River, links are here:

http://geeksandtweak...download-links/

 

Next step would be to try booting to the Windows 7 install (but also repair) .iso  and see if we can run a bcdboot command to try to rebuild a suitable (temporary) \boot\BCD on the stick or on one of the hard disks.

 

 

:duff:

Wonko



#69 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 23 November 2014 - 02:42 PM

I have 2 USB sticks, one with Ubuntu and the other with grub4dos. The second one is 16GB and I'm pretty sure I formatted it as fat32. My boyfriend offered to burn me a (clean version) windows 7 disk tomorrow because I didn't know how to get one and I have slow download speeds, so I'll do that and get to keep it afterwards too.

#70 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 24 November 2014 - 03:18 PM

My operating system isn't listed in the System Recovery Options. It says I need to load drivers but I don't know which ones. I am in the process of running the startup repair to see if it finds anything.

Edited by Anon10, 24 November 2014 - 03:21 PM.


#71 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 24 November 2014 - 03:38 PM

It couldn't seem to repair it but in the details it says this:

Partition table is corrupt on disk \Device\Harddisk0.

Repair action: Partition table repair
Result: Failed. Error code = 0x490
Time taken = 806994ms

#72 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 24 November 2014 - 04:40 PM

Yes, this is still revolving around the "same" issue, the SSD should be partitioned (but isn't), we are all back to the same question, i.e. how it was installed initially.

 

I suspect (but you will have to do a few tests to confirm) that *somehow* you originally installed the system to the SSD seen as "volume" while having the BOOTMGR and \boot\BCD on one of the two hard disks.

 

I.e. it is possible (though as said it is the first time I come across something like this) that once the Windows is booted it can actually access the SSD as "volume", it is a wild guess, but while I believe that the loader may copy/change the BOOTMGR and \boot\BCD from another disk to the SSD, I still doubt that it may be able to transform a partitioned device in a "superfloppy".

 

It is also possible (but only you may know how/what) a filter driver of some kind was installed (and this would not be available on the repair CD)

 

So, the attempt should be:

  1. boot to the DVD
  2. press Shift+F10 to get to a command prompt
  3. run mountvol checking which drives are detected and which drive letters they get
  4. run a DIR on each drive letter found by mountvol to see which device/partition is which
  5. IF the volume on the SSD is found and it gets a drive letter, then you can try running the BCDboot  command

Ideally you should however BEFORE doing any other attempt, make an image of the SSD "as is".

 

Please remind me how big is in size the SSD and whether you have, on one or the other hard disk, enough free space to contain such an image.

 

Once an image "as is" is created we would have a "way back" and possibly also the option of re-partitioning the SSD and restoring the actual files from the image to the newly created volume.

 

:duff:

Wonko



#73 Anon10

Anon10

    Member

  • Members
  • 41 posts
  •  
    United Kingdom

Posted 26 November 2014 - 02:32 PM

I think it would take a long time to make an image of my SSD to one of my hard drives. As I have already backed up my important files and I still have the issue of my non-partitioned SSD, perhaps it would just be better at this point to format my SSD, make sure it is partitioned properly and install windows on it from the disk I have? I think it would be faster to do this and reinstall my programs than try to fix the messed up windows.



#74 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 November 2014 - 03:11 PM

I think it would take a long time to make an image of my SSD to one of my hard drives. As I have already backed up my important files and I still have the issue of my non-partitioned SSD, perhaps it would just be better at this point to format my SSD, make sure it is partitioned properly and install windows on it from the disk I have? I think it would be faster to do this and reinstall my programs than try to fix the messed up windows.

Most probably yes :), as long as you are satisfied that you have saved all your data, there should be no problems in starting from scratch, you will have the advantage that IF *something else* was modified/changed, it will be reset in the new install.

 

However imaging a (say) 512 Gb SSD on a (I presume fastish SATA) hard disk should take something like a couple hours or so.

 

 

:duff:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users