How To Move Linux Partitions To A Single Partition
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How To Move Linux Partitions To A Single Partition
Hey everyone I had a question about paritioning with Linux... I am using a Acer Aspire V5-122P-0889 laptop. I currently have it dual-booted with Windows 8.1 and Arch Linux. I am getting tired of logging into Windows 8.1 and running Kali Linux (kind of laggy) through VirtualBox so I was wanting to Triple-boot my machine.. I tried to create a New Volume in Windows Disk Management tool but it says that I have too many partitions on my HDD and can not create another Volume. When I installed Arch I created 3 partitions; one for '/', one for '/home' and the other was my for swap. I was wanting to see if I could move the /home and/or swap partitions to the '/' partition so that I can install Kali on my machine via my USB stick (no CD drive)... My '/' partition is set to /dev/sda3 , /home partition is set to /dev/sda6 , swap partition is set to /dev/sda5 and for some reason I have an extended partition on /dev/sda4 that I am currently not sure what is being stored there. Anyways, I'd appreciate any help I could get as to how I can put my Arch Linux partitions into 1 big partition or maybe even 2 partitions if needed but the least partitions the better so that I can attempt to install Kali on a newly created partition.
Don't use Windows to create Linux partitions. Leave the space unallocated, and Kali should create whatever partitions it needs during install.
From an Arch terminal enter this (as root/sudo) and post all the output
I didn't know how much of a difference it would make but I removed the 30GB of unallocated space that I created from my C:\ right before this thread was started just in case.. It shouldn't make much of a difference but here is the updated screenshot of how it originally was.
Don't use Windows to create Linux partitions. Leave the space unallocated, and Kali should create whatever partitions it needs during install.
From an Arch terminal enter this (as root/sudo) and post all the output
Code:
parted /dev/sda "print free"
***UPDATED***
I didn't know how much of a difference it would make but I removed the 30GB of unallocated space that I created from my C:\ right before this thread was started just in case.. It shouldn't make much of a difference but here is the updated screenshot of how it originally was.
I would resize sda2 if it's not full
It looks like you have some free space between sda2 & sda3
I would also boot to gpated-live cd/usb
Move sda3 to the left
Grow sda4 to the left
Move sda5 to the left
Move sda6 to the left
Use unallocated space for new install
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,498
Rep:
Quote:
When I installed Arch I created 3 partitions; one for '/', one for '/home' and the other was my for swap. I was wanting to see if I could move the /home and/or swap partitions to the '/' partition so that I can install Kali on my machine via my USB stick (no CD drive)... My '/' partition is set to /dev/sda3 , /home partition is set to /dev/sda6 , swap partition is set to /dev/sda5 and for some reason I have an extended partition on /dev/sda4 that I am currently not sure what is being stored there. Anyways, I'd appreciate any help I could get as to how I can put my Arch Linux partitions into 1 big partition or maybe even 2 partitions if needed but the least partitions the better so that I can attempt to install Kali on a newly created partition.
After you have copied, as root, your whole /home/<username>, [all your data, including .(dot) files], from your present /home directory into your (sda3) / as something like /tmp-home, alter your /etc/fstab on /dev/sda3 so that it no longer points to /dev/sda6, copy all of /tmp-home to your /home directory, rename it /home/<username>, run chown -R <user>:<group> /home/<username>, then reboot. Everything should be working as normal.
You can now use sda6 to install to, (your present swap partition will be used by your new installation as well as your original distro).
Your sda4 partition holds the info about your extended partitions.
If you move sda3 to the left, your location for boot files will also be moved so the Grub code in the mbr will not be able to find its files, they won't be in the specified location so I expect you will need to chroot into Arch and reinstall Grub.
Is there any reason why you did not use GPT partitioning with this system? If you had, you could simply have shrunk sda2 and created another primary partition there for your install.
Patitioning schema was messed from the very beginning so it isn't a good idea to keep things like they exists now. Yes home content migth be moved to root partition, but there might be no enough free space to fit home files.
I noticed the OP removed free space before sda3 (but where this free space gone?) and I think partitions completely messed. And now its a good reason to bring everything in order
I would suggest the following:
1. Backup Arch root & home filesystems
2. Remove all the partitions except sda1 and sda2
3. Create extended partition for all the rest free space
4. Create 3 partitions inside the extended one so they would be populated with two linux systems plus swap. Do not separate home from root.
5. Move Arch backup to his partition and restore bootloader to get Arch bootable. I would rather reinstall Arch at all.
6. Install Kali at his partition and add it to boot menu.
And do not use Windows for any partitioning/deleting/moving operations. Do it from Linux liveCD/USB
I would resize sda2 if it's not full
It looks like you have some free space between sda2 & sda3
I would also boot to gpated-live cd/usb
Move sda3 to the left
Grow sda4 to the left
Move sda5 to the left
Move sda6 to the left
Use unallocated space for new install
When you say move each sda (3-6) to the left what do you mean? How do you go about doing that? The only programs I see installed that have anything to do with viewing and possibly configuring my partitions is either the program called Disks, Disk Usage Analyzer or KDisks free.. I'm terrible with working with partitions especially on Linux..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.