Can I merge two partitions from dfferent /dev/sda mount points into a single partition?Do I only need one...

Could citing a database like libgen get one into trouble?

How can solar sailed ships be protected from space debris?

Aligning arrays within arrays within another array

Is this house-rule removing the increased effect of cantrips at higher character levels balanced?

usage of y" not just for locations?

What was the ASCII end of medium (EM) character intended to be used for?

What is the point of using the kunai?

What happened to the Apollo 1 rocket?

Why did the Middle Kingdom stop building pyramid tombs?

What is the meaning of ゴト in the context of 鮎

Making arrow with a gradual colour

How to idiomatically express the idea "if you can cheat without being caught, do it"

Blood-based alcohol for vampires?

"Best practices" for formulating MIPs

How to track mail undetectably?

Are the Gray and Death Slaad's Bite and Claw attacks magical?

Why should I allow multiple IP addresses on a website for a single session?

Finding an optimal set without forbidden subsets

Why am I getting an electric shock from the water in my hot tub?

Odd PCB Layout for Voltage Regulator

Existence of infinite set of positive integers s.t sum of reciprocals is rational and set of primes dividing an element is infinite

Why can't i use !(single pattern) in zsh even after i turn on kshglob?

Why are examinees often not allowed to leave during the start and end of an exam?

2019 2-letters 33-length list



Can I merge two partitions from dfferent /dev/sda mount points into a single partition?


Do I only need one swap partition for multiple Linux distros? (and other questions)Growing my extended partition to the leftWhich device to install the bootloader should I choose?Grub doesn't recognize Win10 after first installing Win10 and then LinuxMintWhich device for boot loader installation?Gparted Linux Mint 18.1 issueHow can I merge unallocated hard disk space to my linux partition?How to move my Linux installation /boot/ and other important parts to SSDHow to remove Linux from a dual-boot system while keeping FreeDOS bootable?Shrink existing Windows partition to extend Linux home one?













1















History:



My laptop came with a Windows 7 OS installed, with a single partition (C:). I made a secondary partition out of that C: drive and installed Linux Mint in the second drive. I installed Linux Mint using bootable USB and selected "Something else". I made a separate /, swap, and /home out of the second partition. Therefore, making a dual-boot.



Now, I wanted to go Linux full time. I deleted/removed the Windows partition using Gparted. Then after that, I clicked the unallocated drive and made a new partition in which I renamed Data mounted at /mnt/Data (highlighted in the screenshot). Please see attached screenshot from Gparted.



enter image description here



Now, my question is: is it possible to merge /dev/sda2 to my /home partition (which is /dev/sda7 under /dev/sda3)? I wanted to make that "Data" partition included in the /home so that I will just have a single partition. "Data" partition does not contain any data at since I just created that last night.










share|improve this question



























    1















    History:



    My laptop came with a Windows 7 OS installed, with a single partition (C:). I made a secondary partition out of that C: drive and installed Linux Mint in the second drive. I installed Linux Mint using bootable USB and selected "Something else". I made a separate /, swap, and /home out of the second partition. Therefore, making a dual-boot.



    Now, I wanted to go Linux full time. I deleted/removed the Windows partition using Gparted. Then after that, I clicked the unallocated drive and made a new partition in which I renamed Data mounted at /mnt/Data (highlighted in the screenshot). Please see attached screenshot from Gparted.



    enter image description here



    Now, my question is: is it possible to merge /dev/sda2 to my /home partition (which is /dev/sda7 under /dev/sda3)? I wanted to make that "Data" partition included in the /home so that I will just have a single partition. "Data" partition does not contain any data at since I just created that last night.










    share|improve this question

























      1












      1








      1








      History:



      My laptop came with a Windows 7 OS installed, with a single partition (C:). I made a secondary partition out of that C: drive and installed Linux Mint in the second drive. I installed Linux Mint using bootable USB and selected "Something else". I made a separate /, swap, and /home out of the second partition. Therefore, making a dual-boot.



      Now, I wanted to go Linux full time. I deleted/removed the Windows partition using Gparted. Then after that, I clicked the unallocated drive and made a new partition in which I renamed Data mounted at /mnt/Data (highlighted in the screenshot). Please see attached screenshot from Gparted.



      enter image description here



      Now, my question is: is it possible to merge /dev/sda2 to my /home partition (which is /dev/sda7 under /dev/sda3)? I wanted to make that "Data" partition included in the /home so that I will just have a single partition. "Data" partition does not contain any data at since I just created that last night.










      share|improve this question














      History:



      My laptop came with a Windows 7 OS installed, with a single partition (C:). I made a secondary partition out of that C: drive and installed Linux Mint in the second drive. I installed Linux Mint using bootable USB and selected "Something else". I made a separate /, swap, and /home out of the second partition. Therefore, making a dual-boot.



      Now, I wanted to go Linux full time. I deleted/removed the Windows partition using Gparted. Then after that, I clicked the unallocated drive and made a new partition in which I renamed Data mounted at /mnt/Data (highlighted in the screenshot). Please see attached screenshot from Gparted.



      enter image description here



      Now, my question is: is it possible to merge /dev/sda2 to my /home partition (which is /dev/sda7 under /dev/sda3)? I wanted to make that "Data" partition included in the /home so that I will just have a single partition. "Data" partition does not contain any data at since I just created that last night.







      linux-mint






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 22 '16 at 2:03









      jdee025jdee025

      63 bronze badges




      63 bronze badges






















          3 Answers
          3






          active

          oldest

          votes


















          1














          The best solution might be to go with LVM, but sadly it look that you didn't go for it at install time.
          If you feel confident enough you can in the same time convert /dev/sda2 to LVM by creating a base LVM volume (if there is no data on it), then move you data from one old volume /home to the LVM volume, then extend your LVM with the freed space from /home.
          This move could have been avoid with the help on LVM, So next time you'll remember to use it :-).



          so all in one without reboot.




          1. backup /home (just for security)

          2. it appear to me that you don't have data on /dev/sda2, so with fdisk mark /dev/sda2 as LVM (8e but double check)

          3. pvcreate /dev/sda2

          4. vgcreate newvg /dev/sda2

          5. lvcreate -n newhome newvg

          6. mkfs -t ext4 /dev/newvg/newhome

          7. mount /dev/newvg/newhome /mnt

          8. mv /home/. /mnt/.

          9. umount /home (better be logged as root)

          10. mount /dev/newvg/newhome /home

          11. modify /etc/fstab so it mount /dev/newvg/newhome as /home

          12. with fdisk /dev/sda set sda7 as 8e

          13. pvcreate /dev/sda7

          14. vgextend newhome /dev/sda7

          15. lvextend -l +100%VG /dev/newvg/newhome

          16. resize2fs /dev/newvg/newhome
            et voila.






          share|improve this answer


























          • I will try your suggestion after I backed-up my /home folder. Just a question, does your solution the same as of the answer provided by @SACHIN GARG? I have no knowledge about LVM.

            – jdee025
            Aug 22 '16 at 7:26











          • I have done such modification many time. I am very confident on this sequence but I highly recommend that you read some howto about LVM and get used of the documentation. It is important as a user that you understand what append.

            – dominix
            Aug 22 '16 at 18:26



















          0














          I am not sure that you will be able to use gparted for this because you are planning to merge 2 non-contiguous partitions.



          As I see, you are not really using a lot of your hard disk space. Now that you are comfortable with using Linux, may I suggest that you switch your system to using the Logical Volume Manager (LVM) which can help you solve all these problems. The best would be to re-install your system by using LVM - am not sure if Mint provides that.



          See: https://askubuntu.com/questions/3596/what-is-lvm-and-what-is-it-used-for for a discussion of LVM.



          If you do not want to go the whole hog, you can just put your /home on LVM.



          The following is a very brief set of steps that you would need to follow. You can search for detailed instructions on the Internet.




          1. Backup your home directory - you can do that on a flash drive or an external HDD.

          2. As you would be touching your home directory and rebooting the computer multiple times, you may face problems logging in as yourself. To avoid these problems you can unlock the root account by setting a specific password. The way to do that is simply sudo passwd root and set an easily memorizable, but tough password. Also, it may be good to use a rescuecd like that from http://www.system-rescue-cd.org and burn it on USB drive.


          3. Reboot the computer. Using fdisk change the type of partition of /dev/sda2 and /dev/sda7 to 8e (Linux LVM) from 83 (linux).



            fdisk  /dev/sda
            Welcome to fdisk (util-linux 2.28.1).
            Changes will remain in memory only, until you decide to write them.
            Be careful before using the write command

            Command (m for help): t
            Partition number (1-3, default 3): 2
            Partition type (type L to list all types): 8e

            Changed type of partition 'Linux LVM' to 'Linux LVM'.

            Command (m for help): w


            Do the same for partition 7



          4. Now reboot again to get the kernel to read your partition table and login as root. If using sysrescucd, it automatically logs in as root.


          5. Create a physical volume (PV) on /dev/sda2 and /dev/sda7 using pvcreate. Again please see the resources linked in this post etc.

          6. Create a Volume Group (VG) and then a Logical Volume (LV) called "home" which you can then install with any filesystem of your choice.


          I prefer ext4 and now xfs because they allow for online re-sizing of the file system. The advantage of online re-sizing is that I do not have to umount the filesystem to extend it, and also while extending the logical volume, one can pass in a flag to resize the fielsystem.






          share|improve this answer


























          • @jdee025: just saw your comment to @b-janis. Considering the constraints, I do not think it is possible as pointed out in the linked answer: cannot merge primary & extended partitions. Would strongly suggest you to follow the LVM route.

            – SACHIN GARG
            Aug 22 '16 at 4:06











          • I will try your and the suggestion of @dominix after I backed-up my /home folder. But since I never encountered LVM (this is my first time to encounter such word), does the "detailed" instruction was the one provided by dominix or your suggestions different?

            – jdee025
            Aug 22 '16 at 7:24











          • @dominix provides a very nice way of doing things in one go, taking advantage of the fact that your /dev/sda2 is larger than your used /home. However, you need to be logged in as root - not sudo. Before trying what we suggest, read up on LVM, especially on its concept of "physical volume", "volume group" & "logical volume".

            – SACHIN GARG
            Aug 22 '16 at 11:40











          • @dominix: from a quick Internet search it seems Linux Mint does not allow installation using LVM, which is a pity.

            – SACHIN GARG
            Aug 22 '16 at 17:21



















          0














          Back up the Linux then reformat the entire drive to make one large drive then write your backup into the larger partition. Test the backup on another drive if you are unsure of your software skills.






          share|improve this answer


























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f304919%2fcan-i-merge-two-partitions-from-dfferent-dev-sda-mount-points-into-a-single-par%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            The best solution might be to go with LVM, but sadly it look that you didn't go for it at install time.
            If you feel confident enough you can in the same time convert /dev/sda2 to LVM by creating a base LVM volume (if there is no data on it), then move you data from one old volume /home to the LVM volume, then extend your LVM with the freed space from /home.
            This move could have been avoid with the help on LVM, So next time you'll remember to use it :-).



            so all in one without reboot.




            1. backup /home (just for security)

            2. it appear to me that you don't have data on /dev/sda2, so with fdisk mark /dev/sda2 as LVM (8e but double check)

            3. pvcreate /dev/sda2

            4. vgcreate newvg /dev/sda2

            5. lvcreate -n newhome newvg

            6. mkfs -t ext4 /dev/newvg/newhome

            7. mount /dev/newvg/newhome /mnt

            8. mv /home/. /mnt/.

            9. umount /home (better be logged as root)

            10. mount /dev/newvg/newhome /home

            11. modify /etc/fstab so it mount /dev/newvg/newhome as /home

            12. with fdisk /dev/sda set sda7 as 8e

            13. pvcreate /dev/sda7

            14. vgextend newhome /dev/sda7

            15. lvextend -l +100%VG /dev/newvg/newhome

            16. resize2fs /dev/newvg/newhome
              et voila.






            share|improve this answer


























            • I will try your suggestion after I backed-up my /home folder. Just a question, does your solution the same as of the answer provided by @SACHIN GARG? I have no knowledge about LVM.

              – jdee025
              Aug 22 '16 at 7:26











            • I have done such modification many time. I am very confident on this sequence but I highly recommend that you read some howto about LVM and get used of the documentation. It is important as a user that you understand what append.

              – dominix
              Aug 22 '16 at 18:26
















            1














            The best solution might be to go with LVM, but sadly it look that you didn't go for it at install time.
            If you feel confident enough you can in the same time convert /dev/sda2 to LVM by creating a base LVM volume (if there is no data on it), then move you data from one old volume /home to the LVM volume, then extend your LVM with the freed space from /home.
            This move could have been avoid with the help on LVM, So next time you'll remember to use it :-).



            so all in one without reboot.




            1. backup /home (just for security)

            2. it appear to me that you don't have data on /dev/sda2, so with fdisk mark /dev/sda2 as LVM (8e but double check)

            3. pvcreate /dev/sda2

            4. vgcreate newvg /dev/sda2

            5. lvcreate -n newhome newvg

            6. mkfs -t ext4 /dev/newvg/newhome

            7. mount /dev/newvg/newhome /mnt

            8. mv /home/. /mnt/.

            9. umount /home (better be logged as root)

            10. mount /dev/newvg/newhome /home

            11. modify /etc/fstab so it mount /dev/newvg/newhome as /home

            12. with fdisk /dev/sda set sda7 as 8e

            13. pvcreate /dev/sda7

            14. vgextend newhome /dev/sda7

            15. lvextend -l +100%VG /dev/newvg/newhome

            16. resize2fs /dev/newvg/newhome
              et voila.






            share|improve this answer


























            • I will try your suggestion after I backed-up my /home folder. Just a question, does your solution the same as of the answer provided by @SACHIN GARG? I have no knowledge about LVM.

              – jdee025
              Aug 22 '16 at 7:26











            • I have done such modification many time. I am very confident on this sequence but I highly recommend that you read some howto about LVM and get used of the documentation. It is important as a user that you understand what append.

              – dominix
              Aug 22 '16 at 18:26














            1












            1








            1







            The best solution might be to go with LVM, but sadly it look that you didn't go for it at install time.
            If you feel confident enough you can in the same time convert /dev/sda2 to LVM by creating a base LVM volume (if there is no data on it), then move you data from one old volume /home to the LVM volume, then extend your LVM with the freed space from /home.
            This move could have been avoid with the help on LVM, So next time you'll remember to use it :-).



            so all in one without reboot.




            1. backup /home (just for security)

            2. it appear to me that you don't have data on /dev/sda2, so with fdisk mark /dev/sda2 as LVM (8e but double check)

            3. pvcreate /dev/sda2

            4. vgcreate newvg /dev/sda2

            5. lvcreate -n newhome newvg

            6. mkfs -t ext4 /dev/newvg/newhome

            7. mount /dev/newvg/newhome /mnt

            8. mv /home/. /mnt/.

            9. umount /home (better be logged as root)

            10. mount /dev/newvg/newhome /home

            11. modify /etc/fstab so it mount /dev/newvg/newhome as /home

            12. with fdisk /dev/sda set sda7 as 8e

            13. pvcreate /dev/sda7

            14. vgextend newhome /dev/sda7

            15. lvextend -l +100%VG /dev/newvg/newhome

            16. resize2fs /dev/newvg/newhome
              et voila.






            share|improve this answer















            The best solution might be to go with LVM, but sadly it look that you didn't go for it at install time.
            If you feel confident enough you can in the same time convert /dev/sda2 to LVM by creating a base LVM volume (if there is no data on it), then move you data from one old volume /home to the LVM volume, then extend your LVM with the freed space from /home.
            This move could have been avoid with the help on LVM, So next time you'll remember to use it :-).



            so all in one without reboot.




            1. backup /home (just for security)

            2. it appear to me that you don't have data on /dev/sda2, so with fdisk mark /dev/sda2 as LVM (8e but double check)

            3. pvcreate /dev/sda2

            4. vgcreate newvg /dev/sda2

            5. lvcreate -n newhome newvg

            6. mkfs -t ext4 /dev/newvg/newhome

            7. mount /dev/newvg/newhome /mnt

            8. mv /home/. /mnt/.

            9. umount /home (better be logged as root)

            10. mount /dev/newvg/newhome /home

            11. modify /etc/fstab so it mount /dev/newvg/newhome as /home

            12. with fdisk /dev/sda set sda7 as 8e

            13. pvcreate /dev/sda7

            14. vgextend newhome /dev/sda7

            15. lvextend -l +100%VG /dev/newvg/newhome

            16. resize2fs /dev/newvg/newhome
              et voila.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 22 '16 at 5:01

























            answered Aug 22 '16 at 4:45









            dominixdominix

            971 silver badge10 bronze badges




            971 silver badge10 bronze badges













            • I will try your suggestion after I backed-up my /home folder. Just a question, does your solution the same as of the answer provided by @SACHIN GARG? I have no knowledge about LVM.

              – jdee025
              Aug 22 '16 at 7:26











            • I have done such modification many time. I am very confident on this sequence but I highly recommend that you read some howto about LVM and get used of the documentation. It is important as a user that you understand what append.

              – dominix
              Aug 22 '16 at 18:26



















            • I will try your suggestion after I backed-up my /home folder. Just a question, does your solution the same as of the answer provided by @SACHIN GARG? I have no knowledge about LVM.

              – jdee025
              Aug 22 '16 at 7:26











            • I have done such modification many time. I am very confident on this sequence but I highly recommend that you read some howto about LVM and get used of the documentation. It is important as a user that you understand what append.

              – dominix
              Aug 22 '16 at 18:26

















            I will try your suggestion after I backed-up my /home folder. Just a question, does your solution the same as of the answer provided by @SACHIN GARG? I have no knowledge about LVM.

            – jdee025
            Aug 22 '16 at 7:26





            I will try your suggestion after I backed-up my /home folder. Just a question, does your solution the same as of the answer provided by @SACHIN GARG? I have no knowledge about LVM.

            – jdee025
            Aug 22 '16 at 7:26













            I have done such modification many time. I am very confident on this sequence but I highly recommend that you read some howto about LVM and get used of the documentation. It is important as a user that you understand what append.

            – dominix
            Aug 22 '16 at 18:26





            I have done such modification many time. I am very confident on this sequence but I highly recommend that you read some howto about LVM and get used of the documentation. It is important as a user that you understand what append.

            – dominix
            Aug 22 '16 at 18:26











            0














            I am not sure that you will be able to use gparted for this because you are planning to merge 2 non-contiguous partitions.



            As I see, you are not really using a lot of your hard disk space. Now that you are comfortable with using Linux, may I suggest that you switch your system to using the Logical Volume Manager (LVM) which can help you solve all these problems. The best would be to re-install your system by using LVM - am not sure if Mint provides that.



            See: https://askubuntu.com/questions/3596/what-is-lvm-and-what-is-it-used-for for a discussion of LVM.



            If you do not want to go the whole hog, you can just put your /home on LVM.



            The following is a very brief set of steps that you would need to follow. You can search for detailed instructions on the Internet.




            1. Backup your home directory - you can do that on a flash drive or an external HDD.

            2. As you would be touching your home directory and rebooting the computer multiple times, you may face problems logging in as yourself. To avoid these problems you can unlock the root account by setting a specific password. The way to do that is simply sudo passwd root and set an easily memorizable, but tough password. Also, it may be good to use a rescuecd like that from http://www.system-rescue-cd.org and burn it on USB drive.


            3. Reboot the computer. Using fdisk change the type of partition of /dev/sda2 and /dev/sda7 to 8e (Linux LVM) from 83 (linux).



              fdisk  /dev/sda
              Welcome to fdisk (util-linux 2.28.1).
              Changes will remain in memory only, until you decide to write them.
              Be careful before using the write command

              Command (m for help): t
              Partition number (1-3, default 3): 2
              Partition type (type L to list all types): 8e

              Changed type of partition 'Linux LVM' to 'Linux LVM'.

              Command (m for help): w


              Do the same for partition 7



            4. Now reboot again to get the kernel to read your partition table and login as root. If using sysrescucd, it automatically logs in as root.


            5. Create a physical volume (PV) on /dev/sda2 and /dev/sda7 using pvcreate. Again please see the resources linked in this post etc.

            6. Create a Volume Group (VG) and then a Logical Volume (LV) called "home" which you can then install with any filesystem of your choice.


            I prefer ext4 and now xfs because they allow for online re-sizing of the file system. The advantage of online re-sizing is that I do not have to umount the filesystem to extend it, and also while extending the logical volume, one can pass in a flag to resize the fielsystem.






            share|improve this answer


























            • @jdee025: just saw your comment to @b-janis. Considering the constraints, I do not think it is possible as pointed out in the linked answer: cannot merge primary & extended partitions. Would strongly suggest you to follow the LVM route.

              – SACHIN GARG
              Aug 22 '16 at 4:06











            • I will try your and the suggestion of @dominix after I backed-up my /home folder. But since I never encountered LVM (this is my first time to encounter such word), does the "detailed" instruction was the one provided by dominix or your suggestions different?

              – jdee025
              Aug 22 '16 at 7:24











            • @dominix provides a very nice way of doing things in one go, taking advantage of the fact that your /dev/sda2 is larger than your used /home. However, you need to be logged in as root - not sudo. Before trying what we suggest, read up on LVM, especially on its concept of "physical volume", "volume group" & "logical volume".

              – SACHIN GARG
              Aug 22 '16 at 11:40











            • @dominix: from a quick Internet search it seems Linux Mint does not allow installation using LVM, which is a pity.

              – SACHIN GARG
              Aug 22 '16 at 17:21
















            0














            I am not sure that you will be able to use gparted for this because you are planning to merge 2 non-contiguous partitions.



            As I see, you are not really using a lot of your hard disk space. Now that you are comfortable with using Linux, may I suggest that you switch your system to using the Logical Volume Manager (LVM) which can help you solve all these problems. The best would be to re-install your system by using LVM - am not sure if Mint provides that.



            See: https://askubuntu.com/questions/3596/what-is-lvm-and-what-is-it-used-for for a discussion of LVM.



            If you do not want to go the whole hog, you can just put your /home on LVM.



            The following is a very brief set of steps that you would need to follow. You can search for detailed instructions on the Internet.




            1. Backup your home directory - you can do that on a flash drive or an external HDD.

            2. As you would be touching your home directory and rebooting the computer multiple times, you may face problems logging in as yourself. To avoid these problems you can unlock the root account by setting a specific password. The way to do that is simply sudo passwd root and set an easily memorizable, but tough password. Also, it may be good to use a rescuecd like that from http://www.system-rescue-cd.org and burn it on USB drive.


            3. Reboot the computer. Using fdisk change the type of partition of /dev/sda2 and /dev/sda7 to 8e (Linux LVM) from 83 (linux).



              fdisk  /dev/sda
              Welcome to fdisk (util-linux 2.28.1).
              Changes will remain in memory only, until you decide to write them.
              Be careful before using the write command

              Command (m for help): t
              Partition number (1-3, default 3): 2
              Partition type (type L to list all types): 8e

              Changed type of partition 'Linux LVM' to 'Linux LVM'.

              Command (m for help): w


              Do the same for partition 7



            4. Now reboot again to get the kernel to read your partition table and login as root. If using sysrescucd, it automatically logs in as root.


            5. Create a physical volume (PV) on /dev/sda2 and /dev/sda7 using pvcreate. Again please see the resources linked in this post etc.

            6. Create a Volume Group (VG) and then a Logical Volume (LV) called "home" which you can then install with any filesystem of your choice.


            I prefer ext4 and now xfs because they allow for online re-sizing of the file system. The advantage of online re-sizing is that I do not have to umount the filesystem to extend it, and also while extending the logical volume, one can pass in a flag to resize the fielsystem.






            share|improve this answer


























            • @jdee025: just saw your comment to @b-janis. Considering the constraints, I do not think it is possible as pointed out in the linked answer: cannot merge primary & extended partitions. Would strongly suggest you to follow the LVM route.

              – SACHIN GARG
              Aug 22 '16 at 4:06











            • I will try your and the suggestion of @dominix after I backed-up my /home folder. But since I never encountered LVM (this is my first time to encounter such word), does the "detailed" instruction was the one provided by dominix or your suggestions different?

              – jdee025
              Aug 22 '16 at 7:24











            • @dominix provides a very nice way of doing things in one go, taking advantage of the fact that your /dev/sda2 is larger than your used /home. However, you need to be logged in as root - not sudo. Before trying what we suggest, read up on LVM, especially on its concept of "physical volume", "volume group" & "logical volume".

              – SACHIN GARG
              Aug 22 '16 at 11:40











            • @dominix: from a quick Internet search it seems Linux Mint does not allow installation using LVM, which is a pity.

              – SACHIN GARG
              Aug 22 '16 at 17:21














            0












            0








            0







            I am not sure that you will be able to use gparted for this because you are planning to merge 2 non-contiguous partitions.



            As I see, you are not really using a lot of your hard disk space. Now that you are comfortable with using Linux, may I suggest that you switch your system to using the Logical Volume Manager (LVM) which can help you solve all these problems. The best would be to re-install your system by using LVM - am not sure if Mint provides that.



            See: https://askubuntu.com/questions/3596/what-is-lvm-and-what-is-it-used-for for a discussion of LVM.



            If you do not want to go the whole hog, you can just put your /home on LVM.



            The following is a very brief set of steps that you would need to follow. You can search for detailed instructions on the Internet.




            1. Backup your home directory - you can do that on a flash drive or an external HDD.

            2. As you would be touching your home directory and rebooting the computer multiple times, you may face problems logging in as yourself. To avoid these problems you can unlock the root account by setting a specific password. The way to do that is simply sudo passwd root and set an easily memorizable, but tough password. Also, it may be good to use a rescuecd like that from http://www.system-rescue-cd.org and burn it on USB drive.


            3. Reboot the computer. Using fdisk change the type of partition of /dev/sda2 and /dev/sda7 to 8e (Linux LVM) from 83 (linux).



              fdisk  /dev/sda
              Welcome to fdisk (util-linux 2.28.1).
              Changes will remain in memory only, until you decide to write them.
              Be careful before using the write command

              Command (m for help): t
              Partition number (1-3, default 3): 2
              Partition type (type L to list all types): 8e

              Changed type of partition 'Linux LVM' to 'Linux LVM'.

              Command (m for help): w


              Do the same for partition 7



            4. Now reboot again to get the kernel to read your partition table and login as root. If using sysrescucd, it automatically logs in as root.


            5. Create a physical volume (PV) on /dev/sda2 and /dev/sda7 using pvcreate. Again please see the resources linked in this post etc.

            6. Create a Volume Group (VG) and then a Logical Volume (LV) called "home" which you can then install with any filesystem of your choice.


            I prefer ext4 and now xfs because they allow for online re-sizing of the file system. The advantage of online re-sizing is that I do not have to umount the filesystem to extend it, and also while extending the logical volume, one can pass in a flag to resize the fielsystem.






            share|improve this answer















            I am not sure that you will be able to use gparted for this because you are planning to merge 2 non-contiguous partitions.



            As I see, you are not really using a lot of your hard disk space. Now that you are comfortable with using Linux, may I suggest that you switch your system to using the Logical Volume Manager (LVM) which can help you solve all these problems. The best would be to re-install your system by using LVM - am not sure if Mint provides that.



            See: https://askubuntu.com/questions/3596/what-is-lvm-and-what-is-it-used-for for a discussion of LVM.



            If you do not want to go the whole hog, you can just put your /home on LVM.



            The following is a very brief set of steps that you would need to follow. You can search for detailed instructions on the Internet.




            1. Backup your home directory - you can do that on a flash drive or an external HDD.

            2. As you would be touching your home directory and rebooting the computer multiple times, you may face problems logging in as yourself. To avoid these problems you can unlock the root account by setting a specific password. The way to do that is simply sudo passwd root and set an easily memorizable, but tough password. Also, it may be good to use a rescuecd like that from http://www.system-rescue-cd.org and burn it on USB drive.


            3. Reboot the computer. Using fdisk change the type of partition of /dev/sda2 and /dev/sda7 to 8e (Linux LVM) from 83 (linux).



              fdisk  /dev/sda
              Welcome to fdisk (util-linux 2.28.1).
              Changes will remain in memory only, until you decide to write them.
              Be careful before using the write command

              Command (m for help): t
              Partition number (1-3, default 3): 2
              Partition type (type L to list all types): 8e

              Changed type of partition 'Linux LVM' to 'Linux LVM'.

              Command (m for help): w


              Do the same for partition 7



            4. Now reboot again to get the kernel to read your partition table and login as root. If using sysrescucd, it automatically logs in as root.


            5. Create a physical volume (PV) on /dev/sda2 and /dev/sda7 using pvcreate. Again please see the resources linked in this post etc.

            6. Create a Volume Group (VG) and then a Logical Volume (LV) called "home" which you can then install with any filesystem of your choice.


            I prefer ext4 and now xfs because they allow for online re-sizing of the file system. The advantage of online re-sizing is that I do not have to umount the filesystem to extend it, and also while extending the logical volume, one can pass in a flag to resize the fielsystem.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 13 '17 at 12:22









            Community

            1




            1










            answered Aug 22 '16 at 4:03









            SACHIN GARGSACHIN GARG

            1144 bronze badges




            1144 bronze badges













            • @jdee025: just saw your comment to @b-janis. Considering the constraints, I do not think it is possible as pointed out in the linked answer: cannot merge primary & extended partitions. Would strongly suggest you to follow the LVM route.

              – SACHIN GARG
              Aug 22 '16 at 4:06











            • I will try your and the suggestion of @dominix after I backed-up my /home folder. But since I never encountered LVM (this is my first time to encounter such word), does the "detailed" instruction was the one provided by dominix or your suggestions different?

              – jdee025
              Aug 22 '16 at 7:24











            • @dominix provides a very nice way of doing things in one go, taking advantage of the fact that your /dev/sda2 is larger than your used /home. However, you need to be logged in as root - not sudo. Before trying what we suggest, read up on LVM, especially on its concept of "physical volume", "volume group" & "logical volume".

              – SACHIN GARG
              Aug 22 '16 at 11:40











            • @dominix: from a quick Internet search it seems Linux Mint does not allow installation using LVM, which is a pity.

              – SACHIN GARG
              Aug 22 '16 at 17:21



















            • @jdee025: just saw your comment to @b-janis. Considering the constraints, I do not think it is possible as pointed out in the linked answer: cannot merge primary & extended partitions. Would strongly suggest you to follow the LVM route.

              – SACHIN GARG
              Aug 22 '16 at 4:06











            • I will try your and the suggestion of @dominix after I backed-up my /home folder. But since I never encountered LVM (this is my first time to encounter such word), does the "detailed" instruction was the one provided by dominix or your suggestions different?

              – jdee025
              Aug 22 '16 at 7:24











            • @dominix provides a very nice way of doing things in one go, taking advantage of the fact that your /dev/sda2 is larger than your used /home. However, you need to be logged in as root - not sudo. Before trying what we suggest, read up on LVM, especially on its concept of "physical volume", "volume group" & "logical volume".

              – SACHIN GARG
              Aug 22 '16 at 11:40











            • @dominix: from a quick Internet search it seems Linux Mint does not allow installation using LVM, which is a pity.

              – SACHIN GARG
              Aug 22 '16 at 17:21

















            @jdee025: just saw your comment to @b-janis. Considering the constraints, I do not think it is possible as pointed out in the linked answer: cannot merge primary & extended partitions. Would strongly suggest you to follow the LVM route.

            – SACHIN GARG
            Aug 22 '16 at 4:06





            @jdee025: just saw your comment to @b-janis. Considering the constraints, I do not think it is possible as pointed out in the linked answer: cannot merge primary & extended partitions. Would strongly suggest you to follow the LVM route.

            – SACHIN GARG
            Aug 22 '16 at 4:06













            I will try your and the suggestion of @dominix after I backed-up my /home folder. But since I never encountered LVM (this is my first time to encounter such word), does the "detailed" instruction was the one provided by dominix or your suggestions different?

            – jdee025
            Aug 22 '16 at 7:24





            I will try your and the suggestion of @dominix after I backed-up my /home folder. But since I never encountered LVM (this is my first time to encounter such word), does the "detailed" instruction was the one provided by dominix or your suggestions different?

            – jdee025
            Aug 22 '16 at 7:24













            @dominix provides a very nice way of doing things in one go, taking advantage of the fact that your /dev/sda2 is larger than your used /home. However, you need to be logged in as root - not sudo. Before trying what we suggest, read up on LVM, especially on its concept of "physical volume", "volume group" & "logical volume".

            – SACHIN GARG
            Aug 22 '16 at 11:40





            @dominix provides a very nice way of doing things in one go, taking advantage of the fact that your /dev/sda2 is larger than your used /home. However, you need to be logged in as root - not sudo. Before trying what we suggest, read up on LVM, especially on its concept of "physical volume", "volume group" & "logical volume".

            – SACHIN GARG
            Aug 22 '16 at 11:40













            @dominix: from a quick Internet search it seems Linux Mint does not allow installation using LVM, which is a pity.

            – SACHIN GARG
            Aug 22 '16 at 17:21





            @dominix: from a quick Internet search it seems Linux Mint does not allow installation using LVM, which is a pity.

            – SACHIN GARG
            Aug 22 '16 at 17:21











            0














            Back up the Linux then reformat the entire drive to make one large drive then write your backup into the larger partition. Test the backup on another drive if you are unsure of your software skills.






            share|improve this answer




























              0














              Back up the Linux then reformat the entire drive to make one large drive then write your backup into the larger partition. Test the backup on another drive if you are unsure of your software skills.






              share|improve this answer


























                0












                0








                0







                Back up the Linux then reformat the entire drive to make one large drive then write your backup into the larger partition. Test the backup on another drive if you are unsure of your software skills.






                share|improve this answer













                Back up the Linux then reformat the entire drive to make one large drive then write your backup into the larger partition. Test the backup on another drive if you are unsure of your software skills.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 13 mins ago









                BixbyteBixbyte

                212 bronze badges




                212 bronze badges






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f304919%2fcan-i-merge-two-partitions-from-dfferent-dev-sda-mount-points-into-a-single-par%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                    Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                    Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m