I’m looking to upgrade drives on two of my machines. My server running ubuntu has a 3.5" and will be getting a larger capacity HDD, while my personal computer running endeavor OS will be going from a 2.5" ssd to an nvme drive. (Not sure if it helps giving the drive types, but can’t hurt).

I’m fine with a clean install and reinstalling everything, but to save some time I’d of course like to minimize the effort that goes into it (importing settings etc). Any tips/tricks for either? Thanks in advance

11 points
*

If you don’t want to reinstall the OS, you can probably use Clonezilla: https://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/03_Disk_to_disk_clone

Maybe you need to update the drive ids for your bootloader (grub) afterwards, not sure about that.

Edit: Maybe the advanced “-g auto” option does that for you.

permalink
report
reply
3 points

Clonezilla can also update grub. Last time I upgraded system drive I had to do nothing.

permalink
report
parent
reply
3 points

This is looking like a good option, thanks!

permalink
report
parent
reply
3 points
*

Try Foxclone. I prefer it over Clonezilla.

https://foxclone.org/

permalink
report
parent
reply
3 points

Why do you prefer it?

permalink
report
parent
reply
6 points

Set up a proper backup system for your server. I like to use borg. Just to be safe, make a copy of your drive as well (like full disk rsync). Then do a clean install and restore as if your drive had failed. If your backups missed anything, you will now know and can fix your backup system and can still recover from your rsync’d drive.

You might also want to take this opportunity to start administering your server with code, like using ansible or other remote provisioning tools. This makes your system configuration reproducible so that you only really need to back up a few kinds of data like media files or databases.

permalink
report
reply
2 points

I just do clean installs anymore not a lot to do with Linux as vs Windows, Linux takes me like 30 mins to setup as vs Windows can take hours.

permalink
report
reply
7 points

When I’ve needed to transfer data over to a new disk, I’ve used gparted from a live usb to copy/paste partitions directly. Once that’s done, you’ll probably need to update /etc/fstab to point to the new drives and run update-grub (assuming you are using grub) to update the bootloader config.

permalink
report
reply
7 points
*

dd then resize the fs?

Edit: one caveat here I forgot: if your fstab is using UUIDs, you’re going to have to update that, since the new drive won’t be the same UUID because, well, it’s not the same drive.

permalink
report
reply
3 points

Any help with the acronyms? I’m still pretty new to Linux

permalink
report
parent
reply
4 points

two commands: dd and resize2fs, assuming you’re using ext4 and not something more exotic.

one makes a block-level copy of one device to another like so: dd if=/dev/source-drive of=/dev/destination-drive

the other is used to resize the filesystem from whatever size it was, to whatever size you tell it (or the whole disk; I’d have to go read a manpage since it’s been a bit)

the dd is completely safe, but the resize2fs command can break things, but you’d still have the data on the original drive, so you could always start over if it does - i’d unplug the source drive before you start doing any expansion stuff.

permalink
report
parent
reply
7 points

dd is completely safe.

Only if you have the correct args and device names. Make a backup if you want to do it from the command line and aren’t feeling 100% confident.

permalink
report
parent
reply
1 point

Thanks, that’s really helpful. It can be hard to tell between commands and acronyms in conversation with familiarity

permalink
report
parent
reply
2 points

Absolutely this. Relatively quick and clean, no messing with installation or reconfiguration. That is, assuming your data isn’t completely corrupted and the old drive doesn’t just outright fail during transfer… But if that happens you were screwed to begin with.

permalink
report
parent
reply
2 points

The old drives are fine, just either too small or too slow, so it sounds like it may be an option

permalink
report
parent
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