How do I migrate `/` and `/home` from one device to a *prior* device?
## Background
I'm tweeking a recent installs partition setup. I no longer want the swap partition I started with.
Here is my partially updated disk configuration:
Note: `sda2` used to be the swap partition.
## So far
I've formatted `sda2` as `btrfs`. This is the same filesystem as `sda3` where `/` and `/home` are.
I've rsync'd everything I think I need from `sda3` over to `sda2`.
## Next steps?
I believe I need to make changes to `grub` and `/etc/fstab` next. I haven't found anything solid in my web searches that I feel confident won't break my setup.
Here is `/etc/fstab`,
Note: I haven't updated `fstab` yet, beyond commenting out the original `swap` line.
Note: the original install has the separate `/boot` partition.
## The goal(s)
- Boot from the replicated device `sda2`
- then I can delete the old `/` and `/home` on `sda3`
- then I can merge `sda2` and `sda3`
Thanks for any help!
## Background
I'm tweeking a recent installs partition setup. I no longer want the swap partition I started with.
Here is my partially updated disk configuration:
Code:
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTSsda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 285M 0 part /boot/efi├─sda2 8:2 0 16.1G 0 part └─sda3 8:3 0 449.4G 0 part /home /
## So far
I've formatted `sda2` as `btrfs`. This is the same filesystem as `sda3` where `/` and `/home` are.
I've rsync'd everything I think I need from `sda3` over to `sda2`.
Code:
rsync -avPAHXx / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"}
I believe I need to make changes to `grub` and `/etc/fstab` next. I haven't found anything solid in my web searches that I feel confident won't break my setup.
Here is `/etc/fstab`,
Code:
...# <file system> <mount point> <type> <options> <dump> <pass># / was on /dev/sda3 during installationUUID=b7bdceb4-660a-4951-94cd-df9412b74f93 / btrfs rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@ 0 0UUID=b7bdceb4-660a-4951-94cd-df9412b74f93 /home btrfs rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home 0 0# /boot/efi was on /dev/sda1 during installationUUID=C0E2-7937 /boot/efi vfat umask=0077 0 1# swap was on /dev/sda2 during installation# UUID=d23ef0d1-b4bd-4d7a-bb4a-f3bc0f41f5d2 none swap sw 0 0/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
Note: the original install has the separate `/boot` partition.
## The goal(s)
- Boot from the replicated device `sda2`
- then I can delete the old `/` and `/home` on `sda3`
- then I can merge `sda2` and `sda3`
Thanks for any help!
Statistics: Posted by eljfe — 2024-06-21 01:43 — Replies 1 — Views 24