Ask Your Question
0

What is the best way to reinstall Fedora 20 on a larger partition?

asked 2014-05-21 23:14:54 -0600

Jtpond gravatar image

updated 2014-05-22 00:30:01 -0600

mether gravatar image

I installed Fedora 20 in a dual boot system with windows 7 because I needed a *unix system for work and I expected to only use it for work.... The problem is, is that I LOVE it and want to use it all the time, but I still need windows for a few things. I only gave Fedora 20 50GB and I used the windows 7 disk manager to shrink the original drive and used the feodra defaults to make the logical partition. I have a 1TB HD and over 800GB are wasted on my disused windows partition. I simply don't know how to do this without bricking my machine and I don't have a windows recovery disk. Any good information would be helpful. Thanks!

edit retag flag offensive close merge delete

Comments

Please don't use # in tags. I have removed them

mether gravatar imagemether ( 2014-05-22 00:30:20 -0600 )edit

Sorry, first time.

Jtpond gravatar imageJtpond ( 2014-05-24 00:33:07 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-05-22 03:44:44 -0600

cobra gravatar image

You may not have to reinstall. You have a few options you might want to investigate.

  • You could create a new partition in the empty space, formatting it from Linux, and add it to your filesystem through the /etc/fstab file. You could mount it as your home partition after copying your existing /home contents onto it. This would create quite a standard environment

  • If the empty space is adjacent on the disk to you existing Linux system partition, you could just expand the installed partition to include this space - take a look at the 'parted' tool (you might want a live CD version of disk tools to manipulate your system hard disk, and that's just a Google and Download away).

  • If you're Logical Volume Management for your system drives, you can use the LVM tools to either add the extra space directly to an LVM partition or create a new one and add that to the virtual disks that those drives use.

If you -must- reinstall, then use your original install media, but try to preserve your /home partition and your user and group IDs (these can be found in your '/etc/passwd' and '/etc/groups' files). If you do that your desktop environment will be completely preserved.

Either back up your /home or, if its one a separate partition, just choose to use it at install time without reformatting it. During the install re-create your users, but specify the UID and GID they had before, and the /home partition should just work within the filesystem permissions imposed by Linux.

edit flag offensive delete link more
0

answered 2014-05-22 11:08:23 -0600

gladiatr72 gravatar image

Cobra is spot on. If you're somewhat new to Fedora/Linux, you probably left things with their defaults (for the most part) on the install which means you're using LVM.

To extend your filesystem:

  • /usr/sbin/cfdisk /dev/sda

    • Create a new partition with whatever space you've freed up.
    • make note of the name of the new partition (e.g. sda2)
    • write the changes to your partition table
  • /usr/sbin/pvcreate /dev/[name of new partition from above]

  • /usr/sbin/vgs

    • this displays the list of volume groups configured on your system (most likely only one). make note of the volume group name
  • /usr/sbin/vgextend [volume group name] [name of new partition]

(almost there)

  • /usr/sbin/vgdisplay [volume group name]
    • the vg name is optional if there is only one volume group configured on your system

Towards the bottom of the output you'll have four lines dealing with PE. PE = Physical Extents; extents being defined as "the area covered by something". You'll see Size, Total, Alloc(ated) and Free PE. The number of note is that on the "Free PE" line.

The final step is to actually add your freshly minted extents to your root volume group (assuming that's where you want them--you can put them in root or home or wherever)

The proper way is to find your filesystem's mount point in /etc/fstab or /proc/mounts.

I'm lazy:

mount /
mount: /dev/mapper/vg_lilbuddyjr-root is already mount or / busy
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

lvextend -r -l +[number of Free PE from the vgdisplay output above] [path to existing logical volume as shown just above]

You'll see some mutterings about the filesystem being mounted and requiring an online resize and then it will be done, and you will have your recovered disk space back in play!

edit flag offensive delete link more

Comments

Two notes: 1. you should shrink your windows partition again to the desired size initially. 2. In the last command, you can use -l +100%FREE so that you don't need to know the number of "Free PE"s

hedayat gravatar imagehedayat ( 2014-05-23 02:11:14 -0600 )edit

Didn't work.... It screwed up grub and I ended up having to uninstall Fedora completely.... Oh well...

Jtpond gravatar imageJtpond ( 2014-05-27 17:05:40 -0600 )edit

Question Tools

Stats

Asked: 2014-05-21 23:14:54 -0600

Seen: 222 times

Last updated: May 22 '14