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

Thread: Resize Existing Partition with Unallocated Space

  1. #11
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,792

    Re: Resize Existing Partition with Unallocated Space

    A full backup of course requires a second disk drive as big as the first one. You can do that with the Ubuntu install CD/USBStick. You just copy the whole device to another device with cat, dd or several other utilities, for example:
    # cat /dev/sda > /dev/sdb

    A better way is to only save your data, which should need orders of magnitude less space.

  2. #12
    Join Date
    May 2010
    Beans
    104

    Re: Resize Existing Partition with Unallocated Space

    Quote Originally Posted by HermanAB View Post
    A full backup of course requires a second disk drive as big as the first one. You can do that with the Ubuntu install CD/USBStick. You just copy the whole device to another device with cat, dd or several other utilities, for example:
    # cat /dev/sda > /dev/sdb

    A better way is to only save your data, which should need orders of magnitude less space.
    Thanks once again for your reply. As original question was related to partition but now I am asking some questions for backup like :

    1.Is there any command to know how much space I need to copy on target drive?
    2.Estimated time.
    3.As I am using Gparted live USB, so # cat /dev/sda > /dev/sdb is need to issue in Gparted session or I can run in normal Ubuntu terminal?
    4.Can I say something link # cat /dev/sda > Google Drive location because I don't have seperate HDD or storage location.

  3. #13
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Resize Existing Partition with Unallocated Space

    Quote Originally Posted by GirishSharma View Post
    Thanks once again for your reply. As original question was related to partition but now I am asking some questions for backup like :

    1.Is there any command to know how much space I need to copy on target drive?
    2.Estimated time.
    3.As I am using Gparted live USB, so # cat /dev/sda > /dev/sdb is need to issue in Gparted session or I can run in normal Ubuntu terminal?
    4.Can I say something link # cat /dev/sda > Google Drive location because I don't have seperate HDD or storage location.
    1. fdisk. sdb must be at least as large as sda. The entire disk. This is a bit-for-bit clone of the entire disk. Whether the bits have critical data or random data or no data, doesn't matter. All of it is going to be cloned.
    2. Longer than you like.
    3. Any Unix that supports 'cat' will work. The command must be run as root or with sudo. I've never seen any Unix that doesn't have cat or dd. I would use dd or ddrescue to clone, but that's me. For backups, I use rdiff-backup with a 100 line script around it to get only the stuff, settings, data, and metadata needed. There isn't a 1 line command to use it for backups. Sorry.
    4. If it works, sure. If it doesn't. Nope. No way would I put an unencrypted, bit-for-bit clone of an entire OS on cloudy storage. NO FREAKIN' WAY! Just post your credentials on the internet for the entire world instead. That would be easier.

    You really need a backup solution that has a different disk. There are many more efficient backup methods. Lots of them are discussed in these forums.
    Last edited by TheFu; November 18th, 2019 at 06:18 AM.

  4. #14
    Join Date
    May 2010
    Beans
    104

    Re: Resize Existing Partition with Unallocated Space

    Quote Originally Posted by TheFu View Post
    1. fdisk. sdb must be at least as large as sda. The entire disk. This is a bit-for-bit clone of the entire disk. Whether the bits have critical data or random data or no data, doesn't matter. All of it is going to be cloned.
    2. Longer than you like.
    3. Any Unix that supports 'cat' will work. The command must be run as root or with sudo. I've never seen any Unix that doesn't have cat or dd. I would use dd or ddrescue to clone, but that's me. For backups, I use rdiff-backup with a 100 line script around it to get only the stuff, settings, data, and metadata needed. There isn't a 1 line command to use it for backups. Sorry.
    4. If it works, sure. If it doesn't. Nope. No way would I put an unencrypted, bit-for-bit clone of an entire OS on cloudy storage. NO FREAKIN' WAY! Just post your credentials on the internet for the entire world instead. That would be easier.

    You really need a backup solution that has a different disk. There are many more efficient backup methods. Lots of them are discussed in these forums.

    My current Gparted Screen is showing like this : (Currently running Ubuntu Session)

    Code:
    Partition    Name                            File System    Mount Point    Label        Size          Used       Unused       Flags    
    /dev/sda1    EFI System Partition            fat32          /boot/efi      ESP          650.00 MiB    50.07 MiB  599.93 MiB   boot,esp 
    /dev/sda2    Microsoft reserved partition    unknown                                    128.00 MiB    --         --           msftres    
    /dev/sda3    Basic Data partition            ntfs                          OS           899.77 GiB    24.37 GiB  875.40 GiB   msftdata
    unallocated                                  unallocated                                 20.00 GiB    --         --
    /dev/sda4                                    linux-swap                                   2.86 GiB     0.00 B      2.86 GiB
    /dev/sda5                                    ext4           /                             7.14 GiB     5.11 GiB    2.03 GiB
    /dev/sda6                                    ntfs                          WINRETOOLS   990.00 MiB   382.29 MiB  607.71 MiB   hidden,diags
    unallocated                                  unallocated                                 12.71 MiB    --
    
    I am trying to merge/resize /dev/sda5 with first unallocated entry of 20 GB which I made by Shrink C: in Windows 10.
    Will you please mention steps to achieve this as I am not able to take backup neither on our local intranet nor any storage location/device.
    Last edited by GirishSharma; November 18th, 2019 at 08:28 AM.

  5. #15
    Join Date
    May 2010
    Beans
    104

    Re: Resize Existing Partition with Unallocated Space

    Finally, I resized the partition by taking the risk of data loss because I was not having other options. So, I :

    1.Booted the system by Gparted Live USB (Made some changes in BIOS by Enabling Legacy Option)
    2.First dragged the SWAP to the left. This showed me unallocated entry after Swap entry.
    3.Dragged /dev/sda5 (My linux partition) to the left. This showed me unallocated entry after /dev/sda5
    4.Expanded /dev/sda5 as much as I could. Now it showed me unallocated 1 MiB and /dev/sda5 expanded.
    5.Clicked on Apply Button.
    6.Done.

    Code:
    girish@girish-OptiPlex-3050:~$ sudo fdisk -l
    [sudo] password for girish: 
    Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 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: gpt
    Disk identifier: E1D206C6-CD80-4796-8691-87310D959375
    
    Device          Start        End    Sectors   Size Type
    /dev/sda1        2048    1333247    1331200   650M EFI System
    /dev/sda2     1333248    1595391     262144   128M Microsoft reserved
    /dev/sda3     1595392 1888557055 1886961664 899.8G Microsoft basic data
    /dev/sda4  1888557056 1894557695    6000640   2.9G Linux swap
    /dev/sda5  1894557696 1951469567   56911872  27.1G Linux filesystem
    /dev/sda6  1951471616 1953499135    2027520   990M Windows recovery environment
    Thanks to all of you who participated in my problem and replied.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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