Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: deleting partitions on second disk ( the old boot disk)

  1. #11
    Join Date
    Feb 2010
    Location
    nh,usa
    Posts
    151

    Default Re: deleting partitions on second disk ( the old boot disk)

    Q1) Does the extended file system contain information about all the disk partitions or just partitions 5 and higher?

    Q2) If I delete the extended, I also delete the useful data partition, right?

    Q3) Why doesn't sudo gdisk -l /dev/sdc list the extended file system?

    Thank you.
    Regards,

    RIH5342

  2. #12
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,173

    Default Re: deleting partitions on second disk ( the old boot disk)

    Quote Originally Posted by rih5342 View Post
    Q1) Does the extended file system contain information about all the disk partitions or just partitions 5 and higher?
    "Extended File System" is what e.g. EXT2, EXT3 & EXT4 refer to, having nothing directly to do with partitioning.

    The extended partition, unlike the logicals and other primaries, is a label for a virtual object that can contain directly no files or filesystem. It's defined by the partitions it contains, or the partitions and freespace it contains, according to the way the particular partitioning tool presents it.

    The extended partition lists only #5 and above because each "partition" is defined by one 16 byte block in a partition "table". The MBR table contains 64 bytes, 4 entries entries maximum, so the next is logically the fifth, and named "logical".

    Q2) If I delete the extended, I also delete the useful data partition, right?
    Yes, if using a partition tool that lets you. Smarter tools present the extended only by virtue of the logical partitions it does let you create, delete, move or resize, not letting you alter the extended directly in any way.

    Q3) Why doesn't sudo gdisk -l /dev/sdc list the extended file system?
    It's a presentation. Listing a partition that cannot host a filesystem directly serves mainly to confuse someone trying to understand MBR partitioning, why 2 and/or 3 and/or 4 might be absent.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  3. #13
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,369

    Default Re: deleting partitions on second disk ( the old boot disk)

    Use
    Code:
    fdisk -l
    to see all the partitions (including extended ones on MBR partitioned disks.

    And when you are not interested anymore in any data one a disk, just createa n empty partitiontable on it:
    Code:
    fdisk /dev/sdc
    (take the correct one for sdc or you will destroy the wrong thing!!!)
    Then enter one after another the following commands
    Code:
    o
    w
    These stand for:
    o create a new empty DOS partition table
    w write table to disk and exit

    This will remove all your worrying.

    From there on you can go and use the device for what you want to use it for. E.g. starting to partition it with YaST > System > Partitioner.
    Henk van Velden

  4. #14
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    11,560
    Blog Entries
    3

    Default Re: deleting partitions on second disk ( the old boot disk)

    Quote Originally Posted by rih5342 View Post
    Q3) Why doesn't sudo gdisk -l /dev/sdc list the extended file system?
    Use "fdisk" for that.

    Use "gdisk" for disks with GPT partitioning (which is now becoming more common). Use "fdisk" for disks with legacy MBR/BIOS style partitioning.

    If there is a Extended Partition, then the disk us using legacy partitioning.
    openSUSE Leap 15.0; KDE Plasma 5;

  5. #15
    Join Date
    Feb 2010
    Location
    nh,usa
    Posts
    151

    Default Re: deleting partitions on second disk ( the old boot disk)

    I really appreciate your help.

    My goal is to create a 3 disk system, disk-one for the OS, disk-two for my-personal-data, and disk-three as a backup.

    I screwed up my 42.3 machine but still want to use that old disk as the disk-two, because it already has my-personal-data on it. I want to delete all the partitions on it except for my-personal-data, and then enlarge that partition to use the entire disk with a single partition.

    I'm thinking about copying (rsyncing) my-personal-data to a disk, then partitioning-formatting-copying (rsyncing) my-personal-data back to the original disk. The problem is that the copying (rsyncing) NEVER goes smoothly. There's always some issue, the system hangs or there's a permission issue. I'm talking about 1Tb of data and ~5hours.

    Doing a copy, followed by 1 or 2 rsyncs seems to be the best way. But I have no way to compare the disks so I don't have 100% confidence that the data is getting moved without errors.

    Anyway,...

    Q1) How can I be sure that my-personal-data won't become inaccessible if I delete the extended partition?

    Q2) Is there a directory to directory comparison tool with say an md5 checksum as the basis for comparison, not just dates and file sizes?
    Regards,

    RIH5342

  6. #16
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,416

    Default Re: deleting partitions on second disk ( the old boot disk)

    Type mount to see where all things ae mounted. Note the partition that hosts /home If it is a logical in the extended it is best not to delete the extended.. fdisk -l will show you what is where. Note the beginning and end block number of each partition any that fall between the begin end blocks of the extended are logical in that extended. Generally any partition number above 5 are logical but that may not be written in stone and depends on the history of the disk's partition creation so best to note start end block numbers.

  7. #17
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,369

    Default Re: deleting partitions on second disk ( the old boot disk)

    You have a long nice story, but nor much hard data. So best is to provide some we can discuss. Please show
    Code:
    fdisk -l
    and then add information about all the partitions there: what you think they are used for. And then explain what disks you want to use for in the future. Ther result will be that we can call names, like you can delet sdf7. or you can remove all from sde and then create sde1 with size .....

    Then I hope we all (inclusing you) will understand what we are talking about.
    Henk van Velden

  8. #18
    Join Date
    Feb 2010
    Location
    nh,usa
    Posts
    151

    Default Re: deleting partitions on second disk ( the old boot disk)

    Making progress, here's fdisk -l

    sda is my backup disk, with a new partition
    sdb is the new V15 boot disk, with a new partition
    sdc is the old 42.3 disk with my personal data, with the extended partition

    Code:
    Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: dos
    Disk identifier: 0x000ed722
    
    Device     Boot Start        End    Sectors  Size Id Type
    /dev/sda1        2048 3907029167 3907027120  1.8T 83 Linux
    
    Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: dos
    Disk identifier: 0x0000c861
    
    Device     Boot     Start        End    Sectors  Size Id Type
    /dev/sdc2         1026048 3907028991 3906002944  1.8T  f W95 Ext'd (LBA)
    /dev/sdc5       185616384 3907028991 3721412608  1.8T 83 Linux
    
    Disk /dev/sdb: 186.3 GiB, 200049647616 bytes, 390721968 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
    Disklabel type: gpt
    Disk identifier: 0215A769-485A-4130-A174-64D7C56EA4E5
    
    Device         Start       End   Sectors   Size Type
    /dev/sdb1       2048     18431     16384     8M BIOS boot
    /dev/sdb2      18432  83904511  83886080    40G Linux filesystem
    /dev/sdb3   83904512 374439935 290535424 138.6G Linux filesystem
    /dev/sdb4  374439936 390721934  16281999   7.8G Linux swap
    
    Disk /dev/mapper/cr_sda4: 7.8 GiB, 8334286336 bytes, 16277903 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 /dev/mapper/cr_sda2: 40 GiB, 42947575808 bytes, 83881984 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 /dev/mapper/cr_sda3: 138.5 GiB, 148752039936 bytes, 290531328 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 /dev/mapper/luks-e7f33a60-a536-41a3-8209-bd5319f0d272: 1.8 TiB, 1905361158144 bytes, 3721408512 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    Disk /dev/mapper/cr_ata-WDC_WD20EZRX-00D8PB0_WD-WCC4M8VDDEU2-part1: 1.8 TiB, 2000395788288 bytes, 3907023024 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Regards,

    RIH5342

  9. #19
    Join Date
    Feb 2010
    Location
    nh,usa
    Posts
    151

    Default Re: deleting partitions on second disk ( the old boot disk)

    And in conclusion,

    1) using yast/pertitioner, deleting the extended drive deletes my-data-partition, so I back track with abort-cancel.
    2) resizing my-data-partition is not possible because "combined limitations of partition and filesystem prevent resizing.
    Regards,

    RIH5342

  10. #20
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,369

    Default Re: deleting partitions on second disk ( the old boot disk)

    Quote Originally Posted by rih5342 View Post
    And in conclusion,

    1) using yast/pertitioner, deleting the extended drive deletes my-data-partition, so I back track with abort-cancel.
    2) resizing my-data-partition is not possible because "combined limitations of partition and filesystem prevent resizing.
    I was away and I am not sure if you are still wrestling with this simple case.

    First please always try to be very explicit in wording. You posted the fdisk -l listing, so now we all can see what is what. Then you should call the correct names. So not "the extended dtrive", but "sdc2". Then the can be no confusion about what you mean.

    I assume we are talking about sdc:
    Code:
    Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectorsUnits: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: dos
    Disk identifier: 0x0000c861
    
    
    Device     Boot     Start        End    Sectors  Size Id Type
    /dev/sdc2         1026048 3907028991 3906002944  1.8T  f W95 Ext'd (LBA)
    /dev/sdc5       185616384 3907028991 3721412608  1.8T 83 Linux
    As sdc5 is a logical partition and thus part of the extended partition, which is sda2, you have first to remove sdc5, after that you can remove the now empty sdc2.

    But you can do it all on one by using what I already told you 10 days ago in post #13 above.

    Still assuming that there is NOTHING important on sdc and you want to go for a fresh start using sdc fror something.
    Henk van Velden

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •