Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, I have the current setup for a storage hard drive. /dev/sda1 HPFS/NTFS - empty /dev/sda2 Linux - empty /dev/sda3 Linux - empty /dev/sda5 HPFS/NTFS - empty /dev/sda6 Linux - ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Mar 2004
    Posts
    185

    Question Partiton Resizing - sda3-6 => sda3 with data preservation


    Hello, I have the current setup for a storage hard drive.

    /dev/sda1 HPFS/NTFS - empty
    /dev/sda2 Linux - empty
    /dev/sda3 Linux - empty
    /dev/sda5 HPFS/NTFS - empty
    /dev/sda6 Linux
    - precious backups

    I would like to change the partition setup to:
    /dev/sda1 HPFS/NTFS - empty
    /dev/sda2 Linux - empty
    /dev/sda3 Linux - with precious backups, size=sda3+5+6


    How should I merge sda3, sda5, and sda6 without destroying the data on sda6? A command line solution is preferred. I'm sure I could do this in GParted, or at least Parted Magic's hacked version of GParted anyway. I'd prefer to "really" know how to do it.


    Thanks,
    DrCR

    __________________
    A5N8X, 3500+ single-core Manchester, 2x512MB Corsair XMS, MSI 7600GT
    S-12 430W, HR-05, Scythe Mime, VF900 modded with Scythe 80x25mm. Dual D12SL-12 Yate Loons
    WD1200JB, WD3200JB, HD501LJ
    Dual, independant WinXP installs via Grub hiding, VectorLinux 5.1.1SOHO, 5.8SOHO.
    - - - - -
    MacBook Pro Santa Rosa, 2.2GHz, 250GB Scorpio, Ceramique compound, Pending Appled-Tux Logo mod
    MBRed Hard Drive with: OSX, WinXP, Vista (MSDN, pending), Sidux 2007-03
    Pending Fusion "bootcamp" VMs pointing to native OS installs

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Just thinking out loud here, but it might be easiest to simply delete 3 and 5 rather than trying to merge them, then you can expand 6, and then relabel it sda3.

    Would that work?
    oz

  3. #3
    Linux Newbie
    Join Date
    Mar 2004
    Posts
    185
    That should work. I used merge in a nontechnical sense.

    Is it a problem sda6 is a logical, and sda3 a primary though? I'll make a backup of the partition table using dd and start tinkering.

    DrCR

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Something is wrong somewhere. Which one is your Extended Partition? sda2 or sda3?
    You can't save any data or mount an Extended Partition. Its just a pointer or Container that contains Logical Partitions.
    sda6 is Logical partition inside an Extended Partition.
    Post the exact output of fdisk -l command here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Linux Newbie
    Join Date
    Mar 2004
    Posts
    185
    I thought it would be apparent that anything >= sda5 would be logicals and anything else would be primaries. Sorry for any confusion.

    sda1-3 = Primaries, sda5-6 = Logicals

    Code:
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
     Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1        3824    30716248+   7  HPFS/NTFS
    /dev/sda2            3825        7648    30716280   83  Linux
    /dev/sda3            7649       20396   102398310   83  Linux
    /dev/sda4           20397       60801   324553162+   f  W95 Ext'd (LBA)
    /dev/sda5           20397       28045    61440561    7  HPFS/NTFS
    /dev/sda6           28046       60801   263112538+  83  Linux
    DrCR

    ___________________
    A5N8X, 3500+ single-core Manchester, 2x512MB Corsair XMS, MSI 7600GT
    S-12 430W, HR-05, Scythe Mime, VF900 modded with Scythe 80x25mm. Dual D12SL-12 Yate Loons
    WD1200JB, WD3200JB, HD501LJ
    Dual, independant WinXP installs via Grub hiding, VectorLinux 5.1.1SOHO, 5.8SOHO.
    - - - - -
    MacBook Pro Santa Rosa, 2.2GHz, 250GB Scorpio, Ceramique compound, Pending Appled-Tux Logo mod
    MBRed Hard Drive with: OSX, WinXP, Vista (MSDN, pending), Sidux 2007-03
    Pending Fusion "bootcamp" VMs pointing to native OS installs

  7. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Yes. /dev/sda3 is Primary and /dev/sda4 is an Extended Partition. You can merge Logical Partitions with Primary. You have to shrink/delete Extended first and that you can do after shrinking/deleting Logical partitions only.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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