Announcement

Collapse
No announcement yet.

Help: Partitioner can't detect disk partitions

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

    Help: Partitioner can't detect disk partitions

    I was re-installing my Windows XP SP3 with the following disk layout:
    windows
    linux
    swap
    other os
    free
    shared1
    shared2
    shared3
    shared4

    the partition number isn't contiguous, because I often used to reformat the partitions.

    After installation had finished, I tried to boot to Kubuntu but all I got was grub prompt. So, I ran Kubuntu alternate cd because I thought my grub was broken and I chose to rescue a broken system. I chose to re-install grub but it always failed. Doing it manually from a shell gave error 12: invalid device requested.

    Because I didn't understand, I just rebooted. Things got worse, all I got then was just 'GRUB' and nothing happened. Frustrated, I chose to re-install the whole thing after backing up /etc and home. I was surprised, the partitioner shows that my whole disk was unformatted. My friend said that jaunty's partitioner has bug, but then I found out it wasn't the case because I'd tried using 3 versions of Kubuntu (feisty fawn, intrepid ibex, jaunty jackalope), and they all showed the same. But live cd could see and mount my partitions, and Windows could boot correctly.

    What am I supposed to do? I don't want to erase my whole disk (don't have enough backup disk). Especially importants files in shared partitions.

    #2
    Re: Help: Partitioner can't detect disk partitions

    Originally posted by leledumbo
    I was surprised, the partitioner shows that my whole disk was unformatted.
    This could be bad.

    From a CD, try "cat /proc/partitions" or "(sudo) fdisk -l"

    Are your partitions still there? Can you mount them and see your files?

    I'm wondering if your partitions really were killed. You could always even use a windows boot CD to see if the partitions are there (although their type wont be recognized).
    eMachines E520 notebook, 2ghz celeron, 3gb RAM, 160gb HDD, etc... woot.com special with no Microsoft tax running Kubuntu 9.04 beautifully

    Comment


      #3
      Re: Help: Partitioner can't detect disk partitions

      From a CD, try "cat /proc/partitions" or "(sudo) fdisk -l"

      Are your partitions still there? Can you mount them and see your files?
      Don't need to because Dolphin can show, mount, and access them. Oh, one more thing. GRUB device notation now doesn't match the system one. i.e:
      (hd0,0) should match /dev/sda1 (my drive is SATA), (hd0,1) matches /dev/sda2, and so on. Right? But in my case (hd0,5) matches /dev/sda9 which is really weird.

      Maybe Windows scrambles the MBR or what...?

      Comment


        #4
        Re: Help: Partitioner can't detect disk partitions

        A few thoughts.

        "But live cd could see and mount my partitions, and Windows could boot correctly."
        and
        "Don't need to because Dolphin can show, mount, and access them."

        => Then, no problem, right? If those statements are true, why not access your data partitions and copy the important data you are trying to save (to a flash drive, for example).


        See what GRUB sees:
        From a Live CD
        Open Konsole, type
        sudo grub
        get a GRUB prompt: grub>, and type
        grub>geometry (hd<Press the TAB key now>
        (don't type the symbols <,>, just "(hd" then hit the TAB key on your keyboard)
        That will return a list of the hard drives (hdx) that GRUB sees. You can explore each one:
        grub>geometry (hd0)
        grub>geometry (hd1)
        etc.


        See what GParted Live CD sees (it's the partition editor many of us use, never fails me):
        GParted (Live CD, USB, HD)
        http://gparted.sourceforge.net/livecd.php
        New Manual. New man page. See Documentation:
        http://gparted.sourceforge.net/documentation.php


        If you do/did lose partitions, that may mean only that the entry for the partitions in the Master Boot Record of the drive got damaged or deleted. Your partitions (and some/all data) MAY still be OK. See the references for TestDisk and PhotoRec here:
        -- RESCUE Partitions & Data (More on PhotoRec: Reply #5; sidux Live UFD: Reply #6)
        TestDisk--PhotoRec--Knoppix
        http://kubuntuforums.net/forums/inde...opic=3091847.0

        TestDisk can (usually) restore a MBR (and restore deleted partitions).
        PhotoRec can (usually) recover lost files (documents, data, text, photos, movies, etc.).
        See the examples.
        The TestDisk site has excellent how-to guidance on using the programs.
        I keep these programs on a Live Flash Drive (using the Linux OS "sidux"), but you can use them from other Linux-based programs and Windows. In fact, I believe GParted Live CD has them: When you are in Live GParted CD session, right-click and see if TestDisk is an option; and/or in GParted Live CD, open Terminal (double-click on the large Terminal icon at the top), and type sudo testdisk (or sudo photorec).



        The MBR, GRUB, etc.
        You say you have already tried to restore GRUB to the MBR? (Windows probably DID rewrite the MBR with its own bootloader, overwriting GRUB that was in the MBR.) Now, GRUB might be in the MBR, but it may not know what to do when you re-boot because maybe the partition table in the MBR is messed up (or deleted). So that might be why you see evidence of GRUB but it just stops and nothing happens. The MBR is 512 bytes, first part of your disk. GRUB is in the first 446 bytes, the partition table is in the next 64 bytes (4 partitions, each requiring 16 bytes), and then comes a 2-byte signature.

        Keep in mind also, that you may be able to restore a partition table (to the MBR), but the actual data in the partition(s) maybe destroyed if you deleted that data or if your overwrote that data by saving some other data to that disk.

        A note on re-installing GRUB manually (which it sounds like you know how to do):
        How To GRUB Methods - Toolkit
        http://kubuntuforums.net/forums/inde...opic=3081671.0
        See SECTION 3.


        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Re: Help: Partitioner can't detect disk partitions

          Thank you for those alternatives, Qqmike. I'll try one by one.

          Just an update:
          I managed to boot to my other OS, I see that the partition tables are wrong (see screenshot). The two last entries appear in incorrect order. Comparing with the result of fdisk (see below), I conclude that Windows has changed the mapping of my partitions. Any idea on how to fix it? I've checked RecoveringUbuntuAfterInstallingWindows in help.ubuntu.com but none of them (except super grub disk which I haven't tried) seemed to work.

          screenshot:

          result of fdisk -l /dev/sda:

          omitting empty partition (5)

          Disk /dev/sda: 120.0 GB, 120034123776 bytes
          255 heads, 63 sectors/track, 14593 cylinders
          Units = cylinders of 16065 * 512 = 8225280 bytes
          Disk identifier: 0x04e604e6

          Device Boot Start End Blocks Id System
          /dev/sda1 * 1 1305 10482381 7 HPFS/NTFS
          /dev/sda2 1306 14593 106735860 f W95 Ext'd (LBA)
          /dev/sda3 8067 10677 20972857+ b W95 FAT32
          /dev/sda5 1306 2425 8996337 83 Linux
          /dev/sda6 2426 2549 995998+ 82 Linux swap / Solaris
          /dev/sda7 2550 2574 200781 4c Unknown
          /dev/sda8 2845 5455 20972826 b W95 FAT32
          /dev/sda9 5456 8066 20972826 b W95 FAT32
          /dev/sda10 10678 14593 31455238+ b W95 FAT32

          Comment


            #6
            Re: Help: Partitioner can't detect disk partitions

            I'm only a noob, but recently I could not boot into either of my duel boot of Windows or Kubuntu.
            I searched the web for solutions and came across a program named "SUPERGRUB" I burnt it and then started the computer with the disc as 1st boot. I got a list of O/S to chose to boot from.
            I found I could either boot into Windows or Kubuntu.
            One I got it up I was able to collect all my folders and files I needed.
            Probably not the Kosher way of doing things but it worked for me.

            Comment


              #7
              Re: Help: Partitioner can't detect disk partitions

              Qqmike, I've tried all of your suggestions. The main problem persists, partitioners (including GParted) see my whole disk as unallocated. But fdisk, grub, and other disk utilities can see each partition very well (except grub can't re-install itself). I've changed fstab to match changes made by Windows installer, but re-installing grub still fail.

              I give results of some commands, so it can be analyzed (esp. the space conflict shown by testdisk, if that's important).

              grub's geometry:

              drive 0x80: C/H/S = 14593/255/63, The number of sectors = 234441648, /dev/sda

              Partition num: 0, Filesystem type unknown, partition type 0x7 // I bet Windows
              Partition num: 2, Filesystem type is fat, partition type 0xb // Shared1
              Partition num: 5, Filesystem type is ext2fs, partition type 0x83 // Linux
              Partition num: 6, Filesystem type unknown, partition type 0x82 // Swap
              Partition num: 7, Filesystem type unknown, partition type 0x4c // Other OS
              Partition num: 8, Filesystem type is fat, partition type 0xb // Shared2
              Partition num: 9, Filesystem type is fat, partition type 0xb // Shared3
              Partition num: 10, Filesystem type is fat, partition type 0xb // Shared4

              testdisk /list:

              Disk /dev/sda - 120 GB / 111 GiB - CHS 14593 255 63, sector size=512
              Disk /dev/sda - 120 GB / 111 GiB - CHS 14593 255 63
              Partition Start End Size in sectors
              1 * HPFS - NTFS 0 1 1 1304 254 63 20964762 [Windows]
              2 E extended LBA 1305 0 1 14592 254 63 213471720
              3 P FAT32 8066 0 1 10676 254 63 41945715 [SHARED]
              Space conflict between the following two partitions
              2 E extended LBA 1305 0 1 14592 254 63 213471720
              3 P FAT32 8066 0 1 10676 254 63 41945715 [SHARED]
              X extended 1305 0 2 2424 254 63 17992799
              5 L Linux 1305 2 1 2424 254 63 17992674
              X extended 2425 0 1 2548 254 63 1992060
              6 L Linux Swap 2425 1 1 2548 254 63 1991997
              X extended 2549 0 1 2573 254 63 401625
              7 L Sys=4C 2549 1 1 2573 254 63 401562
              X extended 2844 0 1 5454 254 63 41945715
              8 L FAT32 2844 1 1 5454 254 63 41945652 [GENERAL]
              X extended 5455 0 1 8065 254 63 41945715
              9 L FAT32 5455 1 1 8065 254 63 41945652 [ISO]
              X extended 10677 0 1 14592 254 63 62910540
              10 L FAT32 10677 1 1 14592 254 63 62910477 [MOVIES]

              Comment


                #8
                Need Another Opinion-- Re: Help: Partitioner can't detect disk partitions

                => We need someone else to take a look at this.

                My comments:

                Whew. I'm not sure what is going on. It does seem to me that you picked up some sort of contamination that affected how the partition table is read. Very troubling that GParted Live CD can't see these partitions! Even IF you can figure out what needs to be changed (with the partitions), you wouldn't dare try it until backing up all this data. For example, as you know, TestDisk can give you options for restoring the partitions table to a previous version, and I have trusted TestDisk to do so in the past, BUT, there is always some risk that data recovery may be challenging. Another way to look at it is that the disk will not last forever; someday you will have to replace it. At that point, you must get backups of your data.


                You indicated, "Dolphin can show, mount, and access them."

                If that's true, I'd find a way to back up all my data in a confirm-able manner (make sure your backup is good).

                I don't see why Windows would goof up your partition table, but something is amiss here, I do agree with you. Let's hope that the drive is ok, that it is not already starting to fail in some subtle way.

                I believe most people here, if they were in your shoes, would want to start over: get the data off the drive, wipe the drive clean (by doing a zero-fill), then re-partitions using GParted Live CD, then re-install Windows first and then Kubuntu. Short of doing that, personally, I would risk trying TestDisk to restore a previous version of the partition table, BUT as I said, I would make sure I had all my important data backed up to some separate media (disks (CD, DVD, internal/external HDD) or flash drives or both).

                Let's see if someone else will chime in with an opinion or a better insight to this.

                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  Re: Help: Partitioner can't detect disk partitions

                  Mike is right -- that's quite a mess. It sounds like the partition table is partially corrupt -- can't tell how it got that way. But I agree -- if you can either back up your data by burning it to CDs, or use Dolphin to copy it safely to another storage media, you need to do that, and then use "dd" on that hard drive.

                  Next time you partition it, there's no need for all the complexity with separate partitions for each kind of user data. You're losing efficiency doing that -- having the unused space available in a single data partition will be much more helpful than having it split and scattered among multiple partitions. If you need "private" versus "shared", make a separate directory with "user" permissions and share that one, and have the rest of your data in directories with "leledumbo" permissions.

                  Today's two cents' worth.

                  Comment


                    #10
                    Re: Help: Partitioner can't detect disk partitions

                    OK, my partition table is still broken. But I managed to boot to my Kubuntu from Super Grub Disk, and it reinstalled GRUB back! Now I can boot to all my OSes, but GParted still shows it as unallocated. Gotta look for further solution (problem identified as "partition in wrong order"). Thanks everyone!

                    Comment


                      #11
                      Re: Help: Partitioner can't detect disk partitions

                      Did you try TestDisk to see what it sees/says?
                      Note: If using TestDisk, you can run it, but you do not have to use it! That is, you do not have to let it "write" any new MBR/partition tables; you can Cancel/Exit.

                      If you see a message
                      "Partitions not in disk order:
                      That's not a problem; that's OK.

                      But "Unallocated" from GParted is a bit strange.
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment

                      Working...
                      X