Jump to content

Solus linux,when I have to move it to another drive?

Is there a way to clone exacly how is everything the same easily? Like would a snapshot util do it, if so I have to get 1?

MSI Performance Gaming AMD Ryzen 1st and 2nd Gen AM4 M.2 USB 3 DDR4 HDMI Display Port Mini-ITX Motherboard (B450I Gaming Plus AC), AMD Ryzen 7 2700 4.1 GHz, TEAMGROUP T-Force Vulcan Z DDR4 16GB (2 x 8GB) 3200MHz (PC4 25600) Ram, EVGA GeForce RTX 3060 Ti XC Gaming, 08G-P5-3663-KL, 8GB GDDR6, Metal Backplate, LHR
Link to comment
Share on other sites

Link to post
Share on other sites

boot a live usb with both drives inserted and use DD to clone it.

dd if=/dev/sda of=/dev/sdb

 

use "fdisk -l" to get the drive paths

Link to comment
Share on other sites

Link to post
Share on other sites

If the root partition is very large but mostly empty - or, in case you want to change the file system (there could be several other reasons, too), you might want to use rsync instead of dd. See: Rsync#Full_system_backup (the link is in Arch wiki but rsync is a very basic utility which can be found in any Linux distributions and other OSes too). Using dd, you are going to waste time by copying all empty blocks too (and need to resize the FS afterwards in case the partitions are not the same size etc.). You don't really need to do a block-to-block copy of a rootFS in any case, so rsync is a more sensible option in this use case overall, but dd will work too, preserve UUIDs etc. - speaking of which - remember to check and update fstab afterwards!

 

You can even write a script to make an Apple Timemachine -like functionality (conversely: Timemachine uses the same idea as this kind of scripts have done). See some examples on the same page.

Edited by Wild Penquin
Link to comment
Share on other sites

Link to post
Share on other sites

I just wish a GUI easy to use util existed to do all this, seems like Solus would have something in the repo. Disks will make a image, I can just install that onto the new drive right?

 

SDB1 swap

SDB2 /

SDB4 Home

MSI Performance Gaming AMD Ryzen 1st and 2nd Gen AM4 M.2 USB 3 DDR4 HDMI Display Port Mini-ITX Motherboard (B450I Gaming Plus AC), AMD Ryzen 7 2700 4.1 GHz, TEAMGROUP T-Force Vulcan Z DDR4 16GB (2 x 8GB) 3200MHz (PC4 25600) Ram, EVGA GeForce RTX 3060 Ti XC Gaming, 08G-P5-3663-KL, 8GB GDDR6, Metal Backplate, LHR
Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, Edward78 said:

I just wish a GUI easy to use util existed to do all this, seems like Solus would have something in the repo.

There are many GUI backup utilities for Linux distributions, which can be found via Google or other search engines (more correctly: frontends to the underlying GNU utilities, most probably rsync for vast majority of them, but they could use other mechanisms too).

 

The fact there are many is also a problem; because of that it is difficult to give recommendations, as user experiences are more sparse for any single utility (and I personally have none). For (example) OS X Users, things are simpler and quite different: there's Time Machine, everyone uses it and everyone can recommend it.

 

On Linux, things are more diverse and there are many options; and many people opt to not do their backups via a GUI. There is a clear advantage: one can restore (and make) the backups despite not having a GUI, for example if the GUI breaks down, or from a different distribution, live USB image, or even a different OS (OS X or quite probably even Windows, if filesystem drivers and GNU utilities are installed via cygwin).

17 hours ago, Edward78 said:

Disks will make a image, I can just install that onto the new drive right?

 

SDB1 swap

SDB2 /

SDB4 Home

I'm not sure what you are trying to say here.

Link to comment
Share on other sites

Link to post
Share on other sites

19 hours ago, Edward78 said:

Disks will make a image, I can just install that onto the new drive right?

 

SDB1 swap

SDB2 /

SDB4 Home

I'm not sure what you are trying to say here.

 

Those are my partitions.

 

MSI Performance Gaming AMD Ryzen 1st and 2nd Gen AM4 M.2 USB 3 DDR4 HDMI Display Port Mini-ITX Motherboard (B450I Gaming Plus AC), AMD Ryzen 7 2700 4.1 GHz, TEAMGROUP T-Force Vulcan Z DDR4 16GB (2 x 8GB) 3200MHz (PC4 25600) Ram, EVGA GeForce RTX 3060 Ti XC Gaming, 08G-P5-3663-KL, 8GB GDDR6, Metal Backplate, LHR
Link to comment
Share on other sites

Link to post
Share on other sites

Yes, I can see that. I should have been more specific, it was the sentence before them which I did not understand.

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/22/2020 at 12:48 PM, Wild Penquin said:

Yes, I can see that. I should have been more specific, it was the sentence before them which I did not understand.

Disks will make a image, I can just install that onto the new drive right?


 I mean the .ISO it makes, will it install on a empty drive as a clone?

MSI Performance Gaming AMD Ryzen 1st and 2nd Gen AM4 M.2 USB 3 DDR4 HDMI Display Port Mini-ITX Motherboard (B450I Gaming Plus AC), AMD Ryzen 7 2700 4.1 GHz, TEAMGROUP T-Force Vulcan Z DDR4 16GB (2 x 8GB) 3200MHz (PC4 25600) Ram, EVGA GeForce RTX 3060 Ti XC Gaming, 08G-P5-3663-KL, 8GB GDDR6, Metal Backplate, LHR
Link to comment
Share on other sites

Link to post
Share on other sites

There's not going to be any sort of utility where you can like, turn your current OS into an .iso you can "install" onto a new drive, which seems to be what you're asking. There's no way to do that on any OS. 

 

However, the utility you're probably thinking of is called Timeshift. It's not in Solus's repos (because Solus's repos are terrible and that's why I don't use Solus), but it's not hard to install. Anyway, you can create a snapshot, then connect the drive you want to be your new disk for the root partition, mount it, and then open timeshift, click the snapshot, and then click "Restore snapshot," and click the dropdown for /, and select the new drive.

 

Or, you can just do what anyone in their right mind would do, and use rsync. 

sudo mkdir /mnt/newroot && sudo mount /dev/sdXY /mnt/newroot

sudo rsync -aAXHv --exclude={"/home/*","/var/*","/tmp/*","/sys/*","/proc/*","/mnt/*","/media/*","/dev/*","/srv/*","/run/*"} /* /mnt/newroot/

 

Where you change /dev/sdXY to whatever the new partition is. You will now have your root directory now on the new drive. 

 

Then, for /home, you do the same thing. Only this is a bit easier. 

sudo mkdir /mnt/newhome && sudo mount /dev/sdXX /mnt/newhome

sudo rsync -aAXHv /home/* /mnt/newhome/

 

Now, all you need to do is get the UUIDs for the new partitions, and fix grub to point to those. Because no matter what solution you use, you will definitely have to do that. Even your magical "install my OS onto an .iso I can then 'install' onto a new drive" would require editing /mnt/newroot/etc/fstab. Basically you'd run 

 

sudo blkid

 

and copy the UUID for the new root partition, and paste it where the / partition is in /mnt/newroot/etc/fstab, removing the old UUID. Do the same for your /home partition. Remove the old drive, replace it with the new one, or whatever you're doing, and you're good to go. I've done this numerous times, moving from a shitty Crucial BX500 240GB DRAM-less SSD to a Samsung 860 QVO SATA SSD and then finally a TeamGroup MP34 NVME SSD, plus numerous times before that. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×