Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: will not boot - stumped  (Read 7027 times)

0 Members and 1 Guest are viewing this topic.

alexlauf

    Topic Starter


    Greenhorn

    • Experience: Beginner
    • OS: Unknown
    will not boot - stumped
    « on: October 29, 2011, 10:06:40 AM »
    i can not boot from my hard disk.
    1. it registers ok ( from what i can tell ) in bios ok.
    2. it gets to verifing dmi pool, and stops.
    3. i tried another hard disk ( both it and problem win 2000 ) it boots ok
    4. as slave drive, with alternate hard disk as master, , i can access the drive.
    5. with a disk editor, partition sector looks ok.
    6. made modification to partition boot to jump directly to missing operating system. still hangs , no
    message displayed.
    it seems like if it ever tried loading the partition sector, i should have seen that message, so unless i
    am missing something about the boot process, it seems it never gets around to reading the disk. but
    if so, why not ? seems like if the bios was mis-set, it would not be able to be read when mounted as
    the slave drive. what am i missing here ?

    drive is western digital WD800JB. OS ( if it matters ) is win 2000 sp4. MB is nforce3-a.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: will not boot - stumped
    « Reply #1 on: October 29, 2011, 11:01:35 AM »
    A hard drive can be perfectly normal but still not bookable. The recovery console in Windows XP has two files to fix his.
    FIXMBR
    FIXBOOT
    You have Windows 2000, which has fix-up programs with the same name. But they are different.
    To get to the recovery console, you have to boot the Windows install CD and find then option to use the recovery console.

    (Vista and Windows 7 are different.)

    alexlauf

      Topic Starter


      Greenhorn

      • Experience: Beginner
      • OS: Unknown
      Re: will not boot - stumped
      « Reply #2 on: October 30, 2011, 01:38:28 AM »
      thanks, i already knew about those, but there did not seem to be much point, as it never loaded
      either the MBR or the boot sector. i got desperate, and tried it, and fixboot fixed it !
      the boot sector still looks the same, so i am wondering what got fixed ? does windows have protected
      or read-only sectors, or am i thinking about some old system ?
      i am happy to get back my disk, but this is going to bother me until i figure out what happened !

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: will not boot - stumped
      « Reply #3 on: October 30, 2011, 11:56:18 AM »
      This forum helps with practical problems. As to how and why Windows does things, it is hard to say Witherspoon source code. Looking at the machine code is of little value unless you can get a very broad viewing what happens at boot time.

      Years ago a I made a very simple boot loader for a Floppy controller  I made. Others in the company could not understand how it worked because I neglected to document it. When they asked me, I was able to provide and answer immediate, because I was the designer of the hardware and firmware. and software loader. And that system was much, much simpler that Windows or DOS.

      The point is, without an official explanation of how it works, everybody just makes a guess as to how it works.

      What tools don you use to examine the boot sequence? To really see what happens you have to have special equipment tat logs every instruction execution. This is a hardware debugger the runs in real-time. The average user doesn't have one of them thar whatchamacallit.

      alexlauf

        Topic Starter


        Greenhorn

        • Experience: Beginner
        • OS: Unknown
        Re: will not boot - stumped
        « Reply #4 on: October 31, 2011, 07:43:14 AM »
        i did it the way we did things before there were such things as hardware debuggers ; i made a small
        modification in the boot loader so it would jump and display the "missing operating system" message,
        if it ever actually ran it. since it never displayed it ( or anything else for that matter ), i could tell it never
        made it to loading and executing the code.

        the way i modified the partition sector was with a home brew program using createfile and normal
        read and writes. that turned out to be the cause ; it reads writes the data ok, but it seems to do
        something ( to the sector ? ), so it doesn't seem load at boot time. and the bios seems to be too
        dumb to output a message to indicate what is happening. but it reads and writes fine, so it took
        a while to realize that I had somehow caused it. that is the problem with doing this stuff on your
        own ; you occasionally get hoist on your own petard !

        i remember something about protected or read-only sectors, but i don't remember if that was even this
        platform or an old trs-80 thing. can't find anything on the net so far about it. it seems though, like there is
        something about the sector that got changed other than the data itself, so it could be read and written by
        my simple efforts. but that messed it up at boot.

        what is "Witherspoon source code" by the way ?

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        Re: will not boot - stumped
        « Reply #5 on: October 31, 2011, 07:52:27 AM »
        A Reece Witherspoon movie trailer perhaps ? ?
        " Anyone who goes to a psychiatrist should have his head examined. "

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        Re: will not boot - stumped
        « Reply #6 on: October 31, 2011, 07:53:35 AM »
        What HomeBrew method did you use to modify things ? ?
        " Anyone who goes to a psychiatrist should have his head examined. "

        alexlauf

          Topic Starter


          Greenhorn

          • Experience: Beginner
          • OS: Unknown
          Re: will not boot - stumped
          « Reply #7 on: October 31, 2011, 02:29:40 PM »
          a c++ mfc program. basically, i opened the device using createfile, read in the sector, made a change, then wrote
          it back, then closed the device. the program also has a hex display & code for moving around and making modifications to the disk. it is a work in progress, although, i have to do some research now why it doesn't
          seem to write the partition sector quite right.

          this is all done on Win 2000. i don't think this will work anymore for later OS's, but it's what i have ( and
          can afford ). for that matter, it is debatable if it works completely now, since i'm pretty sure it is what
          made the boot partition not load.

          i was stalled out because i want scrolling, as 32 bit scrollbars and 64 bit sized hard disks don't mix. i was
          possibly going to write my own scrolling, but it looks like i probably have to go back and rework the basic
          disk i/o instead. or learn to live with a disk editor that can't do the partition sector.


          Geek-9pm


            Mastermind
          • Geek After Dark
          • Thanked: 1026
            • Gekk9pm bnlog
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Windows 10
          Re: will not boot - stumped
          « Reply #8 on: October 31, 2011, 03:11:15 PM »
          Quote
          Witherspoon source code
          My metaphor has caused confusion.  Witherspoon stars in the move 'Source Code.'

          Sorry, did not want this to become a movie review. Great movie. If you like far out. Has a cleaver ending.

          What I meant was that it is hard to know what a windows program really does unless you are really deep into it with extreme tools.  Some, eave all, BIOS calls can be intercepted by the OS. To workaround this, software engineers have things that hackers only dream about.

          Don't be surprised that things do not work as you might expect down at the very low machine level code that could potentially alter the OS.

          However, you now have the OS working normally?

          alexlauf

            Topic Starter


            Greenhorn

            • Experience: Beginner
            • OS: Unknown
            Re: will not boot - stumped
            « Reply #9 on: October 31, 2011, 07:13:23 PM »
            yes, after i ran fixboot, it came right back.

            Geek-9pm


              Mastermind
            • Geek After Dark
            • Thanked: 1026
              • Gekk9pm bnlog
            • Certifications: List
            • Computer: Specs
            • Experience: Expert
            • OS: Windows 10
            Re: will not boot - stumped
            « Reply #10 on: October 31, 2011, 07:25:15 PM »
            yes, after i ran fixboot, it came right back.
            Do you mean fixbnoot worked and later you did a reboot and windows 2000 did not come up? Did you get a specific error message or just a black screen?

            Have you used the WD HDD diagnostic program?
            http://support.wdc.com/product/download.asp?groupid=606

            BC_Programmer


              Mastermind
            • Typing is no substitute for thinking.
            • Thanked: 1140
              • Yes
              • Yes
              • BC-Programming.com
            • Certifications: List
            • Computer: Specs
            • Experience: Beginner
            • OS: Windows 11
            Re: will not boot - stumped
            « Reply #11 on: October 31, 2011, 07:36:14 PM »
            i was stalled out because i want scrolling, as 32 bit scrollbars and 64 bit sized hard disks don't mix.

            instead of setting the scrollbar min/max and value properties directly to the hard disk size, use a scaled value, so that it fits within the scroll bar range.

            Also, regarding your writing to the boot sector, remember that while reads from a physical device work in a buffered manner, usually you'll need to use FILE_FLAG_NO_BUFFERING in the call to CreateFile() in order to be able to properly write the sector data to disk. Also, when you are doing direct disk I/O, you have to seek, read, and write in multiples of the sector size of the device, and on sector boundaries. you'll need to be using DeviceIoControl() with IOCTL_DISK_GET_DRIVE_GEOMETRY to get the bytes per sector, sectors per track, number of sectors, etc. so you can compute the size of the  buffer you need to use.


            I was trying to dereference Null Pointers before it was cool.

            alexlauf

              Topic Starter


              Greenhorn

              • Experience: Beginner
              • OS: Unknown
              Re: will not boot - stumped
              « Reply #12 on: November 01, 2011, 05:14:08 AM »
              i thought it was clear from the various postings, but, here it is the full sequence.

              1. was working with my home brew program to edit hard disks. i used it on my boot sector. it seemed ok.
              2. later when i re-booted ( quite a while, this thing runs for days sometimes ), it would not come up.
              got to the verifying dmi pool message, and it stopped there. no extra beeps or messages.
              3. tried to figure out problem, including things like swapping disks, changing bios settings. one thing i tried
              was i modified the boot to display a message if it loaded, not realizing the disk editor was probably the
              cause of the problem ( i had forgotten using it before the crash ).
              4. no message resulted from above so i concluded it was not loading the boot sector. at this point i was
              stumped. did not see any point in trying to fix the boot sector, since the data itself was ok. i then tried
              this forum for help.
              5. was told to try recovery console fixmbr and fixboot.
              6. my initial thought was phooey! since the data was ok, what was the point of trying to fix it ? but i got
              desperate enough to try it.
              7. i ran fixboot. then i rebooted.
              8. that fixed the machine. it booted after that.
              9. my conclusion is i had done it to myself, and my program does something to the sector / disk that
              i have not currently figured out.


              about the program itself;
              1. "instead of setting the scrollbar min/max ... use a scaled value" - i thought of that, but i do want it to
              be 1-1, 1 byte to 1 click. otherwise, just mapping 1 scroll unit to 1 sector, @ 512 / sector, i could get to
              either 1 or 2 TB sizes ( i forget if scrollbars are signed or unsigned right now ). that would probably be
              enough, if that was what i wanted.
              2. as for seek, multiples of sector size, boundrys, , devicei/o, etc, i did all that, with the exception of the "FILE_FLAG_NO_BUFFERING" flag. i assumed it flushed everything on closing. other than the central
              mystery involving the boot sector, it seems to do ok. might not be a bad idea to put it in, if i keep using
              this method. but unless i figure out what is going on with writing the boot sector, i might have to find
              another way to do it.

              Geek-9pm


                Mastermind
              • Geek After Dark
              • Thanked: 1026
                • Gekk9pm bnlog
              • Certifications: List
              • Computer: Specs
              • Experience: Expert
              • OS: Windows 10
              Re: will not boot - stumped
              « Reply #13 on: November 01, 2011, 08:20:37 AM »
              WOW! You are a brave soul!  :o
              You have already verified and tested hour code on other drives? Specifically, have you tried much smaller, much oder drives with more 'conventional' drive geometry?
              Part of the problem is the definition of hard drive sector location is still haunted by the legacy definitions that go back to IBM's old ideas about how you find a lotion on the hard drive.  I think I used to know what that was, but strains my brain trying to remember how it goes.

              EDIT: The link below is just none of many, many references to the headache of sector translation. The problem never went away.
               Likely you are aware of it.
              http://www.dewassoc.com/kbase/hard_drives/resolving_drive_barriers.htm
              The 512 byte sector no longer exists. Not on large hard drives.
              http://en.wikipedia.org/wiki/Disk_sector
              « Last Edit: November 01, 2011, 08:32:21 AM by Geek-9pm »

              alexlauf

                Topic Starter


                Greenhorn

                • Experience: Beginner
                • OS: Unknown
                Re: will not boot - stumped
                « Reply #14 on: November 01, 2011, 10:05:12 AM »
                it has been tried on 3 drives so far, an 80 GB ( the one i crashed ), a 500 GB, and a 340 GB that i am trying
                to diagnose a file system problem with. i have no plans for anyone else to use it, so i don't need to be
                really rigorous with the testing. basically it works, until it fails, then i fix it.

                if i stay with sector boundrys and sector sizes ( the one reported to me by DeviceIoControl ) it seems to
                work ok, other than that #$#%@^ boot sector. i suspect that it would work on any drive the OS can handle.

                i just seek to ( sector size ) * ( assumed sector number ), and it finds it. none of that stuff with no sector 0,
                which track is it, or any of that. using createfile and treating it like just another file, a lot of that sector location junk gets handled by the OS. it really doesn't matter what real sector i am in, as long as the same call to seek can put it on the same spot consistantly. the drive might translate sectors around, but if it is transparent to
                the OS, i don't really care what it is doing either. after all, the whole point of an OS is to make it easier to
                work with the thing, not to send our money to microsoft. let windows do all the dirty work. i'll worry about
                cases where windows can't deal with it, when it happens.

                earlier on, i wanted absolute control over which sector, track, head i was at, but the point of this thing is
                drive exploration at the level the OS sees, so i went with the easiest course. later, if i get into any deep
                drive work, where it matters exactly what track, sector, head i am at, i might tackle that again.

                i have heard 512 no longer exists, but if the OS is happy thinking it is still 512, i can work with it. i
                go with whatever it thinks it is using.

                i'm not so much brave, as old. i used to write low level format assembly programs for my trash-80. and
                in those days low level was LOW LEVEL. if i could overcome my AADD long enough to learn write a kernal
                mode program, i'd be working with the drive controler for this stuff, instead of having windows do the work. .

                of course, if i could do that, i'd get myself up to date, and get a good computer job somewhere too.

                by the way, how does this forum assign levels ? i could have sworn i picked something higher than noobie ?
                my knowledge may be scattered and piecemeal, but i've been around the track a few times. or was that
                reflecting experience with this forum ?