I have Fedora and Windows installed in the same drive in my laptop. The drive has 512GB and it’s divided so that each OS has 256GB. Fedora’s partition is encrypted using the option it shows in its installer.

Problem is I’m running out of space. I’m considering getting a 1TB drive on which I would move Fedora and then giving Windows the other drive, so on the whole the laptop would run Windows on the 512GB drive and Fedora on the 1TB one. I’ve already read lots of forums but am still unsure on how to do this without losing any data and messing with Grub (I’ve had some bad experiences previously). So any help would be appreciated.

18 points

Can’t you just clone the entire disk to a bigger one and then enlarge the partitions you want enlarged ?

permalink
report
reply
0 points

If you do that youll have to also update the uuids in /etc/fstab to match the new drive.

permalink
report
parent
reply
2 points

Ah yes but that’s it AFAIK

permalink
report
parent
reply
3 points
*
Deleted by creator
permalink
report
parent
reply
1 point

Theyre gonna have to recreate the partitions anyway since I believe they stated they are not keeping windows.

permalink
report
parent
reply
1 point

Only if you delete the partitions and create them new on the same blocks.

If you enlarge them, you should be fine.

permalink
report
parent
reply
8 points
*

I did this exact thing with my server. Fully encrypted with a boot partition on a USB.

Clonezilla from my encrypted SSD to another (you can also decrypt it with clonezilla before the copy if you want)

Expanded the LVM volumes

Viola, 120GB to 500GB. Spun up the docker containers and everything just worked again

permalink
report
parent
reply
1 point

This is the first thing I thought. However I’m concerned about grub not recognising my partitions and causing my laptop to basically not boot. Did you have any problem with this? Also, if you copied the encrypted drive and kept it encrypted, was there any change you had to do?

permalink
report
parent
reply
3 points

Replace the ssd in your laptop and install fedora, set it up with the same user account name and password as your old setup. Then cp -rvp your home directory from the old drive into your newly created home dir (best to do this from your old install and make sure the uid matches with your old one) on the new ssd. Pick and choose what /etc configs you want to save etc.

Youll have to reinstall whatever applications you use. There may be some issues with KDE stuff or other config tweaks youll need to do but you should be fine.

You could attempt to clone your entire rootfs but its generally better to start fresh if you can.

permalink
report
reply
-1 points
*

look up btrfs send and receive. you’ll be copying data from the old disk to the new. prior to that you create the same layout on the new disk (efi, boot, btrfs with LUKS, subvolumes root and home). sadly, there aren’t any readymade solutions that do this for you. big time NO on clonezilla and friends.

permalink
report
reply
1 point
*

Thanks for your answer. Would Grub still see everything as usual or is any change needed too? Also how would I go about having the same exact layout? Use the Fedora Installer on the new drive and put the same password for encryption, creating the same partitions and giving them the same size?

big time NO on clonezilla and friends.

Can you explain? Another comment recommended clonezilla. I remember reading something like this, but knowing more would be nice.

permalink
report
parent
reply
2 points

CZ and dd and other “it’s 1998” tools copy the entire disk. like, you clone a 500 GB SSD with 50 GB used to another disk, guess how much data gets copied? correctomundo, the entire 500 gigs. that’s not super-healthy for the new drive and it recreates the same volume UUIDs on the target disk as the source drive, so you’re left with a mess if you keep both drives in a system.

you have a modern tool at your disposal, the mentioned btrfs send subvol | btrfs receive subvol that copies only what’s used. GRUB (you can use this opportunity to switch to systemd-boot) won’t pick up shit, you need to install it to the new drive (and remove it from the old one).

eons ago, macOS had the SuperDuper! tool, a free utility that clones the entire disk, resizing the partition in the process and copies only the data and it does that from within the OS, no booting off USB installers and such. sad to say, nothing close exists over here, you’ll just have to get good at doing things manually.

permalink
report
parent
reply
1 point
*

I see, I like this approach. However as Fedora installs Grub (and I don’t want to have a headache), I think I’ll stick with it. Thanks for sharing all your knowledge!

permalink
report
parent
reply
2 points

Instead of trying to clone, it may be easier to:

  • Install Fedora to new drive
  • Reinstall any packages you modified from base install
  • Copy over your home directory including hidden directories, plus /etc
permalink
report
reply
1 point

There are several ways of doing this, but you have to be wary of how grub is configured to boot off the disks, and how your /etc/fstab is configured.

The simplest way probably is to just put the old ssd in a USB case, boot off a live usb/cd, then dd the disk (make sure you do it the right way around or there will be tears), then reboot. There are a couple ways this could fail still depending on config, but you can always put the old disk in if it does. Then once you’re in the system you can use tools like parted/kde partition manager to resize the volumes once decrypted. – And you will have your old disk as a backup the entire process.

If you want to get more comfortable with this type of work install arch / gentoo and you will learn more of the underline processes making you more confident.

permalink
report
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8K

    Monthly active users

  • 3.7K

    Posts

  • 48K

    Comments