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?
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.
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
add a comment |
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.
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
add a comment |
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.
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
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.
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
linux-mint
asked Aug 22 '16 at 2:03
jdee025jdee025
63 bronze badges
63 bronze badges
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
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.
- backup /home (just for security)
- 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)
- pvcreate /dev/sda2
- vgcreate newvg /dev/sda2
- lvcreate -n newhome newvg
- mkfs -t ext4 /dev/newvg/newhome
- mount /dev/newvg/newhome /mnt
- mv /home/. /mnt/.
- umount /home (better be logged as root)
- mount /dev/newvg/newhome /home
- modify /etc/fstab so it mount /dev/newvg/newhome as /home
- with fdisk /dev/sda set sda7 as 8e
- pvcreate /dev/sda7
- vgextend newhome /dev/sda7
- lvextend -l +100%VG /dev/newvg/newhome
- resize2fs /dev/newvg/newhome
et voila.
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
add a comment |
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.
- Backup your home directory - you can do that on a flash drive or an external HDD.
- 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 simplysudo 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.
Reboot the computer. Using
fdisk
change the type of partition of/dev/sda2
and/dev/sda7
to8e
(Linux LVM) from83
(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
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.- Create a physical volume (PV) on
/dev/sda2
and/dev/sda7
usingpvcreate
. Again please see the resources linked in this post etc. - 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.
@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 theLVM
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 - notsudo
. 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
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
- backup /home (just for security)
- 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)
- pvcreate /dev/sda2
- vgcreate newvg /dev/sda2
- lvcreate -n newhome newvg
- mkfs -t ext4 /dev/newvg/newhome
- mount /dev/newvg/newhome /mnt
- mv /home/. /mnt/.
- umount /home (better be logged as root)
- mount /dev/newvg/newhome /home
- modify /etc/fstab so it mount /dev/newvg/newhome as /home
- with fdisk /dev/sda set sda7 as 8e
- pvcreate /dev/sda7
- vgextend newhome /dev/sda7
- lvextend -l +100%VG /dev/newvg/newhome
- resize2fs /dev/newvg/newhome
et voila.
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
add a comment |
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.
- backup /home (just for security)
- 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)
- pvcreate /dev/sda2
- vgcreate newvg /dev/sda2
- lvcreate -n newhome newvg
- mkfs -t ext4 /dev/newvg/newhome
- mount /dev/newvg/newhome /mnt
- mv /home/. /mnt/.
- umount /home (better be logged as root)
- mount /dev/newvg/newhome /home
- modify /etc/fstab so it mount /dev/newvg/newhome as /home
- with fdisk /dev/sda set sda7 as 8e
- pvcreate /dev/sda7
- vgextend newhome /dev/sda7
- lvextend -l +100%VG /dev/newvg/newhome
- resize2fs /dev/newvg/newhome
et voila.
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
add a comment |
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.
- backup /home (just for security)
- 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)
- pvcreate /dev/sda2
- vgcreate newvg /dev/sda2
- lvcreate -n newhome newvg
- mkfs -t ext4 /dev/newvg/newhome
- mount /dev/newvg/newhome /mnt
- mv /home/. /mnt/.
- umount /home (better be logged as root)
- mount /dev/newvg/newhome /home
- modify /etc/fstab so it mount /dev/newvg/newhome as /home
- with fdisk /dev/sda set sda7 as 8e
- pvcreate /dev/sda7
- vgextend newhome /dev/sda7
- lvextend -l +100%VG /dev/newvg/newhome
- resize2fs /dev/newvg/newhome
et voila.
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.
- backup /home (just for security)
- 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)
- pvcreate /dev/sda2
- vgcreate newvg /dev/sda2
- lvcreate -n newhome newvg
- mkfs -t ext4 /dev/newvg/newhome
- mount /dev/newvg/newhome /mnt
- mv /home/. /mnt/.
- umount /home (better be logged as root)
- mount /dev/newvg/newhome /home
- modify /etc/fstab so it mount /dev/newvg/newhome as /home
- with fdisk /dev/sda set sda7 as 8e
- pvcreate /dev/sda7
- vgextend newhome /dev/sda7
- lvextend -l +100%VG /dev/newvg/newhome
- resize2fs /dev/newvg/newhome
et voila.
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
add a comment |
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
add a comment |
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.
- Backup your home directory - you can do that on a flash drive or an external HDD.
- 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 simplysudo 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.
Reboot the computer. Using
fdisk
change the type of partition of/dev/sda2
and/dev/sda7
to8e
(Linux LVM) from83
(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
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.- Create a physical volume (PV) on
/dev/sda2
and/dev/sda7
usingpvcreate
. Again please see the resources linked in this post etc. - 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.
@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 theLVM
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 - notsudo
. 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
add a comment |
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.
- Backup your home directory - you can do that on a flash drive or an external HDD.
- 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 simplysudo 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.
Reboot the computer. Using
fdisk
change the type of partition of/dev/sda2
and/dev/sda7
to8e
(Linux LVM) from83
(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
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.- Create a physical volume (PV) on
/dev/sda2
and/dev/sda7
usingpvcreate
. Again please see the resources linked in this post etc. - 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.
@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 theLVM
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 - notsudo
. 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
add a comment |
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.
- Backup your home directory - you can do that on a flash drive or an external HDD.
- 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 simplysudo 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.
Reboot the computer. Using
fdisk
change the type of partition of/dev/sda2
and/dev/sda7
to8e
(Linux LVM) from83
(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
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.- Create a physical volume (PV) on
/dev/sda2
and/dev/sda7
usingpvcreate
. Again please see the resources linked in this post etc. - 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.
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.
- Backup your home directory - you can do that on a flash drive or an external HDD.
- 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 simplysudo 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.
Reboot the computer. Using
fdisk
change the type of partition of/dev/sda2
and/dev/sda7
to8e
(Linux LVM) from83
(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
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.- Create a physical volume (PV) on
/dev/sda2
and/dev/sda7
usingpvcreate
. Again please see the resources linked in this post etc. - 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.
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 theLVM
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 - notsudo
. 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
add a comment |
@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 theLVM
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 - notsudo
. 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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered 13 mins ago
BixbyteBixbyte
212 bronze badges
212 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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