Jump to content


changing partition type to fix XP boot crisis

  • Please log in to reply
3 replies to this topic

#1 jeffspen



  • Members
  • 6 posts

Posted 26 August 2006 - 07:29 PM

I have a system with XP and linux (ubuntu) installed on the same drive. I installed XP first and left 40Gb for linux

On installing linux I must have changed the XP partition to a swap partition by mistake, although this wasn't used as I created a special swap partition in the linux space.

Now, when I boot XP from the GRUB menu, it starts to load and then says "autochck.exe not found" and restarts the computer.

This is my setup according to the command fdisk -l:

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 15298 122881153+ 82 Linux swap / Solaris
/dev/sda2 15300 19457 33399135 5 Extended
/dev/sda5 15301 19424 33126030 83 Linux
/dev/sda6 19425 19457 265041 82 Linux swap / Solaris

You can see the 256Mb swap partition as part of the extended linux partition.

All my files on the XP bit remain intact so a boot from there should work.

Will the fdisk command SETTYPE work and if so, how will I use it?

#2 danleff


    Carpal Tunnel

  • Moderators
  • 2903 posts

Posted 27 August 2006 - 12:47 AM

How do you know that the files on the partition are intact?

The reason that I ask, is if you changed the partition to swap, then the partition should have been written (formatted) over as a swap partition.

Also, which fdisk are you speaking of, the Linux fdisk, or DOS fdisk command?

If you really were able to see your partition files with some utility, I would be interested what utility you saw them with.
"I love it when a plan comes together." - Hannibal Smith

#3 jeffspen



  • Members
  • 6 posts

Posted 27 August 2006 - 04:14 PM

Well, as I'm using Ubuntu, the file explorer shows the icon for sda1 and in it is all my windows stuff just how I left it.

It hadn't formatted the space as I'd used another swap partition within the extended (ext3) linux one.

As you can see the /dev/sda1 is set to code 82 Linux swap/solaris
(as is /dev/sda6 the swap it actually used)

I fixed the problem today by using fdisk. I'd researched the commands a bit and got red herringed into the SETTYPE idea. Really it was easier

something like sudo fdisk /dev/sda
then it asked me which number... I said 1

Then I brought up a list of commands and a help menu (was it m?)

I found a command to change the id
and I changed 1 from id 82 (swap/solaris) to id 7 NTFS

I saved and exited. Restarted linux then rebooted to XP and it worked!!!

#4 atekigrl



  • Members
  • 6 posts

Posted 28 August 2006 - 12:34 AM

This is the reason why I decided to have a refurb pc to test FD5 instead of partition my hdd. This'd be the next step once I've master the new os.
live IT and learn IT

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

IPB Skin By Virteq