Ask Your Question
3

How do I upgrade to a larger hard drive?

asked 2013-09-04 10:05:24 -0500

ZedGama3 gravatar image

updated 2013-09-05 07:59:44 -0500

FranciscoD_ gravatar image

I'm running Fedora 19 and want to move my installation over to a larger hard drive. The current drive has two partitions, /boot and an lvm2 partition. I'm not familiar with lvm2, but somehow that is divided into / and /home.

While I have worked with Linux off and on for many years. However, I'm not very familiar with some of the advanced / new features. Any help or advice is greatly appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-09-04 11:36:31 -0500

Jann5s gravatar image

updated 2013-09-04 11:46:13 -0500

This is not too difficult, and the steps are equal for all linux distributions. In general there are three things you need to accomplish:

  1. Move the Operation System (OS) files to the new partition
  2. Change configuration
  3. Make the new partition bootable

Step 1: moving files

  1. Boot your pc with a linux liveCD, for instance the fedora liveCD
  2. Mount the source (oldroot) and target (newroot) partitions
    • mkdir /oldroot
    • sudo mount /dev/sdXX oldroot
    • mkdir /newroot
    • sudo mount /dev/sdYY newroot
    • substitute sdXX and sdYY with the correct partition names, e.g. sda1, sdb2
  3. Copy the files
    • cp -av /oldroot/* /newroot

Step 2: configuring the OS

Actually you only need to update the /etc/fstab file and update the device names of the various partitions, especially the / partition

Step 3: making the new OS bootable

These steps depend a lot on your particular situation. (See the GRUB2 manual section)

  • If you keep the old drive, and keep the /boot partition, than you can just update the bootloader config (grub.cfg) and add an entry for you new OS partition
  • If you remove the old drive / or want to point the BOIS/EFI to boot the new drive directly, then you need to install grub to the new drive, the steps are discussed a lot on this website, for instance in this question
  • Or any other situation you may prefer

See also:

edit flag offensive delete link more

Comments

1

I'm familiar with standard partitions, but I've never worked with LVM. Is there a link on how to properly create and setup these partitions? Some of the documents I've read refer to an app called system-config-lvm; however I cannot find it anywhere on my system or using yum provides system-config-lvm.

ZedGama3 gravatar imageZedGama3 ( 2013-09-04 21:01:41 -0500 )edit
1

Nevermind, I believe I found the answer on another site and it appears to be even easier. I'd post a link, but I don't have enough karma. Thanks for the wonderfully worded response btw.

ZedGama3 gravatar imageZedGama3 ( 2013-09-04 21:18:43 -0500 )edit

Couldn't it all be handled by simply doing a complete disk image in Clonezilla and restoring it to the new drive?

Bucic gravatar imageBucic ( 2013-09-05 06:27:28 -0500 )edit

@Bucic Sure, cloning works, but that would only replace step 1, step 2 and 3 are still required.

Jann5s gravatar imageJann5s ( 2013-09-05 06:44:51 -0500 )edit

@Jann5s That's what bothers me - AFAIR when I upgraded my HDD I just throwed the image onto my new drive and it all worked. Maybe I was not using LVM back then...

Bucic gravatar imageBucic ( 2013-09-05 07:01:55 -0500 )edit
0

answered 2013-11-12 14:21:59 -0500

lzap gravatar image

Or you can use fsarchiver tool which can help you to backup and then restore safely. It's in Fedora, just install the tool and read the man page.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-09-04 10:05:24 -0500

Seen: 6,984 times

Last updated: Nov 12 '13