LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having 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


Reply
  Search this Thread
Old 11-26-2014, 03:05 AM   #1
njdevils9
LQ Newbie
 
Registered: Aug 2014
Posts: 9

Rep: Reputation: Disabled
Question 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.
 
Old 11-26-2014, 03:09 AM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Post output of
Quote:
fdisk -l
 
Old 11-26-2014, 03:11 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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"
 
Old 11-26-2014, 03:19 AM   #4
njdevils9
LQ Newbie
 
Registered: Aug 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by EDDY1 View Post
Post output of
***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.
Attached Thumbnails
Click image for larger version

Name:	fdisk.png
Views:	17
Size:	50.8 KB
ID:	16931  

Last edited by njdevils9; 11-26-2014 at 03:51 AM.
 
Old 11-26-2014, 03:27 AM   #5
njdevils9
LQ Newbie
 
Registered: Aug 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by syg00 View Post
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.

Sorry for the hassel everyone..
Attached Thumbnails
Click image for larger version

Name:	parted.png
Views:	15
Size:	44.1 KB
ID:	16932  

Last edited by njdevils9; 11-26-2014 at 03:53 AM.
 
Old 11-26-2014, 03:27 AM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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
 
Old 11-26-2014, 03:32 AM   #7
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
You have 32.4G free space between sda2 & sda3 move it to the other side of sda6
 
Old 11-26-2014, 03:40 AM   #8
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Do not touch extended partition! It will remove your swap and home partitions!
Extended patition was created when you installed Arch.

Last edited by Teufel; 11-26-2014 at 03:42 AM.
 
Old 11-26-2014, 03:43 AM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by Teufel View Post
Do not touch extended partition! It will remove your swap and home partitions!
Extended patition was created when you installed Arch.
The OP can move the partition & if they wanted to can delete but would have to edit fstab to reflect the change.
Which would make sda6 sda5

Last edited by EDDY1; 11-26-2014 at 03:44 AM.
 
Old 11-26-2014, 03:55 AM   #10
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Yes, he can move extended partition. When I wrote "do not touch" I meant "do not delete" it, because OP wrote:
Quote:
...I can remove it if need be...
Removing extended partition will remove sda5 & sda6 and you can't restore them simply by editing fstab.

Last edited by Teufel; 11-26-2014 at 03:59 AM.
 
Old 11-26-2014, 04:02 AM   #11
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by Teufel View Post
Yes, he can move extended partition. When I wrote "do not touch" I meant "do not delete" it, because OP wrote:

Removing extended partition will remove sda5 & sda6 and you can't restore them by editing fstab.
My apologies I misread your post or should I say didn't read into it enough & made a statement too hastily.
 
Old 11-26-2014, 06:00 AM   #12
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,498

Rep: Reputation: Disabled
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.
 
Old 11-26-2014, 07:49 AM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,519

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
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.

Last edited by yancek; 11-26-2014 at 02:19 PM.
 
Old 11-26-2014, 08:04 AM   #14
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
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

Last edited by Teufel; 11-26-2014 at 08:07 AM.
 
Old 11-26-2014, 11:09 PM   #15
njdevils9
LQ Newbie
 
Registered: Aug 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Question

Quote:
Originally Posted by EDDY1 View Post
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..
Attached Thumbnails
Click image for larger version

Name:	KDiskFree.png
Views:	14
Size:	18.1 KB
ID:	16940   Click image for larger version

Name:	Disk Usage Analyzer.png
Views:	11
Size:	25.4 KB
ID:	16941   Click image for larger version

Name:	fdisk.png
Views:	14
Size:	48.9 KB
ID:	16942  
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partioning a single partition into multiple partitions. Grtyop Linux - Newbie 4 07-05-2013 03:28 PM
How to move unused windows partition to linux partition? aribowo SUSE / openSUSE 3 05-28-2007 11:51 PM
move xp partition for linux davidleroux1 Linux - Software 4 11-27-2004 03:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 06:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration