Announcement

Collapse
No announcement yet.

Decreasing windows partition's size and increasing kubuntu partition's size

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

    Decreasing windows partition's size and increasing kubuntu partition's size

    Hello Everyone,

    I'm relatively new to linux but I enjoy it a lot. More than expected actually and I regret now that I didn't do a bigger partition for my kubuntu system. I have a dual boot system with Windows 10 on one partition and Kubuntu 16.04 on another. Yesterday I knew almost nothing about partitions but now I'm starting to have an idea. So here is what I understand:
    A nice and simple way to modify partitions is to use KDE partition manager. I can use it to decrease the size of my windows partition but unfortunately it cannot be used from my kubuntu session to increase the size of the kubuntu session since this one is active. So I need to plug a usb key which contains itself an operating system which can then be booted from the bios (or whatever the piece of software which allows me to choose between my linux session and my windows session when I turn on my computer, is called) and act as a kind of third partition which we can use to manipulate the two other (unactive) partitions. Thing is I don't have any "live key" so I need to build one.
    I found this page:
    https://www.kubuntuforums.net/showth...h-Drive-How-To
    but I have two questions concerning this link:
    1) Is it up to date? It mentions kubuntu 8.10, so it's not exactly recent.
    2) Is it the simplest way? Or could I use some other (lighter) version of linux like mint?

    Or a completely different way of solving this issue.

    My only concern is to do this change of partition size, and I would like to do it in the simplest possible way.

    Then assuming I'm able to create this usb live key, what next? Do I turn off my computer plug the key, turn it on and select a new option which would appear in the menu where usually windows and linux appear, at the beginning?
    What will happen? Will it be like a fresh installation of kubuntu and then I can directly go to KDE Partition manager and change these partition sizes (decrease the windows one and increase the linux one)?

    I also thought that maybe I can decrease the size of windows from linux and then increase the size of linux from windows. But as far as I know the linux partition is invisible to windows so I don't know how I would change it from windows. Any suggestions for this approach?

    One last thing, I found this thread on the forum:
    https://www.kubuntuforums.net/showth...size+partition
    but Oldgeek seemed to know how to use these CD live unlike me, so this part is not treated in his post.

    Thanks in advance
    Last edited by Robert24; Jan 30, 2018, 02:39 PM.

    #2
    How did you install Kubuntu? You must have created a DVD or USB initially from Windows I guess. Booting the installation DVD/USB would give you a live session needed for partition manipulation.

    If you haven't already done so, try shrinking the Windows partition from inside Windows first. It's usually possible to shrink the partition significantly and is safer than shrinking it with Linux tools (e.g. Gparted or KDE Partition Manager). You won't be able to increase the size of the Kubuntu partition from inside Windows though. You will then have to boot a live Linux session to expand the Kubuntu partition after this.

    Booting the live Kubuntu session from a DVD/USB drive doesn't install a new copy of Kubuntu (no need to do that) ... it's just a "live" system running entirely in memory or off the DVD/USB that allows you to try Kubuntu or do partition management, etc. The live system 'disappears' when you reboot.
    Last edited by Rod J; Jan 30, 2018, 03:43 PM.
    Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
    Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

    Comment


      #3
      BTW, make sure to back up any data that is important to you prior to adjusting the partitions, because things can go wrong. Murphy's law!
      Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
      Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

      Comment


        #4
        Originally posted by Rod J View Post
        If you haven't already done so, try shrinking the Windows partition from inside Windows first. It's usually possible to shrink the partition significantly and is safer than shrinking it with Linux tools.
        This is the standard advice, especially with Windows 10 which comes with this ability easily found.

        I haven't tried to do this recently, but there used to be a limit below which windows would not resize, about 50% of the original size; gparted can ignore this limit and I have successfully used it to do the resize. Windows didn't like it but after a chkdsk run was ok.

        Rod J has mentioned that backups are imperative, but I'd like to emphasize this. Not just the data; you should be able to restore your windows to a new drive if necessary, maybe with image backups of all the partitions windows uses. (IIUC the windows image restore won't restore to a smaller drive, but third party tools can do so; I used "EaseUS Todo Backup Free" recently and successfully to migrate a laptop to SSD, despite being very awkward in Windows.) Of course, drives can fail, so you, and everyone, should have this kind of backup anyway.
        Regards, John Little

        Comment


          #5
          Thank you to both of you Rod J and jlittle for your help. I really appreciate it. There are still several points I feel unsure about. I will put numbers to my questions to make them easier to spot and (hopefully) answer

          How did you install Kubuntu? You must have created a DVD or USB initially from Windows I guess. Booting the installation DVD/USB would give you a live session needed for partition manipulation.
          Someone did the installation for me at the time with a USB stick (I don't have it). This is why I thought I should create one. But I don't know how to do it yet, so I looked online and on this forum.

          Booting the live Kubuntu session from a DVD/USB drive doesn't install a new copy of Kubuntu (no need to do that) ... it's just a "live" system running entirely in memory or off the DVD/USB that allows you to try Kubuntu or do partition management, etc. The live system 'disappears' when you reboot.
          This how I was picturing the thing sorry if I was unclear. When I wrote

          What will happen? Will it be like a fresh installation of kubuntu and then I can directly go to KDE Partition manager and change these partition sizes (decrease the windows one and increase the linux one)?
          I guess I was wrong to use the term ``fresh installation". What I meant was that my computer will treat my usb key as a second disc, and hence an ``additional partition" with its own operating system. But I don't know how this is going to look like. For now when I start my computer, I have to choose between several possibilities (windows, linux, and some other things that I don't understand and never use).
          1) Will there be a new entry in this menu?

          I'm sorry if all these questions seem naive and basic. I spent already several hours googling and trying to figure out how this all works but I'm a bit overwhelmed since I'm not familiar with computer science in general and new to linux.

          2) I also would like to know if it is not easier to make a live usb key with ubuntu rather than kubuntu. If all I want is to change the partition size, then I could do it with gparted instead of KDE partition manager. I have the impression that they are very similar.

          Concerning the backups, I saved both Kubuntu home folder and Windows data (my documents, pictures, etc...) on an external disc, but I didn't do more. I found the ``EaseUs Todo Backup Free" mentioned by jlittle here:

          https://www.easeus.com/backup-software/tb-free.html

          There seem to be plenty of different type of backups : ``Disk imaging", ``Disk Clone", ``System Clone", ``Partition Clone"...
          3) From what jlittle said I would need to use ``Partition Clone" I guess, right?

          Here is a print screen of my KDE partition manager:

          Click image for larger version

Name:	KDE_partition_manager.jpg
Views:	1
Size:	28.4 KB
ID:	643742

          4) And if I got it right, I would need to apply this ``Partition Clone" to sda3 and sda4. Right?

          5) Finally does anyone know if the instructions given in the following tread of this forum:

          https://www.kubuntuforums.net/showth...h-Drive-How-To

          or maybe this one:

          https://www.kubuntuforums.net/showth...l=1#post379352

          is still up-to-date?

          Thanks in advance and have a nice day!

          Comment


            #6
            I need to get a better idea of the layout of your disk. Please open a terminal window (konsole) and type:

            Code:
            sudo parted -l
            COpy and paste the output.

            Comment


              #7
              Thank you for your answer mr_raider!

              Here is the output:

              Code:
              Model: ATA SAMSUNG MZ7LN512 (scsi)
              Disk /dev/sda: 512GB
              Sector size (logical/physical): 512B/512B
              Partition Table: gpt
              Disk Flags: 
              
              Number  Start   End    Size    File system     Name                          Flags
              1      1049kB  274MB  273MB   fat32           EFI system partition          boot, hidden, esp
              2      274MB   290MB  16.8MB                  Microsoft reserved partition  msftres
              3      290MB   427GB  427GB   ntfs            Basic data partition          msftdata
              5      427GB   443GB  16.0GB  linux-swap(v1)
              6      443GB   511GB  67.9GB  ext4
              4      511GB   512GB  1049MB  ntfs            Basic data partition          hidden, diag
              
              Model: SanDisk Cruzer Orbit (scsi)
              Disk /dev/sdb: 8004MB
              Sector size (logical/physical): 512B/512B
              Partition Table: msdos
              Disk Flags: 
              
              Number  Start   End     Size    Type     File system  Flags
              1      16.4kB  8004MB  8004MB  primary  fat32

              Comment


                #8
                Ok. The procedure is a bit complex because of the way your swap partition is placed. In order

                1. Boot windows and use disk management to shrink the big 427gb partition down to what you want.

                2. Boot a Linux live usb, such as kubuntu.you can create it from Linux or Windows using a downloaded iso.

                3. Open gparted or KDE partition manager.

                4. Turn the swap off by right clicking swap.

                5. Delete the swap partition.

                6. Extend your main Linux partition, the 46 gig one, to the left to reclaim some of the space you freed. Leave enough space for your swap partition.

                7. Re create the swap partition

                8. Obtain the swap partitions new UUID with

                sudo blkid

                9. Edit the file /etc/fstab and change the swap file UUID.

                Sent from my ONEPLUS A5010 using Tapatalk

                Comment


                  #9
                  Originally posted by mr_raider View Post
                  Ok. The procedure is a bit complex because of the way your swap partition is placed. In order

                  6. Extend your main Linux partition, the 46 gig one, to the left to reclaim some of the space you freed. Leave enough space for your swap partition.
                  I would not recommend this. Extending an existing partition to the right is never a problem -- you are creating usable 'empty space' at the end -- but extending to the left is creating empty usable space ahead of the partition, and that can create booting problems. It is better -- once you have created free space from the Windows partion -- to move the Linux partition in question to the left and then extend the Linux partition to the right.
                  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


                    #10
                    @mr_raider Thanks a lot for this wonderful answer mr_raider.

                    For now I'm trying to create the linux live usb following this guide:

                    https://www.kubuntuforums.net/showth...712#post378712

                    But anticipating what comes next I have the following question:

                    I'm just a bit confused with the 3 last points:

                    For 7), when I will recreate this swap partition, will there be a way to choose the type to be ``linuxswap"?
                    For 8), in which directory should I enter this command? And what does it do? What does ``Obtain the swap partitions new UUID" mean? From what I read on wikipedia, the UUID seems to be a kind of identifier generated automatically for each partition. But I don't really understand what is mean by obtaining a UUID. Is it creating one? Is it finding out which one is associated to the partition.
                    For 9), I'm a bit confused about what we are trying to do.

                    If you know some reference on this topic, I would be glad to go through the documentation.

                    Thanks again

                    @Snowhog Ok I will try to do as you say.

                    Comment


                      #11
                      Hello again,

                      I tried to follow the procedure explained here:

                      https://www.kubuntuforums.net/showth...712#post378712

                      and I after having checked the sha256sum of my ISO file I did this (being careful to choose the right sdX):

                      Code:
                      sudo dd if=/home/aritz/Downloads/kubuntu-16.04.3-desktop-amd64.iso of=/dev/sdb bs=16M
                      and got the following output:

                      Code:
                      95+1 records in
                      95+1 records out
                      1599602688 bytes (1.6 GB, 1.5 GiB) copied, 0.804337 s, 2.0 GB/s
                      Is there all there is to do in order to build a live usb key? I checked the content of the USB key and it doesn't seem to contain anything additional which I find very strange. Moreover KDE partition manager doesn't display the same thing as before. Now there is a message ``No valid partition table was found on this device", also in Dolphin it appears as before.

                      Did I screw up something?

                      Comment


                        #12
                        Stick it in reboot and see what happens.

                        Sent from my ONEPLUS A5010 using Tapatalk

                        Comment


                          #13
                          Is there all there is to do in order to build a live usb key?
                          Yep. (The boot code whatever are all embedded in that dd copy you performed.) Do as mr_raider says. The dd method is darned near fool proof, btw, assuming the iso is solid.
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #14
                            I prefer using Unetbootin to create a bootable USB drive. I've never used the dreaded "dd" command yet, it just fills me with trepidation as it's so easy to get it wrong and wipe your system out.

                            Another reason I like using Unetbootin is that I have a DATA folder on all my bootable USB flash drives that I can leave intact (just delete everything else on the USB drive prior to creating a new bootable system on the drive). Don't format the USB drive and Unetbootin will write the ISO to the drive leaving the DATA folder as is. Works every time! I think it's a more efficient way of getting persistent data on a USB flash drive. I have found the persistence feature on USB2 flash drives too slow.

                            You can obtain the latest version of Unetbootin here: http://unetbootin.github.io/
                            Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
                            Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

                            Comment


                              #15
                              Originally posted by Rod J View Post
                              I prefer using Unetbootin to create a bootable USB drive. I've never used the dreaded "dd" command yet, it just fills me with trepidation as it's so easy to get it wrong and wipe your system out.

                              Another reason I like using Unetbootin is that I have a DATA folder on all my bootable USB flash drives that I can leave intact (just delete everything else on the USB drive prior to creating a new bootable system on the drive). Don't format the USB drive and Unetbootin will write the ISO to the drive leaving the DATA folder as is. Works every time! I think it's a more efficient way of getting persistent data on a USB flash drive. I have found the persistence feature on USB2 flash drives too slow.

                              You can obtain the latest version of Unetbootin here: http://unetbootin.github.io/
                              the "dd"method is the dead easyest way to get a 99% of the time working live usb as long as the .iso image is a highbred image wich all the Ubuntu/Kubuntu .iso's are now days and should work just fine for what the OP needs ,,,,lets not get him confused hear with "our" favorite method ,,,,it seams as though the deed is done at this point anyway.

                              but I will agry with you that 1 little mistake of the wrong /dev destonation will most certainly hose your system ,,,hence the nick name "disk destroyer" .

                              MY favorite method of making a live usb with persistence AND a windows and linux accessible storage area is mkusb ,,,,if we are listing favorites

                              VINNY
                              Last edited by vinnywright; Jan 31, 2018, 04:11 PM.
                              i7 4core HT 8MB L3 2.9GHz
                              16GB RAM
                              Nvidia GTX 860M 4GB RAM 1152 cuda cores

                              Comment

                              Working...
                              X