Announcement

Collapse
No announcement yet.

A strange result from "gparted" ?

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

    A strange result from "gparted" ?

    ubuntu@ubuntu:~$ sudo fdisk -l

    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000158f1

    Device Boot Start End Blocks Id System
    /dev/sda1 1 4190 33656143+ 5 Extended
    /dev/sda5 * 1 13 104359+ 83 Linux
    /dev/sda6 14 274 2096451 82 Linux swap / Solaris
    /dev/sda7 275 1579 10482381 83 Linux
    /dev/sda8 1580 4190 20972826 83 Linux

    Disk /dev/sdb: 4043 MB, 4043309056 bytes
    125 heads, 62 sectors/track, 1018 cylinders
    Units = cylinders of 7750 * 512 = 3968000 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0001d34b

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 1018 3944719 83 Linux
    ubuntu@ubuntu:~$ sudo fdisk -lu

    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000158f1

    Device Boot Start End Blocks Id System
    /dev/sda1 63 67312349 33656143+ 5 Extended
    /dev/sda5 * 126 208844 104359+ 83 Linux
    /dev/sda6 208908 4401809 2096451 82 Linux swap / Solaris
    /dev/sda7 4401873 25366634 10482381 83 Linux
    /dev/sda8 25366698 67312349 20972826 83 Linux

    Disk /dev/sdb: 4043 MB, 4043309056 bytes
    125 heads, 62 sectors/track, 1018 cylinders, total 7897088 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0001d34b

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 62 7889499 3944719 83 Linux
    ubuntu@ubuntu:~$

    This is the outcome of partitioning with "gparted" . I understand sda1 taking its 63 sectors , but is it normal for sda5 to take any , let alone 126 sectors ? Needless to say I have refrained from installing on the hdd , in fact it's
    my only hdd and I'm still working from a live usb stick .

    I ran sudo dd if=/dev/sda of=whatsthis bs=512 skip=63 count=126 , looked at it in midnight commander - a lot of space with a backtick here and there . Any ideas ?



    #2
    Re: A strange result from "gparted" ?

    Look to me like /dev/sda is partitioned with 1 primary partition (sda1) and it's an Extended partition.
    Partitions 5-8 are Logical partitions within sda1. Numbers 1-4 are reserved for primary partitions.

    Looks normal to me unless you didn't intend to format this way. This isn't a problem for linux, but you can't install winblows to a Logical partition.

    Please Read Me

    Comment


      #3
      Re: A strange result from "gparted" ?

      Yeah, it'll probably work just fine. Couple comments:

      OK, I see you switched to
      ubuntu@ubuntu:~$ sudo fdisk -lu
      instead of
      ubuntu@ubuntu:~$ sudo fdisk -l
      and that's good (u = 512 is nice to see).

      sudo dd if=/dev/sda of=whatsthis bs=512 skip=63 count=126
      actually can just be
      sudo dd if=/dev/sda of=whatsthis bs=512 skip=63 count=63

      but that's not an issue here. Anyway, it looks like it's all zeros, from what you said.
      - - - - -

      It's OK to make the extended partition = the whole disk (a little unusual for some users, but OK).

      It looks like gparted "viewed" sda5 the way it views a disk--it allotted the standard LBA 63 sectors for the MBR. But note that it did the same thing to the other partitions, starting each one after a gap of (about) 63 sectors. Usually if a partition ends at sector N, the next one starts at sector N+1.
      - - - - -

      If it were me, since you have a clean slate, just for the heck of it, I'd burn a new GParted Live CD (latest good version of it), and run it against that hard drive, partitioning it again.


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

      Comment


        #4
        Re: A strange result from "gparted" ?

        Originally posted by Qqmike
        It looks like gparted "viewed" sda5 the way it views a disk--it allotted the standard LBA 63 sectors for the MBR. But note that it did the same thing to the other partitions, starting each one after a gap of (about) 63 sectors. Usually if a partition ends at sector N, the next one starts at sector N+1.
        The "gaps" are the EBRs of those logical partitions (primary partitions don't have them, as the info is stored in MBR)

        Comment


          #5
          Re: A strange result from "gparted" ?

          Oops...double post

          Comment


            #6
            Re: A strange result from "gparted" ?

            kubicle, Ah yes! Those EBRs! I'm a bit rusty, I'm afraid. Thanks.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: A strange result from "gparted" ?

              That's right. So (of course!) my N -> N + 1 rule does not apply to partitions embedded in an extended partition because of the succeeding EBR. In his case, ALL partitions are so embedded.
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Re: A strange result from "gparted" ?

                If you guys keep going, this might be considered a thread hijack... lol

                Please Read Me

                Comment


                  #9
                  Re: A strange result from "gparted" ?

                  Originally posted by oshunluvr
                  Look to me like /dev/sda is partitioned with 1 primary partition (sda1) and it's an Extended partition.
                  Partitions 5-8 are Logical partitions within sda1. Numbers 1-4 are reserved for primary partitions.
                  The MS-DOS partitioning scheme allows 4 main partitions:

                  4 primaries

                  or

                  3 primaries and 1 extended

                  There is no reservation of the first 4 as primaries, and an extended partition can be any of the first 4. In the past Windows only booted from the first partition, but not any longer. Windows can boot from any primary partition, and now that Windows 7 uses its own boot partition, possibly (I'm not an advanced Windows user so don't quote me) Windows 7 can even be booted from an extended partition as long as the Windows boot partition (with bootloader) remains on a primary partition.

                  The only time I've seen an extended partition on /dev/sda5 is when there were initially 4 primary partitions, one of them (either sda2 or sda3) was deleted and an extended partition created from the resulting free space (and therefore became denoted as sda5).

                  This isn't particularly problematic, and the observation that the size of the extended partition should be the same as the sum of the logical partitions within it is, of course, correct.

                  My 2010 (and older) versions of GParted LiveCD screwed up my superblock tags (or something like that) and made some of my partitions unreadable when moving/resizing them. It think there has been a change in the way ext4 filesystem handles superblocks and embedded blocks, and the older versions don't get it right, or something of that nature.

                  I now rely solely on the version of GParted that comes on the Ubuntu Natty LiveCD.



                  UbuntuGuide/KubuntuGuide

                  Right now the killer is being surrounded by a web of deduction, forensic science,
                  and the latest in technology such as two-way radios and e-mail.

                  Comment


                    #10
                    Re: A strange result from "gparted" ?

                    There is no reservation of the first 4 as primaries,
                    Sorry, but you're wrong - at least as far as any partitioning scheme I've ever heard of goes. Device numbers 1 through 4 are reserved, period. 1 of those may be an Extended partition as you said but that doesn't change the numbering scheme. Using the word "main" or I've even read "customary" (Microsoft uses the word "standard") to replace the word primary doesn't change this fact. regardless of which primary partition is designated as an Extended partition, the Logical partition numbering begins at 5 - you need look no further than the original post to see a clear example of this.

                    I would be very interested to see the partition table of a drive with an Extended partition as /dev/sda5 or a Logical partition as dev/sda1, 2, 3, or 4.

                    Please Read Me

                    Comment


                      #11
                      Re: A strange result from "gparted" ?

                      Nonsense.

                      UbuntuGuide/KubuntuGuide

                      Right now the killer is being surrounded by a web of deduction, forensic science,
                      and the latest in technology such as two-way radios and e-mail.

                      Comment


                        #12
                        Re: A strange result from "gparted" ?

                        Not nonsense.

                        Yes, you can create an extendend partition as the fist partition on a HDD. But, it will not be identified as sda1, it will be sda5. The first four partitions on any HDD are 'reserved' for use as primaries, of which you can only have four. If you create four primary partitions, you can not create any additional partitions.
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Re: A strange result from "gparted" ?

                          I suspect you're wasting your time Snowhog.

                          Please Read Me

                          Comment


                            #14
                            Re: A strange result from "gparted" ?

                            Difference Between Primary Partition and Logical Partition
                            What is Primary Partition?

                            A disk drive can contain a maximum of four primary partitions or three primary partitions and a single extended partition.
                            Windows no longer obstructs my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              Re: A strange result from "gparted" ?

                              Originally posted by Snowhog
                              Yes, you can create an extendend partition as the fist partition on a HDD. But, it will not be identified as sda1, it will be sda5. The first four partitions on any HDD are 'reserved' for use as primaries, of which you can only have four. If you create four primary partitions, you can not create any additional partitions.
                              The extended partition will always have a number between 1-4 (it takes the "place" of one primary partition), but the logical partitions created within the extended partition always start from 5. And the logical partitions are the ones that contain the file systems. In the first post on this thread you can see the extended partition is sda1, and the four logical partitions are sda5-8.

                              Comment

                              Working...
                              X