How to merge partitions with one partition is a Linux root partition

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have a Linux hard drive with two partitions:



/dev/sdb1 16126 234437409 234421284 111,8G f W95 Ext'd (LBA)
/dev/sdb5 16128 161870939 161854812 77,2G 83 Linux
/dev/sdb6 * 161871003 234437409 72566407 34,6G 83 Linux


Both sdb5 and sdb6 are already filled with data.



How do I safely merge those two partitions without loosing data and OS?










share|improve this question





















  • I would copy the data onto two physically independent backup devices and verify them. Then use gparted to delete both partitions and create a new one in the space. Then copy your data back.
    – Organic Marble
    Feb 24 at 23:45






  • 1




    If you have enough free space on sdb5 to hold all of the data from sdb6, then copy over the data, then use gparted to delete sdb6 and extend sdb5. If there's not enough room on sdb5, then copy sdb6 data off to a flash drive, use gparted to delete sdb6, extend sdb5, and then restore the data from the flash drive.
    – heynnema
    Feb 24 at 23:59










  • @heynnema : is it gonna change if sdb6 is my root directory? Sorry if I didn't mention this before.
    – sianipard
    Feb 25 at 16:20










  • Yes it will. Then copy off sdb5 to an external HDD or flash drive, use gparted to delete sdb5, and extend sdb6, and copy back the data from the flash drive. Make sure that you have a good external backup of sdb6 just in case something goes wrong. Basically you can do what @OrganicMarble suggested earlier.
    – heynnema
    Feb 26 at 15:19















up vote
0
down vote

favorite












I have a Linux hard drive with two partitions:



/dev/sdb1 16126 234437409 234421284 111,8G f W95 Ext'd (LBA)
/dev/sdb5 16128 161870939 161854812 77,2G 83 Linux
/dev/sdb6 * 161871003 234437409 72566407 34,6G 83 Linux


Both sdb5 and sdb6 are already filled with data.



How do I safely merge those two partitions without loosing data and OS?










share|improve this question





















  • I would copy the data onto two physically independent backup devices and verify them. Then use gparted to delete both partitions and create a new one in the space. Then copy your data back.
    – Organic Marble
    Feb 24 at 23:45






  • 1




    If you have enough free space on sdb5 to hold all of the data from sdb6, then copy over the data, then use gparted to delete sdb6 and extend sdb5. If there's not enough room on sdb5, then copy sdb6 data off to a flash drive, use gparted to delete sdb6, extend sdb5, and then restore the data from the flash drive.
    – heynnema
    Feb 24 at 23:59










  • @heynnema : is it gonna change if sdb6 is my root directory? Sorry if I didn't mention this before.
    – sianipard
    Feb 25 at 16:20










  • Yes it will. Then copy off sdb5 to an external HDD or flash drive, use gparted to delete sdb5, and extend sdb6, and copy back the data from the flash drive. Make sure that you have a good external backup of sdb6 just in case something goes wrong. Basically you can do what @OrganicMarble suggested earlier.
    – heynnema
    Feb 26 at 15:19













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a Linux hard drive with two partitions:



/dev/sdb1 16126 234437409 234421284 111,8G f W95 Ext'd (LBA)
/dev/sdb5 16128 161870939 161854812 77,2G 83 Linux
/dev/sdb6 * 161871003 234437409 72566407 34,6G 83 Linux


Both sdb5 and sdb6 are already filled with data.



How do I safely merge those two partitions without loosing data and OS?










share|improve this question













I have a Linux hard drive with two partitions:



/dev/sdb1 16126 234437409 234421284 111,8G f W95 Ext'd (LBA)
/dev/sdb5 16128 161870939 161854812 77,2G 83 Linux
/dev/sdb6 * 161871003 234437409 72566407 34,6G 83 Linux


Both sdb5 and sdb6 are already filled with data.



How do I safely merge those two partitions without loosing data and OS?







partitioning merge






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 24 at 23:42









sianipard

1




1











  • I would copy the data onto two physically independent backup devices and verify them. Then use gparted to delete both partitions and create a new one in the space. Then copy your data back.
    – Organic Marble
    Feb 24 at 23:45






  • 1




    If you have enough free space on sdb5 to hold all of the data from sdb6, then copy over the data, then use gparted to delete sdb6 and extend sdb5. If there's not enough room on sdb5, then copy sdb6 data off to a flash drive, use gparted to delete sdb6, extend sdb5, and then restore the data from the flash drive.
    – heynnema
    Feb 24 at 23:59










  • @heynnema : is it gonna change if sdb6 is my root directory? Sorry if I didn't mention this before.
    – sianipard
    Feb 25 at 16:20










  • Yes it will. Then copy off sdb5 to an external HDD or flash drive, use gparted to delete sdb5, and extend sdb6, and copy back the data from the flash drive. Make sure that you have a good external backup of sdb6 just in case something goes wrong. Basically you can do what @OrganicMarble suggested earlier.
    – heynnema
    Feb 26 at 15:19

















  • I would copy the data onto two physically independent backup devices and verify them. Then use gparted to delete both partitions and create a new one in the space. Then copy your data back.
    – Organic Marble
    Feb 24 at 23:45






  • 1




    If you have enough free space on sdb5 to hold all of the data from sdb6, then copy over the data, then use gparted to delete sdb6 and extend sdb5. If there's not enough room on sdb5, then copy sdb6 data off to a flash drive, use gparted to delete sdb6, extend sdb5, and then restore the data from the flash drive.
    – heynnema
    Feb 24 at 23:59










  • @heynnema : is it gonna change if sdb6 is my root directory? Sorry if I didn't mention this before.
    – sianipard
    Feb 25 at 16:20










  • Yes it will. Then copy off sdb5 to an external HDD or flash drive, use gparted to delete sdb5, and extend sdb6, and copy back the data from the flash drive. Make sure that you have a good external backup of sdb6 just in case something goes wrong. Basically you can do what @OrganicMarble suggested earlier.
    – heynnema
    Feb 26 at 15:19
















I would copy the data onto two physically independent backup devices and verify them. Then use gparted to delete both partitions and create a new one in the space. Then copy your data back.
– Organic Marble
Feb 24 at 23:45




I would copy the data onto two physically independent backup devices and verify them. Then use gparted to delete both partitions and create a new one in the space. Then copy your data back.
– Organic Marble
Feb 24 at 23:45




1




1




If you have enough free space on sdb5 to hold all of the data from sdb6, then copy over the data, then use gparted to delete sdb6 and extend sdb5. If there's not enough room on sdb5, then copy sdb6 data off to a flash drive, use gparted to delete sdb6, extend sdb5, and then restore the data from the flash drive.
– heynnema
Feb 24 at 23:59




If you have enough free space on sdb5 to hold all of the data from sdb6, then copy over the data, then use gparted to delete sdb6 and extend sdb5. If there's not enough room on sdb5, then copy sdb6 data off to a flash drive, use gparted to delete sdb6, extend sdb5, and then restore the data from the flash drive.
– heynnema
Feb 24 at 23:59












@heynnema : is it gonna change if sdb6 is my root directory? Sorry if I didn't mention this before.
– sianipard
Feb 25 at 16:20




@heynnema : is it gonna change if sdb6 is my root directory? Sorry if I didn't mention this before.
– sianipard
Feb 25 at 16:20












Yes it will. Then copy off sdb5 to an external HDD or flash drive, use gparted to delete sdb5, and extend sdb6, and copy back the data from the flash drive. Make sure that you have a good external backup of sdb6 just in case something goes wrong. Basically you can do what @OrganicMarble suggested earlier.
– heynnema
Feb 26 at 15:19





Yes it will. Then copy off sdb5 to an external HDD or flash drive, use gparted to delete sdb5, and extend sdb6, and copy back the data from the flash drive. Make sure that you have a good external backup of sdb6 just in case something goes wrong. Basically you can do what @OrganicMarble suggested earlier.
– heynnema
Feb 26 at 15:19
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1009470%2fhow-to-merge-partitions-with-one-partition-is-a-linux-root-partition%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1009470%2fhow-to-merge-partitions-with-one-partition-is-a-linux-root-partition%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491