Guidance on moving Installation to a new drive

Hello, I am looking for some advice on how to proceed with migrating to a new drive. I initially setup bazzite as dual boot and am no longer running windows. I've started to move my current installation from a ssd to my nvme drive and believe I am confused with how bazzite manages the file structure. I was able to replicate the partitions for /boot and /boot/efi, update fstab and grub and boot from there. Next I tried to boot into a live usb, mount the file systems, create btrfs subvolumes and copy over the data. However when I booted again the systemcame back up fine but the structure isn'| how I expected and I am not sure what I am missing. Attached is the output from lsblk My goal is to move everything from /dev/sda4 to /dev/nvme0n1p3
No description
13 Replies
HikariKnight
HikariKnightβ€’4d ago
usually people would just clone the drive with clonezilla however since you seem to have done some work yourself (and are willing to check if this works if you have copied the efi files and boot files to the new partitions) i think you can transfer the btrfs subvolumes with btrfs send and receive havent used it in ages though so i forgot the syntax for it no idea if it will produce a usable system, if you want something that is guaranteed to work just clone the disk to the new disk and just remove windows and resize the partitions (and delete the microsoft bootloader) seems like since this is a system partition you will have to do the btrfs send/receive from a live usb. i say just clone the disk or partitions using clonezilla instead then
Count Mancy
Count MancyOPβ€’4d ago
Thanks for the response! I might mess around with it a bit longer and if i can"t get it I'll try clonezilla
HikariKnight
HikariKnightβ€’4d ago
i would recommend the clonezilla approach, forgot that manually making the paritions means that bazzite on the new disk wont boot because the uuids are all wrong for the partitions and to add the new uuids you need to be able to boot into at least emergency mode to fix the fstab, which you cant since it wont find the disk with the old uuid for the system partition and boot partition and stuff
Count Mancy
Count MancyOPβ€’4d ago
yup where I left it earlier this morning was on the live usb i had created btrfs subvols for var, home, and root and used rsync to transfer the data. In fstab I swapped the uuid's over and was able to boot. I am just unsure what is still mounting /sysroot/ostree/deploy/default/var, /usr, /etc, /, and /sysroot to the original drive
HikariKnight
HikariKnightβ€’4d ago
that method will break selinux labels worst case, system wont boot and you cant recover it (from the new disk, old disk will still be fine unless you deleted it)
Count Mancy
Count MancyOPβ€’4d ago
I thought it might break selinux, figured I'd cross that bridge if I came to it πŸ˜†
HikariKnight
HikariKnightβ€’4d ago
yeah you wont cross it essentially the way you edited the file is the same as adding init=/bin/bash to the kernel args which put you into a root shell mess with files from here like the fstab and you might break the selinux label on fstab meaning worst case system wont boot at all and how to repair it? well you need too boot into the system and apply the correct label... oh wait :clueless:
HikariKnight
HikariKnightβ€’4d ago
Booting to Rescue & Emergency Mode - Bazzite Documentation
Bazzite is a custom image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices.
HikariKnight
HikariKnightβ€’4d ago
Given this safeguard, this improved rescue & emergency method is just as secure as setting init=/bin/bash, etc. Plus, it is less likely a user will damage SELinux labels using this method.
Given this safeguard, this improved rescue & emergency method is just as secure as setting init=/bin/bash, etc. Plus, it is less likely a user will damage SELinux labels using this method.
i say clone the disk then reorg the partitions, much safer and less hassle
Count Mancy
Count MancyOPβ€’4d ago
Yeah, I've had my fun but Im over juggling disks for the moment. Just curious would touching .autorelabel help at all if modifications are made from the root shell?
HikariKnight
HikariKnightβ€’4d ago
cant autorelabel atomic systems because / is read-only and if you somehow managed to make the file, you would autorelabel forever since you cant remove the file
Count Mancy
Count MancyOPβ€’4d ago
Ahhhhhhh
HikariKnight
HikariKnightβ€’4d ago
this is why breaking selinux labels outside of emergency mode or the system already being booted is very dangerous πŸ˜„
Want results from more Discord servers?
Add your server