VOGONS

Common searches


First post, by Gopher666

User metadata
Rank Newbie
Rank
Newbie

I though I will write down this story down as a lesson to NEVER use windoz xps disk manager with multi-boot systems ever!
Maybe it will be useful for someone one day.

First of all I have to say I love multiboot systems, just to have the ability to have tons of old systems on the same HDD and to be able to quickly test a game on Windows 98, ME, 2K, XP on the exact same hardware is just great.

In this setup I had the following partitions:

1, FAT16 MSDOS 6.22, Windows 1, Windows 3.1, Windows for Workgroups 311 all living in piece in 1 partition
2, FAT32 Windows ME (not say I like it but just to have it for completition)
3, FAT32 Windows 98 SE
4, 3 larger FAT32 partitions for game and program storage
5, NTFS Windows 2000
6, EXT4 Debian Wheezy (mostly used for ghosting other partitions with partimage)
7, EXT3 Kororaa Linux (for the love of XGL on old hardware)
8, NTFS Windows XP
8, NTFS Storage for XP only games and programs

So I was building this system over many years, couple of weeks ago I decided to add XP to it as well because the machine is more than capable to run it. What was unique in my setup is that I use System Commander 2000 (SC2K) to multiboot the OSes instead of Grub just for retro fun (it is no way better in anything than grub).

After I finished configuring my XP installing all the drivers, programs as a last "icing on the cake" I have decided let's hop into XPs disk manager to remove unnecessary drive letters (like I don't want XP to shit on my Windows 98 partition) then I decided to delete the last large unformatted partition on the end of the disk to make an XP games partition. This is where the HORROR begin.

fckxp.jpg

Without a single note or even applying anything as soon as I clicked delete the machine rebooted immediately, no BSOD or anything just rebooted. After restart it can't boot so I boot into Parted Magic.

I was more than MAD seeing that XP have deleted ALL extended partitions and created one huge partition inside the extended space.
Only the primary partitions left intact.

What to do? TESTDISK comes to the rescue:

            Device Boot      Start         End      Blocks   Id  System
/dev/sda1 * 63 1992059 995998+ 6 FAT16
/dev/sda2 1992060 3984119 996030 b W95 FAT32

/dev/sda3 74525598 133114589 29294496 c W95 FAT32 (LBA)

/dev/sda4 133114590 488392064 177638737+ f W95 Ext'd (LBA)
/dev/sda5 133114653 191703644 29294496 c W95 FAT32 (LBA)

9765554
9766578
9767602 +10002MB
10000050

/dev/sda6 191703708 211238684 9767488+ 7 HPFS/NTFS/exFAT

211238684
first by tardis 211240733

/dev/sda7 211238748 230773724 9767488+ 83 Linux
/dev/sda8 230773788 250308764 9767488+ 83 Linux
/dev/sda9 250308828 269843804 9767488+ 7 HPFS/NTFS/exFAT

Or NOT ... 😦 Although it did find and recover MOST of the partitions like the 2 linuxes, win2k xp fine it put the starting position of one of the FAT32 game storage partitions at the beginning of the extended into the 3RD win98SE partition which is just the system boot drive.

Well I can access like 5 other of my partitions at least, things looking good! So I have copied the data off from them to another drive just in case but since there was no FS creation done by anything ALL the data is sitting on the drive untouched the only thing which got screwed up is the partition table.

Now with this broken partition table the system of course not boot, system commander couldnt even fix its mbr because the most important win98 partition it was installed to was broken like hell, cfdisk cried like a little baby that the partition table corrupt and gparted shown weird things...

Falling back to plain old FDISK.

So I have decided screw all these knowitall knowitwrong tools I gonna redo the partition table manually by hand with the regular Linux fdisk on PartedMagic.

So I had 2 MBR dumps:
A, The one where XP screwed up the Extended partitions but the Primaries left intact
B, The one restored by testdisk but WRONG on 1 point

I had to work with these to recreate the partition table...

I decided that the original SDA5,6,7 which were the GAME storage partitions and I saved the data from them are not that important to restore I can just do another ones let's restore the XP, Win2K and the Linuxes as I have put fair amount of work into configuring those systems.

So I have started adding the partitions from the 2K by referring to their starting Sectors. One issue was that some of these tools work with blocks some with sectors like fdisk so how do I know the size in sectors when the blocks is given:

You take the END sectors and SUBSTRACT the START from it to get the size of the DISK. GG!
230773724-211238748= 19534976 SECTORS

Solution 2:
The number of overall sectors what you just got with the previous calculation is exactly the DOUBLE
of the blocks.
SECTORS/2=BLOCKS
19534976/2=9767488

So if you have the BLOCKS given you can calculate the SECTORS from it simply by *2.

I have started with the Win2K partition, nicely added changed the type to 7 I was happy however when trying to add the next partition after it I always got from fdisk that the Sector is already in use when specifying the start position.... started to get TILTED and realized that fdisk must be some old garbage which fails for some reason because the starting position was CLEARLY after the ending of the other.

I have jumped on another Linux distro which just accepted it fine, great!
I have recreated the partition table let's try to boot, Linuxes instantly did not work because by me leaving out that 3 FAT32 partitions even tho their partition start position and boot record remained the same the partition number shifted DAMN! I still need to put them back so I though let's just add them afterwards guess what:

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sda1 0,1,1 123,254,63 63 1992059 1991997 972M 6 FAT16
/dev/sda2 124,0,1 247,254,63 1992060 3984119 1992060 972M c Win95 FAT32 (LBA)
/dev/sda3 248,0,1 870,16,42 3984120 13977599 9993480 4879M c Win95 FAT32 (LBA)
/dev/sda4 * 870,49,10 1023,254,63 13979646 488397167 474417522 226G 5 Extended
/dev/sda5 870,49,12 1023,254,63 13979648 116703231 102723584 48.9G c Win95 FAT32 (LBA)

/dev/sda6 1023,254,63 1023,254,63 191703708 211238684 19534977 9538M 7 HPFS/NTFS
/dev/sda7 1023,254,63 1023,254,63 211238748 230773724 19534977 9538M 83 Linux
/dev/sda8 1023,254,63 1023,254,63 230773788 250308764 19534977 9538M 83 Linux
/dev/sda9 1023,254,63 1023,254,63 250308828 269843804 19534977 9538M 7 HPFS/NTFS
/dev/sda10 1023,254,63 1023,254,63 269843868 367502939 97659072 46.5G 7 HPFS/NTFS
/dev/sda11 1023,254,63 1023,254,63 367503003 488397167 120894165 57.6G 83 Linux

/dev/sda12 1023,254,63 1023,254,63 116705280 148355071 31649792 15.0G b Win95 FAT32
/dev/sda13 1023,254,63 1023,254,63 148357120 191703039 43345920 20.6G b Win95 FAT32

It did not work out, it put the god damn partitions regardless that they are at the beginning of the EXT to the last drive letters! Complete clusterfck!

Oke no problem now that I have all this figured out I have deleted all the ext partitions again and redid them starting from SDA5 the beginning, one by one and finally I got the right order:

Command (m for help): p
Disk /dev/sda: 233 GB, 250059350016 bytes, 488397168 sectors
30401 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sda1 0,1,1 123,254,63 63 1992059 1991997 972M 6 FAT16
/dev/sda2 124,0,1 247,254,63 1992060 3984119 1992060 972M 1c Hidden W95 FAT32 (LBA)
/dev/sda3 * 248,0,1 870,16,42 3984120 13977599 9993480 4879M c Win95 FAT32 (LBA)
/dev/sda4 870,49,10 1023,254,63 13979646 488397167 474417522 226G f Win95 Ext'd (LBA)
/dev/sda5 870,49,12 1023,254,63 13979648 74524671 60545024 28.8G c Win95 FAT32 (LBA)
/dev/sda6 669,1,1 860,254,63 191703708 211238684 19534977 9538M 7 HPFS/NTFS
/dev/sda7 1023,254,63 1023,254,63 211238748 230773724 19534977 9538M 83 Linux
/dev/sda8 1023,254,63 1023,254,63 230773788 250308764 19534977 9538M 83 Linux
/dev/sda9 1023,254,63 1023,254,63 250308828 269843804 19534977 9538M 7 HPFS/NTFS

Are we happy now? Well the Linuxes booting fine, my game storages back, Windows2000 however no longer liked this and just kept rebooting so as I thought it must be something related to the MBR/BR not data sitting on the partition I have quickly reinstalled it and then I got my backup and pushed it back with partimage voila Win2k is fixed.

This left us with XP, now XP not just that it caused all this trouble this system broke unfixably regardless that all the data was sitting on it's partition when it was booted up the LSASS and bunch of other exes were crashing so that made me do a clean XP install.

Moral of the story:

1, Always backup your MBR before OS installs dd if=/dev/sda of=sda.mbr bs=512 count=1 and store it on another disk
2, Never use XP disk manager for anything
3, Don't screw around with the booting of operating systems will just make you mad 😀