PDA

View Full Version : [ubuntu] [SOLVED] Help to regain use of Windows partition



pjnsmb
May 19th, 2008, 06:50 PM
Hallo helpers.............

With the old adage "a little bit of knowledge can be dangerous" I have been mucking about trying to alter my "swap " partition size and to get it actually working again.

Whilst doing this I have now caused a real problem in that I have somehow managed to mark my "sda1" partition as "swap" in error. This should be my Windows partition, and consequently I cannot now boot into Windows(not that I want to very often , but the better half insists on using it)



My "fdisk -l" shows sda1 correctly as NTFS :

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9dc96e9e

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/sda4 1913 5942 32370975 5 Extended
/dev/sda5 1913 3145 9904041 83 Linux
/dev/sda6 3146 5577 19535008+ 83 Linux
/dev/sda7 5578 5815 1911703+ 82 Linux swap / Solaris



My "fstab" file looks like this :

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=26a2c98d-dc83-4399-a7eb-ddc939b2fe5c / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/sda6 :
UUID=c1f16d2f-bfd2-42f0-ab36-1c7e631c97d2 /home ext3 relatime 0 2
# Entry for /dev/sda7 :
UUID=d0995580-f661-419f-8ee0-bee52ff0c0e7 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0



but when I look at Partition Editor GParted it shows "sda1" file system as Linux-swap. (as well as sda7 as swap which is correct)

Is there any way to retrieve the situation please ?

thanks

pjnsmb

logos34
May 19th, 2008, 07:26 PM
can you access your windows files from linux?

sudo mkdir /media/windows
sudo mount -t ntfs /dev/sda1 /media/windows

To get windows to boot you might have to fix the partition table with TestDisk.

pjnsmb
May 19th, 2008, 07:35 PM
Thanks for helping

I can see my windows files after using those two commands.........

I have installed Testdisk from Synaptic...........

can you explain Testdisk procedure please ..

pjnsmb

logos34
May 19th, 2008, 09:09 PM
read the documentation at the testdisk site

KenBW2
May 20th, 2008, 02:11 AM
You might want to look at your /boot/grub/menu.lst to see if your Windows partition is listed correctly

logos34
May 20th, 2008, 03:29 AM
oh, and there's this Testdisk guide (http://www.users.bigpond.net.au/hermanzone/p21.html)

pjnsmb
May 20th, 2008, 08:48 AM
thanks to you both for your help

I carried on pressing buttons without enough knowledge !

result =

could not access anything !

end result =

complete reformat....................

learnt a bit more though

regards

pjnsmb

Ryadt
May 20th, 2008, 09:00 AM
go thru this tutorial http://ubuntuforums.org/showthread.php?t=624943

KenBW2
May 20th, 2008, 10:05 AM
Yup, that's the thing with Linux. Absolute freedom to really screw up your computer :D Have to say I've done it myself a few times