Fedora Linux Support Community & Resources Center
  #1  
Old 23rd May 2012, 08:55 PM
Rath1on Offline
Registered User
 
Join Date: May 2012
Location: NC
Posts: 7
linuxchrome
Adding Unallocated space to Linux partitions

I installed F16 on a dual boot with W7. When I installed it, I shrunk my W7 partition down 100gb and installed F16 on that free space, giving 50gb to root, 40gb to home, and 10gb to the swap partition. Now, I just want to get rid of Windows. I've explored this before and didn't find an answer, but can I format the W7 partition (both it and the system reserved one) and add that space to the Fedora partitions?

Here's my drive in GParted.



I have GParted on a live USB.
Reply With Quote
  #2  
Old 23rd May 2012, 11:17 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: Adding Unallocated space to Linux partitions

Yes. In fact, there are several ways to do it. The simplest way (which has a couple of variants) is to delete those two partitions, create one new one in their place, and use that new partition in some way. Two things you can do with it are:
  • Create a Linux filesystem on it, mount it somewhere convenient, and use it in that way.
  • Prepare it as an LVM physical volume, add it to your existing LVM setup, and then grow one or more of your existing LVM logical volumes.

The first method is simpler but relatively inflexible. The second method gives you a great deal of flexibility, but is a little bit harder to set up. You'll need to use LVM tools in addition to (or instead of) GParted or other conventional partitioning tools.
Reply With Quote
  #3  
Old 24th May 2012, 12:03 AM
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Confoederatio Helvetica (Swissh)
Age: 34
Posts: 3,439
linuxchrome
Re: Adding Unallocated space to Linux partitions

Welcome on the Linux board

Some things to keep in mind before you completly change.
* Linux supports all kind of partitions and environments, but Windows does not often.
* For playing games, there is currently no better 'out of the box' OS than Windows.

Some words about Fedora are to say too:
* Its current release changes every 6 months.
* This often bringes massiv changes along, which are
* Bleeding Edge, the synonym for Fedora
* You WILL have to fiddle settings/configurations/dependencies issues at least every 6 months.

My way would be kinda radical, but its beauty would be the nerdy way.

1) Boot into your current Fedora installation
IF "You are a nerd"
then 2) Follow the steps you find here: http://fedoraproject.org/wiki/How_to..._use_a_Live_CD
2.1) In the kickstart file, you add a manualy modified list of this output:
yum list installed | awk '{print $1}' > $HOME/installed-packages
Where you remove everything after the first dot, eg: binutils-4.9.1-12.fc17.x86_64 -> binutils
else 2) Prepare a live Media or an installation Media of your choice, and then run:
yum list installed | awk '{print $1}' > $HOME/installed-packages
3) After you have either written that iso on CD/DvD, or after its modification onto an USB-storage-device, make a backup of: /home /etc.
4) Save that backup on either dvd's, nas, or external harddisk. All of it!
5) Make a backup of your data while you run windows.
6) Are you really sure you have backed up everything?
7) Boot your installation/live Media and partition as follows:

GPT
1. bios_boot 1 mb
2. /boot 768 mb
3. /home 321 GB
4. / 32160 mb
5. swap 8192mb
6. free space 460 - ~363 = 97 gb, to have space for other linux distros (or rawhide) to test....

MBR
1. /boot 768 mb
2. /home 321 GB
3. / 32160 mb
4. extended
5. swap 8192 mb
6. * 97 GB free space for other linux distros

8) Complete the installation as usual and reboot when done.
9) Make folder: "/tmp/this-restore"
10) Copy your backup into /tmp/this-restore
11) Extract the files & place them back
12) Update your system
13) run: sudo yum install $(cat $HOME/installed-packages)

Have fun

EDIT:
As a note, you should be able to re-use /home, swap and /boot without formating in other linux distributions as well.
As a hint: For every further linux installation, choose its bootloader to be installed on that roots partition, eg: /dev/hdd6, reboot your 'base' installation on /dev/hdd3|4 and run grub2-mkconfig -o /boot/grub2/grub.cfg (This is important if you want to keep certain GRUB behaviour/modifikation to apply to each boot up)

EDIT 2:
However, you could format those 2 windows partitions, format that to 1 LVM partition, and then enlarge your /home inside your current LVM by the available space. Since LVM is some sort of a software raid, i guess this should cover the issue of a fixed size of the primary partitions.
__________________
Laptop: Toshiba satellite p50-a-11 CPU: Intel i7 8*2400 MHz GPU: GeForce GT 745M RAM: 8192 MB Distro: Fedora (Rawhide) DE: Awesome
Text User Interface (TUI) // Windows 8+ & Fedora 20+ Dualboot

Last edited by sea; 24th May 2012 at 12:18 AM.
Reply With Quote
  #4  
Old 24th May 2012, 12:40 AM
Rath1on Offline
Registered User
 
Join Date: May 2012
Location: NC
Posts: 7
linuxchrome
Re: Adding Unallocated space to Linux partitions

Wow, thanks for the help. I'll bookmark your post for future reference, but I just used an LVM tool I found. system-config-lvm :P It made everything really simple.



*dances*

They are on 2 separate partitions, but, unless that's a problem somehow, it doesn't bother me.

Last edited by Rath1on; 24th May 2012 at 12:44 AM.
Reply With Quote
  #5  
Old 24th May 2012, 12:54 AM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 31
Posts: 2,771
linuxfirefox
Re: Adding Unallocated space to Linux partitions

Quote:
Originally Posted by sea View Post
EDIT 2:
However, you could format those 2 windows partitions, format that to 1 LVM partition, and then enlarge your /home inside your current LVM by the available space. Since LVM is some sort of a software raid, i guess this should cover the issue of a fixed size of the primary partitions.
Given your current set up, this would be my choice.

First you need to know the device names of your /home logical volume and it's volume group. "mount | grep /home" should say something like "/dev/mapper/vg0-home on /home ..." or similar: in which case, let's say LV_HOME="/dev/mapper/vg0-home" and VOL_GROUP="vg0". Substitute appropriate values for your system. If /home and / are the same logical volume, you'll need to use a live CD to sort things, but otherwise the commands below should work (I think!) – back-up /home first!

1) Use GParted to delete the NTFS partitions, and create a single LVM partition.
2) Log out, switch to a virtual terminal (Ctrl+Alt+F3) and log in as root.
3) Unmount /home: "umount /home".
4) Format the new partition as an LVM physical volume: "pvcreate /dev/sda1" (assuming that the new partition is sda1).
5) Add the physical volume to your Fedora volume group: "vgextend VOL_GROUP /dev/sda1".
6) Resize your home logical volume to use the new space: "lvextend -l +100%FREE LV_HOME".
7) Resize the file-system on the home logical volume to use the whole logical volume: "resize2fs LV_HOME".
8) Remount /home: "mount /home".
9) Log out of the virtual terminal (Ctrl+D) and log in graphically (Ctrl+Alt+F1, or try other F-keys till you see the log-in screen).

---------- Post added at 12:54 AM ---------- Previous post was at 12:53 AM ----------

Ah, you found an easier way while I was typing... Never mind!
Reply With Quote
  #6  
Old 24th May 2012, 01:37 AM
Rath1on Offline
Registered User
 
Join Date: May 2012
Location: NC
Posts: 7
linuxchrome
Re: Adding Unallocated space to Linux partitions

Quote:
Originally Posted by Gareth Jones View Post
Given your current set up, this would be my choice.

First you need to know the device names of your /home logical volume and it's volume group. "mount | grep /home" should say something like "/dev/mapper/vg0-home on /home ..." or similar: in which case, let's say LV_HOME="/dev/mapper/vg0-home" and VOL_GROUP="vg0". Substitute appropriate values for your system. If /home and / are the same logical volume, you'll need to use a live CD to sort things, but otherwise the commands below should work (I think!) – back-up /home first!

1) Use GParted to delete the NTFS partitions, and create a single LVM partition.
2) Log out, switch to a virtual terminal (Ctrl+Alt+F3) and log in as root.
3) Unmount /home: "umount /home".
4) Format the new partition as an LVM physical volume: "pvcreate /dev/sda1" (assuming that the new partition is sda1).
5) Add the physical volume to your Fedora volume group: "vgextend VOL_GROUP /dev/sda1".
6) Resize your home logical volume to use the new space: "lvextend -l +100%FREE LV_HOME".
7) Resize the file-system on the home logical volume to use the whole logical volume: "resize2fs LV_HOME".
8) Remount /home: "mount /home".
9) Log out of the virtual terminal (Ctrl+D) and log in graphically (Ctrl+Alt+F1, or try other F-keys till you see the log-in screen).

---------- Post added at 12:54 AM ---------- Previous post was at 12:53 AM ----------

Ah, you found an easier way while I was typing... Never mind!
Yah, I was able to do it all within the OS, too. I'm surprised this tool isn't more widely known. I found a suggestion for it after a lot of thread searching.
Reply With Quote
  #7  
Old 24th May 2012, 04:46 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 31
Posts: 2,771
linuxfirefox
Re: Adding Unallocated space to Linux partitions

Just a thought, but it might be worth checking the free space in /home. If you resized the volumes graphically whilst logged in as yourself, it's unlikely that the home file-system was unmounted and resized to fill the enlarged volume. In that case, just follow steps 2, 3, and 7–9 in my post. Otherwise, looks like it's all sorted.
Reply With Quote
Reply

Tags
adding, linux, partitions, space, unallocated

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Unallocated space to Free space trilip Installation, Upgrades and Live Media 1 7th June 2010 04:48 PM
adding unallocated space to my fedora partition? CJay Using Fedora 1 6th October 2008 12:59 PM
unallocated space frojd Hardware & Laptops 0 20th September 2007 10:37 PM
Add unallocated space to partition macondo Using Fedora 2 23rd June 2007 12:59 AM
format unallocated space skyshadow Using Fedora 4 26th December 2006 05:33 PM


Current GMT-time: 08:10 (Wednesday, 01-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat