Announcement

Collapse
No announcement yet.

Gutsy break my FAT32 partition during install

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Gutsy break my FAT32 partition during install

    Hello,

    i'm desesperatly looking for some help, yesterday i decided it was time for a fresh installation of a Gutsy. I had a Win XP multiboot with another old distro, partitions were already setted up, (you will see that on fdisk output).

    during installation, i choose a "manual" partitioning, everything looks fine except that Gutsy installer was not able to see my FAT32 partition, i think it was not a trouble and that i would have to had it manually in my fstab after installation.

    I deleted the partition that used to be my old / and swap, recreate them and set them as / and swap mounting points. Set my old home as /home mounted. And then install Gutsy.

    After installation my sda5 partition which was FAT32 was gone. Windows XP now see a drive E: which is not formatted, while it was and contain the kind of stuff that i should have backuped, and that i can not loose (just say my phd report... some kind of murphy's law...).

    Looks like Gutsy installer change my FAT32 partition to "unknown"...

    please help, i'm just only desesperate now... i know this kind of trouble must be handle the right way during the first time, or the risk is that i loose more and so i do not want to try approximate solutions

    i post below the kind of command output that may help :

    ubuntu@ubuntu:~$ sudo blkid
    /dev/sda1: UUID="48D88748D88732EC" TYPE="ntfs"
    /dev/sda6: UUID="B82877B8286CFA" TYPE="ntfs"
    /dev/sda7: UUID="f3a684b1-ec16-44d8-b1d0-2c847a42d013" SEC_TYPE="ext2" TYPE="ext3"
    /dev/sda8: UUID="67a5db28-ee6e-4f56-a5af-e7924689ee64" TYPE="ext2"
    /dev/sda9: UUID="ff87ba33-bf45-4282-3843-66b0ea2669f9" TYPE="swap"

    => no more sda5 here

    ubuntu@ubuntu:~$ sudo fdisk -l

    Disk /dev/sda: 100.0 GB, 100030242816 bytes
    255 heads, 63 sectors/track, 12161 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x71a271a2

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 1828 14681488+ 7 HPFS/NTFS
    /dev/sda2 1828 12161 82999823 f W95 Ext'd (LBA)
    /dev/sda5 1829 4438 20964825 b W95 FAT32
    /dev/sda6 4439 10705 50334448+ 7 HPFS/NTFS
    /dev/sda7 11227 12030 6450538+ 83 Linux
    /dev/sda8 10706 11226 4184901 83 Linux
    /dev/sda9 12031 12161 1052226 82 Linux swap / Solaris

    => it is here as a W95 FAT 32, that's fine but :

    ubuntu@ubuntu:~$ sudo mount -t vfat /dev/sda5 /media/sda5
    mount: wrong fs type, bad option, bad superblock on /dev/sda5,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so

    => looking for dmesg show this :

    [ 1675.292000] FAT: invalid media value (0x31)
    [ 1675.292000] VFS: Can't find a valid FAT filesystem on dev sda5.

    => from fdisk :

    Command (m for help): v
    34707 unallocated sectorsExpert command (m for help): e

    Disk /dev/sda: 255 heads, 63 sectors, 12161 cylinders

    Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
    2 00 254 63 1023 254 63 1023 29366819 165999646 0f
    5 00 254 63 1023 254 63 1023 41929651 100678410 05
    6 00 254 63 1023 254 63 1023 150978871 12916260 05
    7 00 254 63 1023 254 63 1023 142609006 8369865 05
    8 00 254 63 1023 254 63 1023 163895131 2104515 05
    9 00 0 0 0 0 0 0 0 0 00

    Expert command (m for help): p

    Disk /dev/sda: 255 heads, 63 sectors, 12161 cylinders

    Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
    1 80 1 1 0 254 63 1023 63 29362977 07
    2 00 254 63 1023 254 63 1023 29366819 165999646 0f
    3 00 0 0 0 0 0 0 0 0 00
    4 00 0 0 0 0 0 0 0 0 00
    5 00 254 63 1023 254 63 1023 1 41929650 0b
    6 00 254 63 1023 254 63 1023 9513 100668897 07
    7 00 254 63 1023 254 63 1023 15183 12901077 83
    8 00 254 63 1023 254 63 1023 63 8369802 83
    9 00 254 63 1023 254 63 1023 63 2104452 82

    => i did not know what to do with the two previous, but it may help one of you

    => i had try gparted live distro, it tell me "unknown" as filesystem type and show an exclamation mark. I do not know how to use gparted to have more infos or repairing, may be could you help ?

    => i had find a tools that is called testdisk and that looks like being able to do something but it is desesperatly complicated to use and i do not want to do THE wrong thing that will crash the whole disk
    - that is not backuped yet, for the other working partitions, i must go and buy a disk with enough space for that ... damned... -
    here are some outputs that may help :

    => Analyse :

    Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63
    Current partition structure:
    Partition Start End Size in sectors

    Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
    1 * HPFS - NTFS 0 1 1 1827 194 63 29362977
    2 E extended LBA 1827 254 63 12160 254 63 165999646
    test_FAT : Boot sector doesn't have the endmark 0xAA55
    5 L FAT32 1828 0 1 4437 254 63 41929650
    5 L FAT32 1828 0 1 4437 254 63 41929650
    X extended 4438 0 1 10704 239 63 100678410
    Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
    6 L HPFS - NTFS 4438 151 1 10704 239 63 100668897
    X extended 11226 0 1 12029 254 63 12916260
    7 L Linux 11226 241 1 12029 254 63 12901077
    X extended 10705 0 1 11225 254 63 8369865
    8 L Linux 10705 1 1 11225 254 63 8369802
    Next
    *=Primary bootable P=Primary L=Logical E=Extended D=Deleted

    => i do not undestand why there is two entry for 5 L FAT32, not the sense of the warnings i googled with that but was not able to get the point (my english is not enough ok to understand so well)

    => if i continue with proceed i have this output that i do not undestand at all :

    Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63
    Partition Start End Size in sectors
    D HPFS - NTFS 0 1 1 1827 254 63 29366757
    D FAT32 LBA 1827 196 1 4438 254 63 41949432 [FAT32]
    D HPFS - NTFS 4438 151 1 10704 254 63 100669842
    D Linux 10704 241 1 11226 254 63 8386812
    D Linux 11226 241 1 12029 254 63 12901077
    L Linux Swap 12030 1 1 12160 254 63 2104452

    => what are the D in first column i just do not know. Last line is showed in green.
    When using the P command to list files, looks like files are in the right places, but i can only see them, it do not propose a copy or something else.

    => continuing without doing something i had :

    Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63

    Partition Start End Size in sectors

    1 E extended LBA 12030 0 1 12160 254 63 2104515
    5 L Linux Swap 12030 1 1 12160 254 63 2104452

    => and then i am stuck here, i do not want to do any writing (there is a Write command and i do not want an hazardous modifications while not being sure that is the right one...

    => using advanced menu :

    Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63

    Partition Start End Size in sectors
    1 * HPFS - NTFS 0 1 1 1827 194 63 29362977
    2 E extended LBA 1827 254 63 12160 254 63 165999646
    5 L FAT32 1828 0 1 4437 254 63 41929650
    X extended 4438 0 1 10704 239 63 100678410
    6 L HPFS - NTFS 4438 151 1 10704 239 63 100668897
    X extended 10705 0 1 11225 254 63 8369865
    8 L Linux 10705 1 1 11225 254 63 8369802
    X extended 11226 0 1 12029 254 63 12916260
    7 L Linux 11226 241 1 12029 254 63 12901077
    X extended 12030 0 1 12160 254 63 2104515
    9 L Linux Swap 12030 1 1 12160 25Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63
    Partition Start End Size in sectors
    5 L FAT32 1828 0 1 4437 254 63 41929650

    => and going on FAT32

    Boot sector
    test_FAT : Boot sector doesn't have the endmark 0xAA55

    Backup boot sector
    test_FAT : Boot sector doesn't have the endmark 0xAA55

    First sectors (Boot code and partition information) are not identical.
    Second sectors (cluster information) are not identical.
    Third sectors (Second part of boot code) are not identical.

    A valid FAT Boot sector must be present in order to access
    any data; even if the partition is not bootable.

    [ Quit ] [Rebuild BS][ Dump ] [Repair FAT]

    => i do not know what to do with these commands [Rebuild BS], [Dump] and [Repair FAT]
    => i do not understand this "test_FAT : Boot sector doesn't have the endmark 0xAA55" and others output... Even after googl-ing them.

    that's all i can do for now

    hope that someone would be able to help...

    ps : on Windows, the drive is still here, but looks unformated, with no space/used space, clicking on it show me a command like 'do you want to format this drive now?". I can not do that !

    #2
    Re: Gutsy break my FAT32 partition during install

    Thank you for your comprehensive post - it indeed looks a mess! I take it booting from a live CD such as knoppix does not solve your problem either...

    While there are very competent people on this board I can say that I don't know how to fix it and therefore suggest to "double post", i.e. repeat this exact post in the Ubuntu forum. There you have a far greater number of people who may help.

    Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

    Comment


      #3
      Re: Gutsy break my FAT32 partition during install

      no booting from a livecd did not help, nor does GParted live, (as far i understand how to use it, but here, some gparted experts may help me. I just use it to try to understand something, but was not able to)

      it looks like while writing partition tables during installation for its / and swap partition, (that i had deleted and recreated) Gutsy had decided to rewrite the one that used to be FAT32 with some kind of "unknown"/"invalid" partition, file system or flag that i just do not know how to recover. I can not understand why it has chosen to do something in a place where it should'nt have do anything

      i will try to post it on ubuntu, thank you for the advice.

      i will not be able to post more for like the next 10 hours, from now. But i will be very glad if some of the expert guys from here can post suggestions or any helpful advices, that i could then try later.

      Comment


        #4
        Re: Gutsy break my FAT32 partition during install

        Boot from a live CD and use 'testdisk'. It appears something did happen to your file allocation table. I'll research testdisk a little more. Your data is safe on the drive, unless you light it on fire. Photorec (another program written by same person as testdisk) can recover all your files from the drive, as long as the blocks the data are on have not been overwritten.


        Mike
        http://monte48lowes.blogspot.com

        Comment


          #5
          Re: Gutsy break my FAT32 partition during install

          Here is an example from Christophe's website:

          http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

          I think it's rather easy to follow. If you have any questions, just ask.

          Mike
          http://monte48lowes.blogspot.com

          Comment


            #6
            Re: Gutsy break my FAT32 partition during install

            So, i have bought a new drive and backuped others partitions.

            i have tried photorec, clearly it is a no way, it found some files but too few, and many times the same, some of them also look truncated.

            I continue expecting to do something with testdisk.

            i've tried the advanced options because the analyse didn't manage to do the trick, but i explain just below this step that actually was after analysing...

            -----
            TestDisk 6.6, Data Recovery Utility, February 2007
            Christophe GRENIER <grenier@cgsecurity.org>
            http://www.cgsecurity.org

            Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63
            Partition Start End Size in sectors
            5 L FAT32 1828 0 1 4437 254 63 41929650

            Boot sector
            test_FAT : Boot sector doesn't have the endmark 0xAA55

            Backup boot sector
            test_FAT : Boot sector doesn't have the endmark 0xAA55

            First sectors (Boot code and partition information) are not identical.
            Second sectors (cluster information) are not identical.
            Third sectors (Second part of boot code) are not identical.

            A valid FAT Boot sector must be present in order to access
            any data; even if the partition is not bootable.



            [ Quit ] [Rebuild BS][ Dump ] [Repair FAT]
            Return to Advanced menu
            ----

            => here i have tried [Rebuild BS]
            (right now for me [Repair FAT] is too scary as it is written as "Dangerous for expert only"...)

            So Rebuild scan the disk, and then propose this :

            -----
            TestDisk 6.6, Data Recovery Utility, February 2007
            Christophe GRENIER <grenier@cgsecurity.org>
            http://www.cgsecurity.org

            5 L FAT32 1828 0 1 4437 254 63 41929650
            Cluster 104490, Directory / found ?
            Answer Y(es), N(o) or A(bort interactive mode). N or A if not sure.

            drwxr-xr-x 0 0 1263096404 13-Oct-2019 11:10 HORT-TWI.G-Y
            -r-xr-xr-x 0 0 1346454860 21-Oct-2022 13:12 ETHROUGH.~@TH
            drwxr-xr-x 0 0 1288000329 15-Oct-2013 11:34 INTU~@GRE.ATE
            -r-xr-xr-x 0 0 1230524242 30-Nov-2012 10:50 EFT-POIN.TIN
            drwxr-xr-x 0 0 3343796564 16-Oct-2019 07:42 MATEL�DI.FFE
            -r-xr-xr-x 0 0 1212631378 13-Jan-2022 11:34 -MINUS~@C.ONC
            dr-xr-xr-x 0 0 1414022985 15-Oct-2017 10:42 �NIEUN-T.IKE
            -r-xr-xr-x 0 0 1162432640 25-Oct-2014 11:10 OK~@INTER.POL
            -r-xr-xr-x 0 0 1128366149 20-Feb-2016 06:42 CON�TWEN.TY-
            -r-xr-xr-x 0 0 1146765645 1-Oct-2022 18:02 CUMULATI.ON~@
            -rwxr-xr-x 0 0 1447646025 31-Mar-2014 13:10 HITUEUMS.IOS
            drwxr-xr-x 0 0 2152940873 3-Oct-2022 11:10 ENESS~@DE.FEC
            drwxr-xr-x 0 0 1431193933 12-Dec-1907 23:23 DIMINISH.MEN
            drwxr-xr-x 0 0 760435791 23-Jan-2008 07:41 ~@DOTS-12.345
            dr-xr-xr-x 0 0 926299444 19-Oct-2002 12:34 1234678~@.DOT
            drwxr-xr-x 0 0 1330795845 22-Sep-2007 08:41 8~@DOTS-1.345
            -----

            => that i can not accept, this has nothing to do with my data. After this cluster, nothing more was found and i came back to :

            -----
            Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63
            Partition Start End Size in sectors
            5 L FAT32 1828 0 1 4437 254 63 41929650

            FAT : 32
            cluster_size 64 49
            reserved 33 7
            sectors 0 34304
            total_sect 41929650 471433
            fat32_length 8377 471434
            root_cluster 0 471436
            free_count uninitialised 471675
            next_free uninitialised 471676
            Extrapolated boot sector and current boot sector are different.
            Warning: Extrapolated boot sector have incorrect values.



            [ Dump ] [ List ] [ Write ] [ Quit ]

            List directories and files
            -----
            => where i did not know what to do. So waiting for any help at this step...

            => Ok, now let's go back to the first analysing step, following the guideline...

            => So : first, below, from beginning only last partition Linux Swap is in green, with a L flag in front of it. But if i had understood correctly what to do, it is my job to change flag in a way that everything looks ok. The best i can do is this one :

            1-----
            TestDisk 6.6, Data Recovery Utility, February 2007
            Christophe GRENIER <grenier@cgsecurity.org>
            http://www.cgsecurity.org

            Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63
            Partition Start End Size in sectors
            P HPFS - NTFS 0 1 1 1827 254 63 29366757
            D FAT32 LBA 1827 196 1 4438 254 63 41949432 [FAT32]
            L HPFS - NTFS 4438 151 1 10704 254 63 100669842
            D Linux 10704 241 1 11226 254 63 8386812
            L Linux 11226 241 1 12029 254 63 12901077
            L Linux Swap 12030 1 1 12160 254 63 2104452

            Structure: Ok. Use Up/Down Arrow keys to select partition.
            Use Left/Right Arrow keys to CHANGE partition characteristics:
            *=Primary bootable P=Primary L=Logical E=Extended D=Deleted
            Keys A: add partition, L: load backup, T: change type, P: list files,
            Enter: to continue
            NTFS, 15 GB / 14 GiB
            -----

            => in this case all partition labelled L or P are Structure Ok, and marked in green.

            Notice that if i go to line starting by "D FAT32 LBA" and use the P list files features, it is ok, i can see a directory structures with files that looks to be the one i have lost...

            But it did not repaired my Fat32 partition, and also break one of the Linux which contain / of Kubuntu...

            if i follow the guideline that may not be a trouble for now and i could continue...
            as long as i will be used a [Search!]

            -----

            TestDisk 6.6, Data Recovery Utility, February 2007
            Christophe GRENIER <grenier@cgsecurity.org>
            http://www.cgsecurity.org

            Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63

            Partition Start End Size in sectors

            1 P HPFS - NTFS 0 1 1 1827 254 63 29366757
            2 E extended LBA 4438 150 1 12160 254 63 124060545
            5 L HPFS - NTFS 4438 151 1 10704 254 63 100669842
            6 L Linux 11226 241 1 12029 254 63 12901077
            7 L Linux Swap 12030 1 1 12160 254 63 2104452

            [ Quit ] [Search! ] [ Write ] [Extd Part]
            Return to main menu

            -----

            => searching is long... many things are found step after step and finally i have :

            -----

            Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
            HPFS - NTFS 0 1 1 1827 194 63 29362977
            Warning: Incorrect number of heads/cylinder 240 (FAT) != 255 (HD)
            FAT32 LBA 1827 196 1 4438 149 63 41942817 [FAT32]
            Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
            HPFS - NTFS 4438 151 1 10704 239 63 100668897
            Linux 10704 241 1 11226 239 60 8385864
            Linux 10705 1 1 11225 254 61 8369800
            Linux 11226 241 1 12029 254 58 12901072

            Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63

            -----

            => which actually lead to nothing and did not help , to my mind it is better that was as it looks like heads and cylinder value changed too much from these "searched" options, and i think it should remain stable, don't you think so ?

            then i had :

            -----

            Warning: the current number of heads per cylinder is 255
            but the correct value may be 16.
            You can use the Geometry menu to change this value.
            It's something to try if

            -----

            => and i only can go back to analyse menu.

            => Looks like it was not able to recover

            ==============> So now, few suppositions :

            * is my real trouble not coming from the fact that here (already seen upper as 1-----) and where i had numbered lines for my suppositions...

            Disk /dev/sda - 100 GB / 93 GiB - CHS 12161 255 63
            Partition Start End Size in sectors
            1/ P HPFS - NTFS 0 1 1 1827 254 63 29366757
            2/ D FAT32 LBA 1827 196 1 4438 254 63 41949432 [FAT32]
            3/ L HPFS - NTFS 4438 151 1 10704 254 63 100669842
            4/ D Linux 10704 241 1 11226 254 63 8386812
            5/ L Linux 11226 241 1 12029 254 63 12901077
            6/ L Linux Swap 12030 1 1 12160 254 63 2104452

            1/ and 2/ are overlapping 1827 / 1827 while it should have been sometinh like 1827 / 1828
            3/ and 4/ or 4/ and 5/ are also overlapping at 4/ start and 4/ end, it should not.

            a correct looks like to be 5/ and 6/ 5/ finishing at 12029 and 6/ starting at 12030... Like it seems to be ok, with green color and structure ok

            ==> what do you think of that ?

            ==> do you think that i may :
            * validate 2/ as a Logical,
            * write partition to disk,
            * reboot using a live CD,
            * see if i can mount only this partition as others should be broken,
            * if ok, backup the whole stuff.
            * reboot again, go testdisk
            * change others flag so that others partitions are ok, and not /2 and /4
            * write these modifications to disk
            * reboot, delete that damned 2/ recreating it from somewhere and the copy back my files ?
            * try another install of kubuntu which should be recreate 4/ (and do not break again...)

            ==> can you think this can work ? does it make sense to you ?

            =====> and by the way, and hell, why do this F* Gutsy have changed these damned values ?
            i only wanted to install a Kubutu, not to stop sleeping...

            Comment

            Working...
            X