26

Re: Entire Drive is listed as "Unallocated"

cmdr wrote:

Hello anderci,
congratulations !!! smile The download shows exactly, what I need ! The analysis will last a bit more time, but at first glance, I saw, that there are three (!) Master Boot Records, which show the history of your harddisk (only the first is active). Hidden sector value is acceptable, although it includes the unvisible Dell partition. I was wrong with my first statement, that the end of the Dell partition seemed to be far away from the physical end sector, because I forgot that "block" in fdisk context means 1024 Bytes. Usually "block" is a synonym for "sector" ( = 512 Bytes). Maybe the big Hidden Sector value is a problem for "GParted", too, but the main issue is the logical end past the physical end of your disk, which I will correct of course. You certainly get one or at maximum two sectors back and I will give you the command lines to store them exactly, where they belong to. Since we have a "backup" of your present state at mediafire, we always have a second chance, if something doesn't work correctly.

So far for the moment !
Regards
cmdr

Thank you!  I will stay tuned.

27

Re: Entire Drive is listed as "Unallocated"

Hello anderci,

I just finished my work ... and here is the result :

http://www.mediafire.com/imgbnc.php/175e92a927fc3ee34b004ce07f9aad676g.jpg

My assumption is, that the sector values in the Volume/Partition Boot Records are true; anyway, they do NOT contradict to your drive's physical data. The hidden sector values are also accurate. I therefore only had to correct partition tables in MBR, see the red and green marks in the above image. -

To make it as easy for you as possible, I corrected the values and uploaded the new MBR, so that you can download it here.

I intentionally did not integrate an easy function within "MC_HxEd" to write a file to the harddisk, because this might be very critical, if someone doesn't know the risks (no faults, e.g typos,  permitted, there is no "undo" !). For Linux freaks, it's no problem: there is a mighty command, which we will use for that purpose, too.

How to
1. Download the "sda_new.MBR" to your USB-Stick (folder "BootRec" !)
2. Launch "GParted" (Stick attached)
3. Mount the stick with "MC_HxEd" (just make another copy of the corrupted MBR or any other Boot Record)
4. Open "Terminal" window, type at the prompt ( beware of typos !!!) and hit [ENTER]

dd  if=/mnt/usb/BootRec/sda_new.MBR  of=/dev/sda bs=512 count=1

5. Check new MBR with "MC_HxEd"

6. Shutdown "Gparted",  cross your fingers and boot the laptop !

Maybe an automatic "chkdsk" is started. DO NOT ABORT THIS ! If anything goes wrong, let "Gparted" have a "check" over the partitions and retry booting. Try Safe Mode [F8].
Write down STOP-fault messages and other "complaints" and present all stuff here.

If you get access to Windows, choose "chkdsk /f /r" and let it run twice, before you do ANY other things ! Should all work seamlessly, do not start repartitioning your drive without previously stating here, what you intend. You NEED some advice for this task !

Good luck
Regards
cmdr

28

Re: Entire Drive is listed as "Unallocated"

SUCCESS!

Here is the process I used:
    LOAD GPARTED LIVE:
   Using  GParted 0.4.3 BOOT-CD :
1. Insert boot CD
2. Let it boot GParted Live (default ...)
3. Don't touch keymap [Enter]
4. [33] English [Enter]
5. [0] continue to start X to use GParted automatically [Enter]

    MOUNT USB MEMORY STICK TO USE .BLK FILE:
1. Plug In USB 'Memory Stick'
2. If open, Close GParted window.
3. RightClick background field
4. In Fluxbox Menu Select File/System utils > MC_HxEd
5. Click [+] to expand > Removable_Disk_1 > sdb(___MB)
6. Doubleclick sdb(___MB)
7. Mounting Wizard, Do you want to mount an USB stick...
8. Click [Yes]
9. > Store Backup file Do you want to permanently store file sdb.MBR on /mnt/usb/BootRec? [No]
10. Notice in  blue MC_HxEd window: /mnt/usb/BootRec  *sda_new.mbr

    COPY DATA FROM USB STICK TO sda:
1. DoubleClick [Terminal]
2. type: dd  if=/mnt/usb/BootRec/sda_new.MBR  of=/dev/sda bs=512 count=1
   > dd: opening '/mnt/usb/BootRec/sda_new.MBR': No such file or directory
3. type: dd  if=/mnt/usb/BootRec/sda_new.mbr  of=/dev/sda bs=512 count=1
   > 1+0 records in
   > 1+0 records out
   > 512 bytes (512 B) copied, 0.00669373 s, 76.5 kB/s
4. Close mlterm

    CLOSE Midnight Commander:
1. With blue Midnight Commander window open, [F10]
2. > Do you really want to Quit ... ? [Yes] [y]
3. MC_HxEd form click [Cancel]

    SHUT DOWN GPARTED LIVE:
1. Remove USB 'Memory Stick'
2. DoubleClick [Exit] Button
3. Exit form: select Reboot:  Click [OK]
4. Remove CD when Drawer opens
5. Close Drawer
6. [Enter]


Windows restarted
> System Settings Change:
  Windows has finished installing new devices. the software that supports your device requires that you restart your computer.  You must restart your computer before the new settings will take effect.
  Do you want to restart your computer now? [Yes]

In DOS window: chkdsk /f /r
> schedule on next restart (Y/N) y
restart
CHKDSK Verifying: files, indexes, Security descriptors, Usn Journal, file data, Free Space

In DOS window: chkdsk /f /r
> schedule on next restart (Y/N) y
restart
CHKDSK Verifying: files, indexes, Security descriptors, Usn Journal, file data, Free Space


    LOAD GPARTED LIVE:
   Using  GParted 0.4.3 BOOT-CD :
1. Insert boot CD
2. Let it boot GParted Live (default ...)
3. Don't touch keymap [Enter]
4. [33] English [Enter]
5. [0] continue to start X to use GParted automatically [Enter]

    OPEN GParted:
1. If not open Doubleclick GParted
   > /dev/sda - GParted
   Shows /dev/sda2:  149.01 GB !

29 (edited by anderci 2009-04-17 16:48:57)

Re: Entire Drive is listed as "Unallocated"

Thank you very much!

My Repartitioning plan is:
30 GB 'OS'    NTFS  (the existing WinXP sp3)
111 GB 'WORK'  NTFS  (Most Programs and Data)  (shared with LAN)
  8 GB 'DUMP'  FAT32  (TEMP folders and other scratch)

30

Re: Entire Drive is listed as "Unallocated"

For what it is worth, this (to the best of my knowledge) is the process I used to capture the File Manager Block File data:

    LOAD GPARTED LIVE:
   Using  GParted 0.4.3 BOOT-CD :
1. Insert boot CD
2. Let it boot GParted Live (default ...)
3. Don't touch keymap [Enter]
4. [33] English [Enter]
5. [0] continue to start X to use GParted automatically [Enter]

    MOUNT USB MEMORY STICK TO SAVE .BLK FILE:
1. Plug In USB 'Memory Stick'
2. If open, Close GParted window.
3. RightClick background field
4. In Fluxbox Menu Select File/System utils > MC_HxEd
5. Click [+] to expand > Removable_Disk_1 > sdb(___MB)
6. Doubleclick sdb(___MB)
7. Mounting Wizard, Do you want to mount an USB stick...
8. Click [Yes]
9. > With blue MC_HxEd window open, [F3]
10. > Hint use built-in Mounting wizard[OK]
11. > With blue Midnight Commander window open, [F10]
12. > Do you really want to Quit ... ? [Yes] [y]

    COPY sda FILE MANAGER BLK FILES TO USB STICK:
1. > Boot record Editor
2. Click [+] to expand > Fixed_Disk_1 > sda(___MB) >Model:___ > Show_Block(s)
3. Doubleclick Show_Block(s)
4. > Block Viewer...
5. type in 0#82000
6. Click [OK]
7. With blue MC_HxEd window open, [F10(Quit)]
8. Hint Block files (.BLK) are not saved permanently But you can do it manually with Midnighr Commander. [OK]
9. With blue Midnight Commander window [Tab] to /home directory
10. [down arrow] to select sda_0_82000.BLK
11. [F5(Copy)]
12. On the Copy form, [Tab] to the   to:   field
13. type /mnt/usb/BootRec   (replacing   /root )
14. [Tab] to the [<OK>] button   [Enter]
15. With blue MC_HxEd window open, [F10(Quit)]
16. > Do you really want to Quit ... ? [Yes] [y]
17. With blue MC_HxEd window open, [F10(Quit)]
18. > Do you really want to Quit ... ? [Yes] [y]
19. MC_HxEd form click [Cancel]

    SHUT DOWN GPARTED LIVE:
1. Remove USB 'Memory Stick'
2. DoubleClick [Exit] Button
3. Exit form: select Shutdown:  Click [OK]
4. Remove CD when Drawer opens
5. Close Drawer
6. [Enter]


Again, Thank you.

31

Re: Entire Drive is listed as "Unallocated"

Hello anderci,

very, very well done ! I appreciate your accurate reports about your actions, which might encourage others to get out of trouble by their own.  And with your help, it's again proven, that my baby "MC_HxEd" does its job. I improved it meanwhile and want to present it occasionally to the GParted Team, so that they use this new version instead. I seized some suggestions, users made, e.g. a "one-button" storage of all Boot Records of one or all attached drives. As I already said, I do not intend to integrate an easy function to write Boot Records back to the drive(s). This could cause a desaster in the wrong hands. The particular case counts. And with "dd", it's easy enough, as you know.

My Repartitioning plan is:
30 GB 'OS'    NTFS  (the existing WinXP sp3)
111 GB 'WORK'  NTFS  (Most Programs and Data)  (shared with LAN)
  8 GB 'DUMP'  FAT32  (TEMP folders and other scratch)

1. As you might already know, a DOS/Windows partition table does only have four records for primary partitions. If you use Windows to partition a blank harddisk for installing itself, you always end up with a bootable primary partition and an extended partition with one or more logical volumes, to match your individual number of wanted drives. If you contemplate about a multi-boot system with a second Windows OS, you should have a second primary partition. Linux doesn't care about bootflag or partition type, but keep in mind, that logical volumes in extended partitions form a chain. If one chain link breaks, you probably loose all things behind. For very, very important data, use only the first volume record in extended partition, because it might easily be transformed to primary ( but all other lost) ! To have a maximum of flexibility in your case, I would suggest to have three primary partitions ... and -as hidden reserve- the possibility for an extended partition on unused forth. -

2. The "vaporation" of your first primary partition from 149 GB to 30 GB is a huge step ! You should do it in several small steps (e.g  20 GB each) with one single task. AND OF COURSE BACKUP, BACKUP, BACKUP BEFORE ! Remove all unnecessary or ultra-big stuff (temporary files, Media files near the 4 GB border, DVD images or so), defragment the drive ( which might accelerate "GParted" enormously), start Windows and let "chkdsk /f /r " run after each resizing step.

3. Note,  that your current first partition location is NOT aligned to a cylinder border. "GParted" will probably alter this (which makes sense), but you might run into the "Hidden Sector" problem, i.e. you have to use "MC_HxEd" to correct it to its true value.

4. Windows stores in its Registry the partitioning ( sectors ) and the mountpoints.  It notices every change and might react unexpectedly. It helps, if you delete Registry Key "HKLM\System\Mounted Devices" (wash its brain) before you use "GParted" for every following step. It gets recreated, if missing, at boot (" ... has finished installing new devices" cool).

5. The procedure is clear
- Shrink 1st primary partition 149 - 130 - 110 - 90 - 70 - 50 -> 30 GB
- Create new  2nd primary partition 111 GB
- Do NOT format it with "GParted", but with Windows !
- Create new 3rd primary partition 8 GB, format it with Windows ( it might be worth a consideration to swap partition 2 and 3 (by altering the procedure , NOT afterwards !), because if you plan to use an extended partition some day,  you have ample space at the right place. Volume letters are selectable by you, except for the boot drive. That's no counter-argument. )

Don't hesitate to post your questions, if something isn't clear !

Regards
cmdr

32

Re: Entire Drive is listed as "Unallocated"

Thank you.

From the user interface viewpoint: Some things were not clear:
1) The purpose toward what I was doing for the blue MC_HxEd window.
2) The simplest way to open the blue Midnight Commander window.
3) Is it appropriate to offer choices to open separately:
       a) the tree view window
       b) blue MC_HxEd window
       c) blue Midnight Commander window
4) I guess the white window is a 'help reference'.  It was a life saver when it provided the generic "/mnt/usb/BootRec" That I needed when responding to the 'Copy' Dialog form.

I guess I have been spoiled by my years of using Partition Magic on my earlier PCs.  I think this is the first one to have a SATA hard drive.  Maybe the newer hard drives are driven by 'software' instead of 'firmware'.  I think I heard they are more vulnerable to malware.

I have absolutely no plans to dual boot this laptop.  My desktop is setup with VMWare for that purpose.  I have been holding back on installing software until after repartition.

Are these new hard drives that different?  With the other hard drives, I only kept the one primary partition and made all of the others extended partitions.

I guess I will get started.

Again, thank you.

33

Re: Entire Drive is listed as "Unallocated"

Hello anderci,

1) The purpose toward what I was doing for the blue MC_HxEd window.

MC_HxEd uses "Midnight Commander" (MC), a file manager with built-in Text- and Hex-Viewer/Editor for files (!) only. You get NO direct access to raw drive data with it. There is no startup parameter or ini-file line, which opens MC in Hex-Viewer mode ! And if it would exist, you could not select Master Boot Record of your HDD directly. The trick is to store raw drive data first as a file with distinct extension (MBR,PBR,XBR,BLK), which are associated to actions within MC. You can program, what will happen, if you confirm a highlighted file or press the appropriate Function key to start the Viewer/Editor. Here it is possible to fix, whether hexadecimal or ASCII view gets used. The treeview gives the selection, what you want to inspect in MC's Hex-Viewer, because on starting a treeview item, all gets packed into a file in folder "/home" before. The first "blue" window shows the Boot Record, the second shows its present storage location(s) as a file. If you mounted a stick by the wizard, you see the permanently stored file at the left part of the split folder window (excepted BLK files).

2) The simplest way to open the blue Midnight Commander window.

Fluxbox -> File / System-Utils -> mc
or
Terminal icon -> console prompt # mc [ ENTER ]

3) Is it appropriate to offer choices to open separately:
       a) the tree view window
       b) blue MC_HxEd window
       c) blue Midnight Commander window

See 1. and 2.

4) I guess the white window is a 'help reference'.  It was a life saver when it provided the generic "/mnt/usb/BootRec" That I needed when responding to the 'Copy' Dialog form.

Therefore it's mentioned ! But if you have a split folder view with MC and both, the source "home" and the target "BootRec" are shown, you need not care about paths : you simply press [ F5 ] and [ ENTER ]

Are these new hard drives that different?  With the other hard drives, I only kept the one primary partition and made all of the others extended partitions.

No, the hardware technique doesn't matter.  The wishes of the user matter and the limitations, risks and does and don'ts of the various operation systems must - alas - be respected. Now you stated clear, what you intend. My reflections should prevent you from running against a wall, when you choose a wrong design now. Feel free to "live" with one primary and for the rest extended partitions. Except for the non-destructive shrinking of your drive, you can do all other jobs with drive manager within XP.

Regards
cmdr

34

Re: Entire Drive is listed as "Unallocated"

So much for the 'non-destructive shrinking' of my drive:

GParted shows:   Label         Size                Used          Unused       Flags
/dev/sda1  fat16  DellUtility       39.19 MiB     8.75 MiB    20.44 MiB
/dev/sda2  ntfs    OS             1269.96 GiB   10.94 GiB   116.01 GiB  Boot
unallocated                               22.05 GiB

The problem is that it will not boot (it just sits there).

Any suggestions will be appreciated.  I do have:
  1)  The WinXP reinstallation CD
  2)  Acronis Bootable Workstation (with back up image on my Link Station 'buffalo box')

35 (edited by cmdr 2009-04-21 21:56:29)

Re: Entire Drive is listed as "Unallocated"

Hello anderci,

... play it again, Sam ! We have to bring order to your harddisk once again !
The advantage is, you now know, what to do and how to do it.

I need :
1. New Master Boot Record ( sda )
2. Volume Boot Record (sda1) , just to be sure, that nothing got altered here!
3. New Volume Boot Record (sda 2)

I don't need  (for the moment) the whole 82,000 sectors again.

I assume, the main problem for "GParted" is, that it really doesn't like big "Hidden Sectors".

If we are able to "reanimate" your system again, I would suggest, that you do no more small steps, but dare the big jump to the wanted size, or I' m afraid, that this will be a never ending story.

2)  Acronis Bootable Workstation (with back up image on my Link Station 'buffalo box'

Is this a complete image of your 160 GB harddisk in a state just before the shrinking ?

Regards
cmdr

36

Re: Entire Drive is listed as "Unallocated"

cmdr wrote:

Hello anderci,


2)  Acronis Bootable Workstation (with back up image on my Link Station 'buffalo box'

Is this a complete image of your 160 GB harddisk in a state just before the shrinking ?

Regards
cmdr

Yes.  In theory it could be installed into VMWare.

37

Re: Entire Drive is listed as "Unallocated"

cmdr wrote:

Hello anderci,

... play it again, Sam ! We have to bring order to your harddisk once again !
The advantage is, you now know, what to do and how to do it.

I need :
1. New Master Boot Record ( sda )
2. Volume Boot Record (sda1) , just to be sure, that nothing got altered here!
3. New Volume Boot Record (sda 2)

I don't need  (for the moment) the whole 82,000 sectors again.


Regards
cmdr

I took a guess on how to create what you need:
    LOAD GPARTED LIVE:
   Using  GParted 0.4.3 BOOT-CD :
1. Insert boot CD
2. Let it boot GParted Live (default ...)
3. Don't touch keymap [Enter]
4. [33] English [Enter]
5. [0] continue to start X to use GParted automatically [Enter]

    MOUNT USB MEMORY STICK TO SAVE .BLK FILE:
1. Plug In USB 'Memory Stick'
2. If open, Close GParted window.
3. RightClick background field
4. In Fluxbox Menu Select File/System utils > MC_HxEd
5. Click [+] to expand > Removable_Disk_1 > sdb(___MB)
6. Doubleclick sdb(___MB)
7. Mounting Wizard, Do you want to mount an USB stick...
8. Click [Yes]
9. > With blue MC_HxEd window open, [F3]
10. > Hint use built-in Mounting wizard[OK]
11. > With blue Midnight Commander window open, [F10]
12. > Do you really want to Quit ... ? [Yes] [y]

    COPY sda FILE MANAGER BLK FILES TO USB STICK:
1. > Boot record Editor
2. Click [+] to expand > Fixed_Disk_1 > sda(___MB) >Model:___ > Show_Block(s)
3. Doubleclick Show_Block(s)
4. > Block Viewer...
5. type in sda
6. Click [OK]
7. With blue MC_HxEd window open, [F10(Quit)]
8. Hint Block files (.BLK) are not saved permanently But you can do it manually with Midnighr Commander. [OK]
9. With blue Midnight Commander window [Tab] to /home directory
10. [down arrow] to select sda_0_82000.BLK
11. [F5(Copy)]
12. On the Copy form, [Tab] to the   to:   field
13. type /mnt/usb/BootRec   (replacing   /root )
14. [Tab] to the [<OK>] button   [Enter]
15. With blue MC_HxEd window open, [F10(Quit)]
16. > Do you really want to Quit ... ? [Yes] [y]
17. With blue MC_HxEd window open, [F10(Quit)]
18. > Do you really want to Quit ... ? [Yes] [y]
19. MC_HxEd form click [Cancel]

    COPY sda FILE MANAGER BLK FILES TO USB STICK:
1. > Boot record Editor
2. Click [+] to expand > Fixed_Disk_1 > sda(___MB) >Model:___ > Show_Block(s)
3. Doubleclick Show_Block(s)
4. > Block Viewer...
5. type in sda1
6. Click [OK]
7. With blue MC_HxEd window open, [F10(Quit)]
8. Hint Block files (.BLK) are not saved permanently But you can do it manually with Midnighr Commander. [OK]
9. With blue Midnight Commander window [Tab] to /home directory
10. [down arrow] to select sda_0_82000.BLK
11. [F5(Copy)]
12. On the Copy form, [Tab] to the   to:   field
13. type /mnt/usb/BootRec1   (replacing   /root )
14. [Tab] to the [<OK>] button   [Enter]
15. With blue MC_HxEd window open, [F10(Quit)]
16. > Do you really want to Quit ... ? [Yes] [y]
17. With blue MC_HxEd window open, [F10(Quit)]
18. > Do you really want to Quit ... ? [Yes] [y]
19. MC_HxEd form click [Cancel]

    COPY sda FILE MANAGER BLK FILES TO USB STICK:
1. > Boot record Editor
2. Click [+] to expand > Fixed_Disk_1 > sda(___MB) >Model:___ > Show_Block(s)
3. Doubleclick Show_Block(s)
4. > Block Viewer...
5. type in sda2
6. Click [OK]
7. With blue MC_HxEd window open, [F10(Quit)]
8. Hint Block files (.BLK) are not saved permanently But you can do it manually with Midnighr Commander. [OK]
9. With blue Midnight Commander window [Tab] to /home directory
10. [down arrow] to select sda_0_82000.BLK
11. [F5(Copy)]
12. On the Copy form, [Tab] to the   to:   field
13. type /mnt/usb/BootRec2   (replacing   /root )
14. [Tab] to the [<OK>] button   [Enter]
15. With blue MC_HxEd window open, [F10(Quit)]
16. > Do you really want to Quit ... ? [Yes] [y]
17. With blue MC_HxEd window open, [F10(Quit)]
18. > Do you really want to Quit ... ? [Yes] [y]
19. MC_HxEd form click [Cancel]

    SHUT DOWN GPARTED LIVE:
1. Remove USB 'Memory Stick'
2. DoubleClick [Exit] Button
3. Exit form: select Shutdown:  Click [OK]
4. Remove CD when Drawer opens
5. Close Drawer
6. [Enter]


I will upload it on the web site and let you know when the 3 files are there.

38

Re: Entire Drive is listed as "Unallocated"

Only one of the three files would 'upload':
http://www.mediafire.com/?sharekey=e52c … 49b5870170

This probably further indicates my misunderstanding of what you need.

Thank you for your patience.

39

Re: Entire Drive is listed as "Unallocated"

Hello anderci,

you uploaded the MBR, which looks fine :
sda1 39,2 MiB, unchanged
sda2 126,96 GiB, shrinked
unallocated 22,1 GiB

I would bet, it's the "Hidden sector value", which caused the problem this time.

You use with "MC_HxEd" some steps, which are not necessary or even wrong.

1.  You can mount your USB-Stick  "en passant",  i.e. if you click on any device name for the first time, you are always asked, if you want to mount an USB-Stick. You need not do it in an extra step. The extra step is only necessary, if you want to import an external file with the help of your USB Stick, e.g. my corrected MBR file recently.

2. Since I wanted to get (logical) Boot Records and not a bunch of  (physical ) sectors this time,  you need NOT use "Show_Block(s)" (only numbers are allowed, "sda1" is definitly wrong here), but simply double-click in treeview on sda (MBR), sda1 (PBR of Dell partition) and sda2 (PBR of XP).

3. All steps before and after this action, especially file handling with "mc" are correct. The missing files are named  sda1.PBR and sda2.PBR  (sda.MBR yet arrived, NO .BLK-files this time).

Regards
cmdr

40

Re: Entire Drive is listed as "Unallocated"

I think I did it correctly , this time:

http://www.mediafire.com/?sharekey=6d71 … f6e8ebb871

~ Process:

    LOAD GPARTED LIVE:
   Using  GParted 0.4.3 BOOT-CD :
1. Insert boot CD
2. Let it boot GParted Live (default ...)
3. Don't touch keymap [Enter]
4. [33] English [Enter]
5. [0] continue to start X to use GParted automatically [Enter]

    MOUNT USB MEMORY STICK TO SAVE .BLK FILE:
1. Plug In USB 'Memory Stick'
2. If open, Close GParted window.
3. RightClick background field
4. In Fluxbox Menu Select File/System utils > MC_HxEd
5. Click [+] to expand > Removable_Disk_1 > sdb(___MB)
6. Doubleclick sdb(___MB)
7. Mounting Wizard, Do you want to mount an USB stick...
8. Click [Yes]
9. > With blue MC_HxEd window open, close by clicking [X] upper right corner

    COPY sda FILE MANAGER BLK FILES TO /home:
1. > Boot record Editor
2. Click [+] to expand > Fixed_Disk_1 > sda(___GB)
3. Doubleclick sda(___MB)
4. > Store Backup file... [Yes]
5. Click [OK]
6. With blue MC_HxEd window open, [X]
7. With blue Midnight Commander window [X]

    COPY sda1 FILE MANAGER BLK FILES TO /home:
1. > Boot record Editor
2. Click [+] to expand > Fixed_Disk_1 > sda(___GB) >sda1(...)
3. Doubleclick sda1(___MB)
4. > Block Viewer...
5. Click [OK]
6. With blue MC_HxEd window open, [X]
7. With blue Midnight Commander window [X]

    COPY sda2 FILE MANAGER BLK FILES TO /home:
1. > Boot record Editor
2. Click [+] to expand > Fixed_Disk_1 > sda(___GB) >sda2(...)
3. Doubleclick sda2(___GB)
4. > Block Viewer...
5. Click [OK]
6. With blue MC_HxEd window open, [X]


    COPY sda FILE from /home TO USB STICK:
9. With blue Midnight Commander window [Tab] to /home directory
10. [down arrow] to select sda.MBR
11. [F5(Copy)]
12. On the Copy form, [Tab] to the   to:   field
13. type /mnt/usb/sda_MBR   (replacing   /root )
14. [Tab] to the [<OK>] button   [Enter]
    COPY sda1 FILE from /home TO USB STICK:
9. With blue Midnight Commander window [Tab] to /home directory
10. [down arrow] to select sda1.PBR
11. [F5(Copy)]
12. On the Copy form, [Tab] to the   to:   field
13. type /mnt/usb/BootRec/sda1_PBR   (replacing   /root )
14. [Tab] to the [<OK>] button   [Enter]
    COPY sda2 FILE from /home TO USB STICK:
9. With blue Midnight Commander window [Tab] to /home directory
10. [down arrow] to select sda2.PBR
11. [F5(Copy)]
12. On the Copy form, [Tab] to the   to:   field
13. type /mnt/usb/sda2_PBR   (replacing   /root )
14. [Tab] to the [<OK>] button   [Enter]
15. With blue Midnight Commander window [X]
16. > Boot record Editor click [Cancel]

    SHUT DOWN GPARTED LIVE:
1. Remove USB 'Memory Stick'
2. DoubleClick [Exit] Button
3. Exit form: select Shutdown:  Click [OK]
4. Remove CD when Drawer opens
5. Close Drawer
6. [Enter]

41 (edited by cmdr 2009-04-22 15:20:24)

Re: Entire Drive is listed as "Unallocated"

Hello anderci,
ok. here we are ...

1. Download new PBR of sda2 : sda2_80325_1.BLK. It's a BLK-file, but this is only a naming convention to have the absolute sector value visible (80325), which you need for "dd". It's nothing else, but the corrected Volume Boot Record of your shrinked XP drive. I was totally right with my two assumptions, that the shrinked drive gets aligned to a cylinder border (No. 1; i.e. a small move to the left) and therefore got a slightly different "Hidden Sector" value (No. 2), which was NOT corrected in its Boot Record. I had to overwrite three Bytes only. This time, MBR was correct, no changes here.

2. Put the file to folder "Bootrec" on your USB stick.

3. Launch "Gparted" and  mount the stick with "MC_HxEd".

4. Open "Terminal" window and type at the prompt :

dd  if=/mnt/usb/BootRec/sda2_80325_1.blk of=/dev/sda  bs=512  skip=80325 count=1

(no line feed here ! It's a single line !)

5. Shutdown "Gparted" and try to boot XP; follow the same schedule as with the last successful procedure.

6. If all went well, do the next shrinking : one step to the wanted final size ... and give me the same three Boot Records again, if it doesn't boot (Hidden sector value is NOT altered anymore) !

Good luck
cmdr

42 (edited by anderci 2009-04-22 17:41:29)

Re: Entire Drive is listed as "Unallocated"

LOAD GPARTED LIVE:
   Using  GParted 0.4.3 BOOT-CD :
1. Insert boot CD
2. Let it boot GParted Live (default ...)
3. Don't touch keymap [Enter]
4. [33] English [Enter]
5. [0] continue to start X to use GParted automatically [Enter]

    MOUNT USB MEMORY STICK TO USE .BLK FILE:
1. Plug In USB 'Memory Stick'
2. If open, Close GParted window.
3. RightClick background field
4. In Fluxbox Menu Select File/System utils > MC_HxEd
5. Click [+] to expand > Removable_Disk_1 > sdb(___MB)
6. Doubleclick sdb(___MB)
7. Mounting Wizard, Do you want to mount an USB stick...
8. Click [Yes]
9. > Store Backup file Do you want to permanently store file
sdb.MBR on /mnt/usb/BootRec? [No]
10. > With blue MC_HxEd window open, [F3]
11. Notice in  blue Midnight Commander window:
/mnt/usb/BootRec  *sda2_80~5_1.BLK

    COPY DATA FROM USB STICK TO sda:
1. DoubleClick [Terminal]
2. type: dd  if=/mnt/usb/BootRec/sda2_80325_1.blk of=/dev/sda  bs=512  skip=80325 count=1
   > 0+0 records in
   > 0+0 records out
   > 0 bytes (0 B) copied, 3.6806e-05 s, 0.0 kB/s
3. Close mlterm

    CLOSE Midnight Commander:
1. With blue Midnight Commander window open, [X]
2. MC_HxEd form click [Cancel]

    SHUT DOWN GPARTED LIVE:
1. Remove USB 'Memory Stick'
2. DoubleClick [Exit] Button
3. Exit form: select Reboot:  Click [OK]
4. Remove CD when Drawer opens
5. Close Drawer
6. [Enter]

    REBOOT => nothing

43 (edited by cmdr 2009-04-22 17:59:17)

Re: Entire Drive is listed as "Unallocated"

Hello anderci,

2. type: dd  if=/mnt/usb/BootRec/sda2_80325_1.blk of=/dev/sda  bs=512  skip=80325 count=1
   > dd: opening '/mnt/usb/BootRec/sda_new.MBR': No such file or directory
   > 0+0 records in
   > 0+0 records out
   > 0 bytes (0 B) copied, 3.6806e-05 s, 0.0 kB/s

there must have been a typo or what is this file (sda_new.MBR) doing here ??? And actually nothing was copied ! It's not quite clear, whether my file had the above name. Expand "mc" to full screen to see "full" file names and use this name, if it differs from my commandline. Do under no circumstances use other files. Folder "BootRec" should be clean from other files !

Due to your "mc" print-out, BLK has to be upper case in my commandline.

Try it again
cmdr

44

Re: Entire Drive is listed as "Unallocated"

cmdr wrote:

Hello anderci,

2. type: dd  if=/mnt/usb/BootRec/sda2_80325_1.blk of=/dev/sda  bs=512  skip=80325 count=1
   > dd: opening '/mnt/usb/BootRec/sda_new.MBR': No such file or directory
   > 0+0 records in
   > 0+0 records out
   > 0 bytes (0 B) copied, 3.6806e-05 s, 0.0 kB/s

there must have been a typo or what is this file (sda_new.MBR) doing here ??? And actually nothing was copied ! It's not quite clear, whether my file had the above name. Expand "mc" to full screen to see "full" file names and use this name, if it differs from my commandline. Do under no circumstances use other files. Folder "BootRec" should be clean from other files !

Due to your "mc" print-out, BLK has to be upper case in my commandline.

Try it again
cmdr

That was a 'typo' that I edited out of my 'process reporting'.  It did not happen this 'session'.

The 0+0 records in and out response did happen. ???

I opened the downloaded file in NotePad:  Between the binary code at the front and a little more at the end, there was some text:
A disk read error occurred
NTLDR is missing
NTLDR is compressed
Press Ctrl+Alt+Del to restart

Is this expected?  I had deleted everything off of the USB 'stick' and created the \BootRec directory anew as I was downloading the file.

The downloading site does give me a hassle and complains that my browser is incompatible, but then it lets me download the file.  The first download, it complained about FireFox 3.05 and also IE 6, so this time I just stuck with FireFox.

45

Re: Entire Drive is listed as "Unallocated"

The same result.

I am pretty sure my 'process' is free of typos, this time:

    LOAD GPARTED LIVE:
   Using  GParted 0.4.3 BOOT-CD :
1. Insert boot CD
2. Let it boot GParted Live (default ...)
3. Don't touch keymap [Enter]
4. [33] English [Enter]
5. [0] continue to start X to use GParted automatically [Enter]

    MOUNT USB MEMORY STICK TO USE .BLK FILE:
1. Plug In USB 'Memory Stick'
2. If open, Close GParted window.
3. RightClick background field
4. In Fluxbox Menu Select File/System utils > MC_HxEd
5. Click [+] to expand > Removable_Disk_1 > sdb(___MB)
6. Doubleclick sdb(___MB)
7. Mounting Wizard, Do you want to mount an USB stick...
8. Click [Yes]
9. > Store Backup file Do you want to permanently store file
sdb.MBR on /mnt/usb/BootRec? [No]
10. > With blue MC_HxEd window open, [F3]
  > Overwrite MBR on sdb: Hint Boot record was not stored!  [OK]
11. Notice in  blue Midnight Commander window:
/mnt/usb/BootRec  *sda2_80325_1.BLK

    COPY DATA FROM USB STICK TO sda:
1. DoubleClick [Terminal]
2. type: dd  if=/mnt/usb/BootRec/sda2_80325_1.BLK of=/dev/sda  bs=512  skip=80325 count=1
   > 0+0 records in
   > 0+0 records out
   > 0 bytes (0 B) copied, 1.5016e-05 s, 0.0 kB/s
3. Close mlterm [X]

    CLOSE Midnight Commander:
1. With blue Midnight Commander window open, [X]
2. MC_HxEd form click [Cancel]

    SHUT DOWN GPARTED LIVE:
1. Remove USB 'Memory Stick'
2. DoubleClick [Exit] Button
3. Exit form: select Reboot:  Click [OK]
4. Remove CD when Drawer opens
5. Close Drawer
6. [Enter]

    REBOOT => nothing

46

Re: Entire Drive is listed as "Unallocated"

Hello anderci,

I opened the downloaded file in NotePad:  Between the binary code at the front and a little more at the end, there was some text:
A disk read error occurred
NTLDR is missing
NTLDR is compressed
Press Ctrl+Alt+Del to restart

Is this expected?

Yes, these are the few messages, the Volume Boot record is able to give, if something goes wrong.

I don't know, why the new Record was not written ! Everything was correct now.
Does "Gparted" show the shrinked partition and its size ? Since there are only three Bytes to alter, we will try it directly with "MC_HxEd" (but this uses "dd" to write to sda, too ; perhaps it's a user/owner right problem).

Start "GParted" with attached USB Stick as usual, open "MC_HxED", store the actual sda2.PBR again. This is important, because there is a comparison necessary to decide, whether something got altered. Proceed as if you wanted to store the actual sda2.PBR a second time, but don't leave the Hex-Editor, press F2 to open editor-mode, stay in the hexadecimal area and use arrow keys to go to Byte 0x1C = 28 (counting starts with 0, i.e. 29th), the wrong value there is "00 40 01 00" until the end of second line. Replace it with "C5 39 01 00". Go to Byte 0x28 = 40/41st , you see "70 94 DE 0F", correct one Byte, so that it looks like this :  7D 94 DE 0F". Use F6 to store it as file. Leave Hex-Editor; you are asked, if you want to overwrite the existing Record, say "yes". Open sda2 via treeview a third time and verify, that your changes are there.
If not, do NOT boot. It makes no sense.

Huston, we have a problem ...

Regards
cmdr

47

Re: Entire Drive is listed as "Unallocated"

I am in MC_HxEd  file: /home/sda2.PBR  offset 0x000001c0  512 bytes
The bottom row key values are:
1 Help  2 View  3 Quit  4 Ascii  5 Goto  6 Save  7 HxSrch  8 Raw  9 Unform  10 Quit

Eureka! the 'Offset' at the top indicates exactly which byte I am 'on'.

I made the changes and there were there after reopening.

It is REBOOTING!  Chkdsk is running  I shall report later.  Thank you!

48

Re: Entire Drive is listed as "Unallocated"

Success!
Windows restarted
> System Settings Change:
  Windows has finished installing new devices. the software that supports your device requires that you restart your computer.  You must restart your computer before the new settings will take effect.
  Do you want to restart your computer now? [Yes]

In DOS window: chkdsk /f /r
> schedule on next restart (Y/N) y
restart
CHKDSK Verifying: files, indexes, Security descriptors, Usn Journal, file data, Free Space

In DOS window: chkdsk /f /r
> schedule on next restart (Y/N) y
restart
CHKDSK Verifying: files, indexes, Security descriptors, Usn Journal, file data, Free Space


In WinXP RegEdit: delete Registry Key
"HKEY_LOCAL_MACHINE\System\Mounted Devices"

Use GPartEd to shrink primary partition to 30 GiB
unload GPartEd and reboot into WinXP

Windows restarted
> System Settings Change:
  Windows has finished installing new devices. the software that supports your device requires that you restart your computer.  You must restart your computer before the new settings will take effect.
  Do you want to restart your computer now? [Yes]

ReBoots OK!

49

Re: Entire Drive is listed as "Unallocated"

In GPartEd I have created the other two partitions 'WORK' and 'DUMP'

Now, it seems that everything is working smoothly.

In WinXP I am formatting and labeling the new partitions.

Thank you very much!

Was the root problem the 'funny' partition boundaries?

50

Re: Entire Drive is listed as "Unallocated"

wink SSSSSSSSSSSSSSSSSSUUUUUUUUUPPPPPPPPPPEEEEEEEEEEEERRRRRRRRRRRR !!! wink

We need a culprit for this circumstancial work, and I suggest DELL. With their Diagnostic stuff, they produce an unusual big "Hidden Sector" and don't respect cylinder borders. We have an accomplice with "GParted", which could  simply compare the value in MBR with the one in PBR to avoid discrepancy between them. And "MC_HxEd" proved its benefits once again.

Have fun with your new system !

cmdr