changing partition type to fix XP boot crisis

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.

Everything Linux 1798 This topic was started by ,


data/avatar/default/avatar12.webp

6 Posts
Location -
Joined 2006-08-11
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?
 

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
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.

data/avatar/default/avatar12.webp

6 Posts
Location -
Joined 2006-08-11
OP
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!!!
 

data/avatar/default/avatar34.webp

6 Posts
Location -
Joined 2006-08-16
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.