Moving root directory to drive containing /boot/efi

Hello. I apologize if this has already been asked. I’ve done some research into moving my Manjaro install but I can’t seem to find anything on my specific situation.

I currently have a NVMe SSD (/dev/nvme0n1) with 3 partitions:

  • A 480MB ntfs partition (/dev/nvme0n1p1)
  • A 500MB fat32 partition mounted as /boot/efi (/dev/nvme0n1p2)
  • A 930GB Windows partition (/dev/nvme0n1p3, A window install no longer being used. This is the partition I would like to wipe and move my Manjaro root directory to)

My Manjaro root directory is at /dev/sdb4 on a separate, 1TB HDD (mounted as /).

I believe my boot is set up this way because I was formerly dual-booting Windows and Manjaro with the NVMe drive.

What I think I need to do based on what I’ve read:

  1. Format the /dev/nvme0n1p3 partition to ext4 using GParted

  2. Run

sudo dd if=/dev/sdb4 of=/dev/nvme0n1p3 bs=64K conv=noerror,sync

to copy the files.

  1. Generate a UUID with uuidgen

  2. Run

sudo tune2fs /dev/nvme0n1p3 -U <uuid from uuidgen>
  1. Mount /dev/nvme0n1p3 to /mnt/new, navigate to /mnt/new/etc/fstab and change the UUID of / to this new UUID
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=5434-6658                            /boot/efi      vfat    umask=0077 0 2
UUID=<new uuid> /              ext4    defaults,noatime 0 1

Where I’m confused is, will this go smoothly with /boot/efi on the same drive? Is this the correct command to run to get grub working on the NVMe drive?

sudo grub-install /dev/nvme0n1p3

Do I need to get rid of that first partition on the NVMe drive? CAN I just get rid of it?

I just don’t want my system to be set alight.

Thanks for the help.

good so far

I disagree.
Why dd when you can simply copy?

Instead, format it properly to ext4
mount it somewhere
and then simply copy
using cp or rsync
everything from the hdd to the new nvme partition

adjust /etc/fstab

then you may need to use a live system to chroot and reinstall the boot loader
but I don’t think so
since the boot loader is already installed

All that has changed is the location of the / directory.
This needs to be reflected in /etc/fstab


That’s a complicated recipe for disaster.

Why not just backup and/or keep safe your current user’s home folder and files, and then just install Manjaro fresh to the NVMe? Don’t touch your 1TB HDD.

Later, you can safely mount /home to point to your existing home directory on your 1 TB HDD. (You’ll likely have to move your old “home” directory down one “level”, since otherwise it will be “nested”.)

1 Like

dd is no good tool to copy files !

It will destroy the format of nvme0n1p3 and replace it with the format of sdb4. This may work only when sdb4 has exactly the same size as nvme0n1p3 (but i would not accept the risk).

Use copy, or even better, use rsync

And dont forget to correct your UEFI bootentry, ==> grub.cfg and ==> /etc/fstab ,