{"id":20136,"date":"2024-02-19T22:23:47","date_gmt":"2024-02-19T19:23:47","guid":{"rendered":"https:\/\/kifarunix.com\/?p=20136"},"modified":"2024-03-10T15:58:15","modified_gmt":"2024-03-10T12:58:15","slug":"how-to-move-linux-os-installation-to-another-drive","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-move-linux-os-installation-to-another-drive\/","title":{"rendered":"How to Move Linux OS Installation to Another Drive"},"content":{"rendered":"\n<figure data-wp-context=\"{&quot;uploadedSrc&quot;:&quot;https:\\\/\\\/kifarunix.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/migrate-linux-os-to-new-drive.png&quot;,&quot;figureClassNames&quot;:&quot;wp-block-image size-full&quot;,&quot;figureStyles&quot;:null,&quot;imgClassNames&quot;:&quot;wp-image-20172&quot;,&quot;imgStyles&quot;:null,&quot;targetWidth&quot;:1046,&quot;targetHeight&quot;:585,&quot;scaleAttr&quot;:false,&quot;ariaLabel&quot;:&quot;Enlarge image: How to Move Linux OS Installation to Another Drive&quot;,&quot;alt&quot;:&quot;How to Move Linux OS Installation to Another Drive&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1046\" height=\"585\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/migrate-linux-os-to-new-drive.png?v=1708370331\" alt=\"How to Move Linux OS Installation to Another Drive\" class=\"wp-image-20172\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/migrate-linux-os-to-new-drive.png?v=1708370331 1046w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/migrate-linux-os-to-new-drive-768x430.png?v=1708370331 768w\" sizes=\"(max-width: 1046px) 100vw, 1046px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image: How to Move Linux OS Installation to Another Drive\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"context.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"context.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p>Have you ever wondered if you could move Linux OS installation to another drive? Well, yes, that is definitely possible. Moving a Linux installation to another drive involves copying the existing system files and updating the bootloader configuration on the new drive.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#migrating-linux-os-installation-to-another-drive\">Migrating Linux OS Installation to Another Drive<\/a><ul><li><a href=\"#why-move-linux-os-to-another-drive\">Why Move Linux OS to Another Drive?<\/a><\/li><li><a href=\"#backup-your-linux-system-data\">Backup your Linux System Data<\/a><\/li><li><a href=\"#confirm-drive-sizes\">Confirm Drive Sizes<\/a><\/li><li><a href=\"#create-bootable-usb-with-a-live-iso-of-your-preferred-linux-distro\">Create Bootable USB with a Live ISO of your Preferred Linux Distro<\/a><\/li><li><a href=\"#boot-your-current-linux-system-from-the-live-cd-usb\">Boot your Current Linux System from the Live CD\/USB<\/a><\/li><li><a href=\"#detach-new-system-drive-attach-your-current-linux-system\">Detach New System Drive Attach your Current Linux System<\/a><\/li><li><a href=\"#create-partitions-on-the-new-drive\">Create Partitions on the New Drive<\/a><ul><li><a href=\"#check-available-drives\">Check available drives<\/a><\/li><li><a href=\"#confirm-the-partitions-and-partition-scheme\">Confirm the Partitions and Partition Scheme<\/a><\/li><li><a href=\"#is-the-drive-luks-encrypted\">Is the Drive LUKS encrypted?<\/a><\/li><li><a href=\"#create-partitions-on-new-drive\">Create Partitions on New Drive<\/a><\/li><li><a href=\"#is-the-luks-drive-using-lvm\">Is the LUKS Drive using LVM?<\/a><\/li><li><a href=\"#create-filesystems-on-the-partitions\">Create Filesystems on the Partitions<\/a><\/li><\/ul><\/li><li><a href=\"#move-linux-os-to-another-drive\">Move Linux OS to Another Drive<\/a><ul><li><a href=\"#mount-old-and-new-drives\">Mount Old and New Drives<\/a><\/li><li><a href=\"#clone-the-linux-os-to-new-drive\">Clone the Linux OS to new Drive<\/a><\/li><li><a href=\"#install-grub-bootloader\">Install GRUB Bootloader<\/a><\/li><li><a href=\"#update-the-filesystem-table-fstab\">Update the Filesystem Table (FSTAB)<\/a><\/li><li><a href=\"#update-luks-crypt-table\">Update LUKS Crypt Table<\/a><\/li><li><a href=\"#update-initramfs\">Update Initramfs<\/a><\/li><li><a href=\"#update-grub\">Update GRUB<\/a><\/li><li><a href=\"#exit-chroot-and-reboot-the-system\">Exit Chroot and Reboot the System<\/a><\/li><li><a href=\"#poweroff-the-system\">Poweroff the System<\/a><\/li><li><a href=\"#power-on-the-system-and-confirm-if-all-is-good\">Power on the System and Confirm if all is good<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"migrating-linux-os-installation-to-another-drive\">Migrating Linux OS Installation to Another Drive<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-move-linux-os-to-another-drive\">Why Move Linux OS to Another Drive?<\/h3>\n\n\n\n<p>But, why would one want to move a Linux OS installation to another drive? There could be various reasons, but some of them could be:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Upgrade or Replace Hard Drive:<\/strong>  The most common reason is to replace an existing hard drive with a larger one or upgrade to a faster drive, such as a solid-state drive (SSD).<\/li>\n\n\n\n<li><strong>Migration to a New Computer:<\/strong> If you&#8217;re getting a new computer and want to retain your existing Linux setup, moving the installation to the new drive can be a way to achieve this.<\/li>\n\n\n\n<li><strong>Disk Space Issues:<\/strong> Running out of disk space on the current drive might prompt the need to move to a larger one.<\/li>\n\n\n\n<li><strong>Performance Improvement:<\/strong> Switching to a faster drive type, like moving from an HDD to an SSD, can significantly improve system performance.<\/li>\n\n\n\n<li><strong>Backup and Recovery:<\/strong> Moving the installation to a different drive can be part of a backup and recovery strategy, especially if you&#8217;re concerned about the health of your current drive.<\/li>\n\n\n\n<li><strong>Experimentation and Testing:<\/strong> Linux enthusiasts and system administrators might want to experiment with different drives or configurations for testing purposes.<\/li>\n\n\n\n<li><strong>Repartitioning and Resizing:<\/strong> If you need to repartition your drives or resize existing partitions, moving the Linux installation to a different drive allows for more flexibility.<\/li>\n\n\n\n<li><strong>Replacing Faulty Drive:<\/strong> If your current drive is failing or has bad sectors, moving the installation to a new drive can help in avoiding data loss and system instability.<\/li>\n<\/ol>\n\n\n\n<p>So for my case, I will be moving my Ubuntu OS installation from a old Laptop to a new Laptop with better performance.<\/p>\n\n\n\n<p>So, what are the steps that you can use to move Linux OS to another drive?<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Backup your current system to avoid data loss just in case things don&#8217;t go well.<\/li>\n\n\n\n<li>Ensure the new drive has same or even more disk space compared to the current drive.<\/li>\n\n\n\n<li>Create Bootable USB with a Live ISO of your preferred Linux distro. I am using Ubuntu 22.04 Live ISO here.<\/li>\n\n\n\n<li>Remove your new Laptop drive and attach to your current Linux system or vice versa. Ensure you have disk\/card reader, whether it is for SSD or HDD.<\/li>\n\n\n\n<li>Boot your current Linux system from the Live CD\/USB. This is necessary because you can&#8217;t make changes to a mounted Linux system.<\/li>\n\n\n\n<li>Create partitions on the new drive similar to the partitions on the current drive.<\/li>\n\n\n\n<li>Copy data from the current drive to the new drive<\/li>\n\n\n\n<li>Update FSTAB accordingly.<\/li>\n\n\n\n<li>Install the GRUB on the new drive.<\/li>\n\n\n\n<li>Update Initial RAM filesystem.<\/li>\n\n\n\n<li>Cross your Fingers, Reboot and confirm<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-pullquote has-small-font-size\" style=\"font-style:normal;font-weight:500\"><blockquote><p>Note, If you are using LUKS encryption on your current drive and want to retain same LUKS encryption on new drive, I suggest that before you create partitions and copy data to new drive, create LUKS on it. After that, you can now create partitions, mount it and copy data from the old\/current drive.<\/p><\/blockquote><\/figure>\n\n\n\n<p>So, let&#8217;s get into this!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"backup-your-linux-system-data\">Backup your Linux System Data<\/h3>\n\n\n\n<p>Before you can even think of attempting to play with your system disk, ensure your have your backups done and verified.<\/p>\n\n\n\n<p>You can check various backup tutorials we have;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/?s=backup\" target=\"_blank\" rel=\"noreferrer noopener\">How to backup Linux data<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"confirm-drive-sizes\">Confirm Drive Sizes<\/h3>\n\n\n\n<p>I am moving my Linux from a 256 GB SSD drive to a 256 GB Drive.<\/p>\n\n\n\n<p>My current Linux OS disk usage;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>df -hT -P \/<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>Filesystem                Type  Size  Used Avail Use% Mounted on\n\/dev\/mapper\/vgubuntu-root ext4  232G  164G   57G  75% \/\n<\/code><\/pre>\n\n\n\n<p>And it is an SSD;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk -o name,rota<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>nvme0n1                  0\n\u251c\u2500nvme0n1p1              0\n\u251c\u2500nvme0n1p2              0\n\u2514\u2500nvme0n1p3              0\n  \u2514\u2500nvme0n1p3_crypt      0\n    \u251c\u2500vgubuntu-root      0\n    \u2514\u2500vgubuntu-swap_1    0\n<\/code><\/pre>\n\n\n\n<p><code><strong>ROTA=0<\/strong><\/code>: Indicates a non-rotational device, usually a solid-state drive (SSD).<\/p>\n\n\n\n<p>As as you can see, my drive is <a href=\"https:\/\/docs.fedoraproject.org\/en-US\/quick-docs\/encrypting-drives-using-LUKS\/\" target=\"_blank\" rel=\"noreferrer noopener\">LUKS<\/a> encrypted! See lsblk output, <strong>nvme0n1p3_crypt<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-bootable-usb-with-a-live-iso-of-your-preferred-linux-distro\">Create Bootable USB with a Live ISO of your Preferred Linux Distro<\/h3>\n\n\n\n<p>As already mentioned, I am using Ubuntu 22.04 Live ISO burnt into a bootable USB drive.<\/p>\n\n\n\n<p>I used <strong>dd<\/strong> command to create a bootable USB drive with live Ubuntu 22.04;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>NAME                  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT\nsda                     8:0    1   7.5G  0 disk  \n\u2514\u2500sda1                  8:1    1   7.5G  0 part \n<\/code><\/pre>\n\n\n\n<p>Create bootable Live USB!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dd bs=1M if=\/media\/kifarunix\/vol02\/ubuntu-22.04-desktop-amd64.iso of=\/dev\/sda1 status=progress oflag=sync<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"boot-your-current-linux-system-from-the-live-cd-usb\">Boot your Current Linux System from the Live CD\/USB<\/h3>\n\n\n\n<p>With live bootable USB attached to your current Linux system (<em>we assume this is the system that has our current Linux OS installation<\/em>):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Power it off<\/li>\n\n\n\n<li>Boot to bios to update the boot order. Set the bootable USB as the first one to boot from.<\/li>\n\n\n\n<li>Save the changes and boot your new system to live OS.<\/li>\n\n\n\n<li>When the live OS boots, choose <strong>Try Ubuntu<\/strong> (<em>remember we are using an Ubuntu live image here<\/em>) and proceed to boot into it.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"detach-new-system-drive-attach-your-current-linux-system\">Detach New System Drive Attach your Current Linux System<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Poweroff the system with your new drive.<\/li>\n\n\n\n<li>Once it is off, detach the drive (how to remove a drive varies from system to system. Use Youtube videos to check how to detach a drive on your respective Laptop model).<\/li>\n\n\n\n<li>After you have removed the drive, attach it to current Laptop (now running in Live ISO) via a card\/drive reader.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-partitions-on-the-new-drive\">Create Partitions on the New Drive<\/h3>\n\n\n\n<p>You need to create partitions on the new system&#8217;s drive similar to the partitions on the current Linux OS installation drive.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"check-available-drives\">Check available drives<\/h4>\n\n\n\n<p>Now, that we have attached our current Linux OS installation drive to new Laptop, let&#8217;s confirm the drives from the Live OS!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo su -<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk | grep -iv loop<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS\nsda           8:0    1   7.5G  0 disk \n\u251c\u2500sda1        8:1    1   4.7G  0 part \/cdrom\n\u251c\u2500sda2        8:2    1   4.9M  0 part \n\u251c\u2500sda3        8:3    1   300K  0 part \n\u2514\u2500sda4        8:4    1   2.8G  0 part \/var\/crash\n                                      \/var\/log\nsdb           8:16   0 238.5G  0 disk \/media\/ubuntu\/SSD\nnvme0n1     259:0    0 238.5G  0 disk \n\u251c\u2500nvme0n1p1 259:1    0   512M  0 part \n\u251c\u2500nvme0n1p2 259:2    0   732M  0 part \n\u2514\u2500nvme0n1p3 259:3    0 237.3G  0 part\n<\/code><\/pre>\n\n\n\n<p>Where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>sda<\/strong> is the bootable USB drive<\/li>\n\n\n\n<li><strong>sdb<\/strong> is the new Linux OS installation drive<\/li>\n\n\n\n<li><strong>nvme<\/strong> is the current drive with our current Linux OS installation.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"confirm-the-partitions-and-partition-scheme\">Confirm the Partitions and Partition Scheme<\/h4>\n\n\n\n<p>Confirm the partitions on the current Linux OS installation drive;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>parted \/dev\/nvme0n1 p<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Model: WDC PC SN730 SDBPNTY-256G-1101 (nvme)\nDisk \/dev\/nvme0n1: 256GB\nSector size (logical\/physical): 512B\/512B\nPartition Table: gpt\nDisk Flags: \n\nNumber  Start   End     Size   File system  Name                  Flags\n 1      1049kB  538MB   537MB  fat32        EFI System Partition  boot, esp\n 2      538MB   1305MB  768MB  ext4\n 3      1305MB  256GB   255GB\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The drive is partitioned using GPT (GUID Partition Table) partition table.<\/li>\n\n\n\n<li>It is also UEFI partition as shown by the &#8220;<strong>boot<\/strong>&#8221; and &#8220;<strong>esp<\/strong>&#8221; (EFI System Partition) flags.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"is-the-drive-luks-encrypted\">Is the Drive LUKS encrypted?<\/h4>\n\n\n\n<p>One thing to note also is that my current Linux OS installation drive is LUKS encrypted!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>blkid | grep nvme0n1<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\/dev\/nvme0n1p1: UUID=\"CF45-D10D\" BLOCK_SIZE=\"512\" TYPE=\"vfat\" PARTLABEL=\"EFI System Partition\" PARTUUID=\"2a76337e-fa5b-4def-8958-54eb2b15a2ab\"\n\/dev\/nvme0n1p2: UUID=\"6b905fe4-46c6-438e-a800-30ca9ff9f047\" BLOCK_SIZE=\"4096\" TYPE=\"ext4\" PARTUUID=\"73482e3b-d43a-4432-bb36-ce342f231b06\"\n\/dev\/nvme0n1p3: UUID=\"f36fbf36-b4e7-43d8-add5-55eb31fe92e2\" TYPE=\"crypto_LUKS\" PARTUUID=\"cb48c987-3dfa-4b6c-a413-5a45a7310ae7\"\n<\/code><\/pre>\n\n\n\n<p>As you can see, <strong>\/dev\/nvme0n1p3<\/strong> device is of type <strong><code>TYPE=\"crypto_LUKS\"<\/code><\/strong>.<\/p>\n\n\n\n<p>Swap might also be there. But until you mount the LUKS drive, you wont see it. Anyway, you can always add swap whenever you want.<\/p>\n\n\n\n<p>If you need to ensure that the new drive will also be LUKS encrypted, then you need to format it, create LUKS on it and partition it.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"create-partitions-on-new-drive\">Create Partitions on New Drive<\/h4>\n\n\n\n<p>So, let&#8217;s format the new drive with GPT partition table;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>umunt \/dev\/sdb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>parted \/dev\/sdb mklabel gpt<\/code><\/pre>\n\n\n\n<p>If you are prompted about existing data being destroyed, confirm and proceed.<\/p>\n\n\n\n<p>Create EFI partition of 512MiB similar to current Linux OS installation.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>parted \/dev\/sdb mkpart primary fat32 1MiB 513MiB<\/code><\/pre>\n\n\n\n<p>Initialize the ESP partition;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>parted \/dev\/sdb set 1 esp on<\/code><\/pre>\n\n\n\n<p>Create Boot partition. I created boot partition of 1GB, a little bit bigger than the current Linux OS installation one ;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>parted \/dev\/sdb mkpart primary ext4 513MiB 1537MiB<\/code><\/pre>\n\n\n\n<p>Create the root partition;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>parted \/dev\/sdb mkpart primary ext4 1537MiB 100%<\/code><\/pre>\n\n\n\n<p>Confirm;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>parted \/dev\/sdb p<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>Model: JMicron Generic (scsi)\nDisk \/dev\/sdb: 256GB\nSector size (logical\/physical): 512B\/4096B\nPartition Table: gpt\nDisk Flags: \n\nNumber  Start   End     Size    File system  Name     Flags\n 1      1049kB  538MB   537MB   ext4         primary  boot, esp\n 2      538MB   1612MB  1074MB               primary\n 3      1612MB  256GB   254GB                primary\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>sda           8:0    1   7.5G  0 disk \n\u251c\u2500sda1        8:1    1   4.7G  0 part \/cdrom\n\u251c\u2500sda2        8:2    1   4.9M  0 part \n\u251c\u2500sda3        8:3    1   300K  0 part \n\u2514\u2500sda4        8:4    1   2.8G  0 part \/var\/crash\n                                      \/var\/log\nsdb           8:16   0 238.5G  0 disk \n\u251c\u2500sdb1        8:17   0   512M  0 part \n\u251c\u2500sdb2        8:18   0     1G  0 part \n\u2514\u2500sdb3        8:19   0   237G  0 part \nnvme0n1     259:0    0 238.5G  0 disk \n\u251c\u2500nvme0n1p1 259:4    0   512M  0 part \n\u251c\u2500nvme0n1p2 259:5    0   732M  0 part \n\u2514\u2500nvme0n1p3 259:6    0 237.3G  0 part \n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"is-the-luks-drive-using-lvm\">Is the LUKS Drive using LVM?<\/h4>\n\n\n\n<p>You would just run the <strong>pvs<\/strong> command to check but since we are running on Live OS, then you need first unlock the LUKS drive to check.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cryptsetup luksOpen \/dev\/nvme0n1p3 dm_crypt-0<\/code><\/pre>\n\n\n\n<p>You will be prompted to enter the LUKS decryption passphrase.<\/p>\n\n\n\n<p>Once you unlock the drive, check using <strong>pvs<\/strong> or <strong>dmsetup table<\/strong> command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvs<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>  PV                     VG       Fmt  Attr PSize   PFree \n  \/dev\/mapper\/dm_crypt-0 vgubuntu lvm2 a--  237.24g 36.00m\n<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dmsetup table<\/code><\/pre>\n\n\n\n<p>Each should show you if LVM is on!<\/p>\n\n\n\n<p>Sample output of <strong><code>dmsetup table<\/code><\/strong> command.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>dm_crypt-0: 0 497534976 crypt aes-xts-plain64 :64:logon:cryptsetup:f36fbf36-b4e7-43d8-add5-55eb31fe92e2-d0 0 259:6 32768\nvgubuntu-root: 0 495460352 linear 253:0 2048\nvgubuntu-swap_1: 0 1998848 linear 253:0 495462400\n<\/code><\/pre>\n\n\n\n<p>So, if using LVM, then <strong>before<\/strong> you create the logical volumes on your new drive, you need to LUKS encrypt it first.<\/p>\n\n\n\n<p>Thus, let&#8217;s encrypt the new drive root&#8217;s partition with LUKS;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cryptsetup luksFormat \/dev\/sdb3<\/code><\/pre>\n\n\n\n<p>Be sure to keep your passphrase safe and in a place you can easily retrieve!<\/p>\n\n\n\n<p>Unlock the LUKS drive so you can create the partitions.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cryptsetup luksOpen \/dev\/sdb3 dm_crypt-1<\/code><\/pre>\n\n\n\n<p>This will add a &lt;name&gt; mapping to <code>\/dev\/mapper\/<\/code> e.g <strong>\/dev\/mapper\/nvme0n1p3_crypt<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>sdb                  8:16   0 238.5G  0 disk  \n\u251c\u2500sdb1               8:17   0   512M  0 part  \n\u251c\u2500sdb2               8:18   0     1G  0 part  \n\u2514\u2500sdb3               8:19   0   237G  0 part  \n  \u2514\u2500dm_crypt-1     253:3    0   237G  0 crypt \nnvme0n1            259:0    0 238.5G  0 disk  \n\u251c\u2500nvme0n1p1        259:4    0   512M  0 part  \n\u251c\u2500nvme0n1p2        259:5    0   732M  0 part  \n\u2514\u2500nvme0n1p3        259:6    0 237.3G  0 part  \n  \u2514\u2500dm_crypt-0     253:0    0 237.2G  0 crypt \n    \u251c\u2500vgubuntu-root\n    \u2502              253:1    0 236.3G  0 lvm   \n    \u2514\u2500vgubuntu-swap_1\n                   253:2    0   976M  0 lvm\n<\/code><\/pre>\n\n\n\n<p>You can now proceed create partitions on the new drive using the mapped device, <strong>\/dev\/mapper\/dm_crypt-1<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate  \/dev\/mapper\/dm_crypt-1<\/code><\/pre>\n\n\n\n<p>Create Volume group. Do not use the same name of the VG as the existing one!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vgcreate ubuntuvg \/dev\/mapper\/dm_crypt-1<\/code><\/pre>\n\n\n\n<p>Create logical volume using entire space. If you want, you can create swap as well.<\/p>\n\n\n\n<p>For example;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -L 1G -n swap ubuntuvg<\/code><\/pre>\n\n\n\n<p>The create root LVM using entire remaining space;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -l +100%FREE -n root ubuntuvg<\/code><\/pre>\n\n\n\n<p>Confirm the logical volumes;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvs<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>  LV     VG       Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert\n  root   ubuntuvg -wi-a----- <235.96g                                                    \n  swap   ubuntuvg -wi-a-----    1.00g                                                    \n  root   vgubuntu -wi-a-----  236.25g                                                    \n  swap_1 vgubuntu -wi-a-----  976.00m\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"create-filesystems-on-the-partitions\">Create Filesystems on the Partitions<\/h4>\n\n\n\n<p>EFI parition should be set to FAT32 and boot and root devices, set to EXT4;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.fat -F32 \/dev\/sdb1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.ext4 \/dev\/sdb2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.ext4 \/dev\/mapper\/ubuntuvg-root<\/code><\/pre>\n\n\n\n<p>Make swap!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkswap \/dev\/mapper\/ubuntuvg-swap<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"move-linux-os-to-another-drive\">Move Linux OS to Another Drive<\/h3>\n\n\n\n<p>It is now time to migrate or move your Linux OS installation to another drive.<\/p>\n\n\n\n<p>Remember, that our Linux OS installation is currently residing on the <strong>\/dev\/nvme0n1p3<\/strong> drive and we migrating it to our new system's drive, <strong>\/dev\/sdb<\/strong>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"mount-old-and-new-drives\">Mount Old and New Drives<\/h4>\n\n\n\n<p>Old here means, the drive with the Linux OS installation, <strong>\/dev\/<strong>nvme0n1p3<\/strong><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/mnt\/{sdb,nvme}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Mount the current Linux OS root partition to <strong>\/mnt\/<strong>nvme<\/strong><\/strong><\/li>\n\n\n\n<li>boot partition to <strong>\/mnt\/<strong><strong>nvme<\/strong><\/strong>\/boot<\/strong>.<\/li>\n\n\n\n<li>EFI partition to <strong>\/mnt\/<strong><strong>nvme0n1p3<\/strong><\/strong>\/boot\/efi<\/strong>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/mapper\/vgubuntu-root \/mnt\/<strong><strong>nvme<\/strong><\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/nvme0n1p2 \/mnt\/nvme\/boot\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/nvme0n1p1 \/mnt\/nvme\/boot\/efi<\/code><\/pre>\n\n\n\n<p>Similarly, mount the new drive;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/mapper\/ubuntuvg-root \/mnt\/sdb\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/mnt\/sdb\/boot<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/sdb2 \/mnt\/sdb\/boot\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/mnt\/sdb\/boot\/efi<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/sdb1 \/mnt\/sdb\/boot\/efi\/<\/code><\/pre>\n\n\n\n<p>This is how drives are mounted now!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>df -hT<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\/dev\/mapper\/vgubuntu-root   ext4     232G  163G   58G  75% \/mnt\/nvme\n\/dev\/nvme0n1p2              ext4     704M  127M  526M  20% \/mnt\/nvme\/boot\n\/dev\/nvme0n1p1              vfat     511M  6.1M  505M   2% \/mnt\/nvme\/boot\/efi\n\/dev\/mapper\/ubuntuvg-root   ext4     232G   36K  220G   1% \/mnt\/sdb\n\/dev\/sdb2                   ext4     974M   28K  907M   1% \/mnt\/sdb\/boot\n\/dev\/sdb1                   vfat     511M  4.0K  511M   1% \/mnt\/sdb\/boot\/efi\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"clone-the-linux-os-to-new-drive\">Clone the Linux OS to new Drive<\/h4>\n\n\n\n<p>Now that the partitions are created and mounted, copy the data from the old disk to new disk. To ensure that proper&nbsp;<strong>permissions<\/strong>&nbsp;and&nbsp;<strong>ownership<\/strong>&nbsp;are retained, use&nbsp;<strong><code>rsync<\/code><\/strong>&nbsp;command.<\/p>\n\n\n\n<p>You can exclude unnecessary directories such as \/tmp, \/proc, \/dev, \/sys, e.tc<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rsync -avhP --exclude={\"\/dev\/*\",\"\/proc\/*\",\"\/sys\/*\",\"\/tmp\/*\",\"\/run\/*\",\"\/mnt\/*\",\"\/media\/*\",\"\/lost+found\"} \/mnt\/nvme\/ \/mnt\/sdb\/<\/code><\/pre>\n\n\n\n<p>The rsync options,&nbsp;<code>-avhP<\/code>&nbsp;used are explained below:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-a<\/code>: Stands for \"archive\" and is used to preserve the file attributes and permissions during the synchronization. It's a shorthand for several other flags like&nbsp;<code>-rlptgoD<\/code>.<\/li>\n\n\n\n<li><code>-v<\/code>: Stands for \"verbose\" and makes&nbsp;<code>rsync<\/code>&nbsp;display detailed information about the files being copied, which can be helpful for tracking progress.<\/li>\n\n\n\n<li><code>-h<\/code>: Stands for \"human-readable\" and makes the output more easily understandable for humans by using units like \"K\" (kilobytes), \"M\" (megabytes), etc.<\/li>\n\n\n\n<li><code>-P<\/code>: Combines two options:\n<ul class=\"wp-block-list\">\n<li><code>--progress<\/code>: Displays progress information during the transfer, including the percentage of completion.<\/li>\n\n\n\n<li><code>--partial<\/code>: Allows resuming partially transferred files.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>Depending on the size of your data, this may take sometime to complete the copying!<\/p>\n\n\n\n<p>Once the data copying is done, you can confirm drives usage;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>du -hs \/mnt\/sdb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>163G\t\/mnt\/sdb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>du -hs \/mnt\/nvme\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>163G\t\/mnt\/nvme\/<\/code><\/pre>\n\n\n\n<p>All seems to be good!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-grub-bootloader\">Install GRUB Bootloader<\/h4>\n\n\n\n<p>Next install the GRUB bootloader on to the new disk. Proceed as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mount --bind \/dev \/mnt\/sdb\/dev<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount --bind \/dev\/pts \/mnt\/sdb\/dev\/pts<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount --bind \/proc \/mnt\/sdb\/proc<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount --rbind \/sys \/mnt\/sdb\/sys<\/code><\/pre>\n\n\n\n<p>If your system was on UEFI, then ensure that you mount the&nbsp;<strong><code>\/sys<\/code><\/strong>&nbsp;with&nbsp;<strong><code>--rbind<\/code><\/strong>&nbsp;option. This enables&nbsp;<strong><code>grub-install<\/code><\/strong>&nbsp;command to manipulate the EFI variables.<\/p>\n\n\n\n<p>Chroot into your system disk and install bootloader:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chroot \/mnt\/sdb\/<\/code><\/pre>\n\n\n\n<p>Run the command below to install GRUB on the specified device's boot sector or EFI System Partition (ESP) if it's an EFI system;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grub-install \/dev\/sdb<\/code><\/pre>\n\n\n\n<p>If using GRUB 2, then update the command above accordingly.<\/p>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Installing for x86_64-efi platform.\nInstallation finished. No error reported.<\/code><\/pre>\n\n\n\n<p>If you get the warnings below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>grub-install: warning: EFI variables cannot be set on this system.\ngrub-install: warning: You will have to complete the GRUB setup manually.<\/strong><\/code><\/pre>\n\n\n\n<p>Ensure&nbsp;<strong>\/sys<\/strong>&nbsp;is mounted with&nbsp;<strong>--rbind<\/strong>&nbsp;option.<\/p>\n\n\n\n<p>Verify GRUB installation;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grub-install --recheck \/dev\/sdb<\/code><\/pre>\n\n\n\n<p>Update the GRUB configuration to reflect the changes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>update-grub<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"update-the-filesystem-table-fstab\">Update the Filesystem Table (FSTAB)<\/h4>\n\n\n\n<p>FSTAB (<strong>etc\/fstab<\/strong>) defines how storage devices and partitions are mounted into the file system hierarchy at system boot.<\/p>\n\n\n\n<p>First, let's get the old system fstab configurations (note that we are still within chroot!);<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -vE \"^$|^#\" etc\/fstab<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>UUID=4713c4fd-460e-4d1f-953e-69c472907234 \/               ext4    errors=remount-ro 0       1\nUUID=8c32b607-959f-4ba0-859c-047607b8ec89 \/boot           ext4    defaults        0       2\nUUID=83A8-304C  \/boot\/efi       vfat    umask=0077      0       1\nUUID=620960b0-096e-4384-9217-2c928c9737fe none            swap    sw              0       0\n<\/code><\/pre>\n\n\n\n<p>You have to update the device UUIDS to match your new device UUIDS.<\/p>\n\n\n\n<p>You can get UUIDs using&nbsp;<strong>blkid<\/strong>&nbsp;command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>blkid | grep -E 'swap|sdb'<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\/dev\/nvme0n1p1: UUID=\"43C1-9E44\" TYPE=\"vfat\" PARTLABEL=\"primary\" PARTUUID=\"430cc037-97f6-4364-9c84-26ba9f782446\"\n\/dev\/nvme0n1p2: UUID=\"86e7c866-3199-4c5e-90cc-5c162d1f8955\" TYPE=\"ext4\" PARTLABEL=\"primary\" PARTUUID=\"f50ada98-c395-44e5-9b1b-f17576f94e5a\"\n\/dev\/nvme0n1p3: UUID=\"4709471c-9d3a-4d98-8dc5-6247bc31a366\" TYPE=\"crypto_LUKS\" PARTLABEL=\"primary\" PARTUUID=\"db703ec6-4d44-4724-ae47-6792f18aa614\"\n\/dev\/mapper\/vgubuntu--1-swap_2: UUID=\"620960b0-096e-4384-9217-2c928c9737fe\" TYPE=\"swap\"\n\/dev\/mapper\/nvme0n1p3_crypt: UUID=\"hf1lmF-3qxg-0Leq-hLeW-vFH1-feMa-Q4TAvN\" TYPE=\"LVM2_member\"\n\/dev\/mapper\/vgubuntu-swap: UUID=\"41135eca-3e0c-4731-9263-25340f0a7f57\" TYPE=\"swap\"\n<\/code><\/pre>\n\n\n\n<p>The update fstab as follows.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>cat > etc\/fstab &lt;&lt; 'EOL'\nUUID=4709471c-9d3a-4d98-8dc5-6247bc31a366 \/               ext4    errors=remount-ro 0       1\nUUID=86e7c866-3199-4c5e-90cc-5c162d1f8955 \/boot           ext4    defaults        0       2\nUUID=43C1-9E44  \/boot\/efi       vfat    umask=0077      0       1\nUUID=41135eca-3e0c-4731-9263-25340f0a7f57 none            swap    sw              0       0\nEOL\n<\/code><\/pre>\n\n\n\n<p>At this point, you are now almost done.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"update-luks-crypt-table\">Update LUKS Crypt Table<\/h4>\n\n\n\n<p>LUKS crypt table defines the layout and configuration of a LUKS-encrypted device.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat etc\/crypttab<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>dm_crypt UUID=4713c4fd-460e-4d1f-953e-69c472907234 none luks,discard<\/code><\/pre>\n\n\n\n<p>Where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>dm_crypt:<\/strong> This field specifies the name of the mapped device that will be created when the encrypted device is unlocked (\/dev\/mapper\/dm_crypt). In this case, it is set to <code>dm_crypt<\/code>.<\/li>\n\n\n\n<li><strong>UUID=4713c4fd-460e-4d1f-953e-69c472907234:<\/strong> This field specifies the UUID (Universally Unique Identifier) of the encrypted block device. The UUID is a unique identifier assigned to the underlying block device.<\/li>\n\n\n\n<li><strong>none:<\/strong> The passphrase or key used to unlock the encrypted device. In this case, it is set to <code>none<\/code>, indicating that the device will prompt for the key.<\/li>\n\n\n\n<li><strong>luks:<\/strong> This field specifies the encryption format or type. In this example, it is set to <code>luks<\/code>, indicating that the encrypted device is formatted using the LUKS (Linux Unified Key Setup) encryption standard.<\/li>\n\n\n\n<li><strong>discard:<\/strong> This option specifies that the <code>discard<\/code> operation (TRIM) should be enabled for the encrypted device. TRIM is a feature that allows the operating system to inform the SSD about blocks of data that are no longer in use, helping with performance and wear leveling on SSDs that support this feature.<\/li>\n<\/ul>\n\n\n\n<p>Get the LUKS device UUID;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cryptsetup luksUUID \/dev\/sdb3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>4709471c-9d3a-4d98-8dc5-6247bc31a366<\/code><\/pre>\n\n\n\n<p>Update crypt table;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"dm_crypt-1 UUID=4709471c-9d3a-4d98-8dc5-6247bc31a366 none luks,discard\" &gt; etc\/crypttab<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"update-initramfs\">Update Initramfs<\/h4>\n\n\n\n<p>Regenerate the initramfs to include the changes made to the LUKS-encrypted drive.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>update-initramfs -u<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"update-grub\">Update GRUB<\/h4>\n\n\n\n<p>Update the GRUB configuration to reflect the changes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>update-grub<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"exit-chroot-and-reboot-the-system\">Exit Chroot and Reboot the System<\/h4>\n\n\n\n<p>Exit the chroot environment and umount the \/dev, \/sys, \/proc directories;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exit<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>umount \/mnt\/nvme\/sys\numount \/mnt\/nvme\/proc\numount \/mnt\/nvme\/dev\/pts\numount \/mnt\/nvme\/dev\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"poweroff-the-system\">Poweroff the System<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Power off the system<\/li>\n\n\n\n<li>Remove the live bootable USB<\/li>\n\n\n\n<li>Remove the old Linux OS installation drive.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"power-on-the-system-and-confirm-if-all-is-good\">Power on the System and Confirm if all is good<\/h4>\n\n\n\n<p>If everything goes well, you should boot into system as it were before migration!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever wondered if you could move Linux OS installation to another drive? Well, yes, that is definitely possible. Moving a Linux installation to<\/p>\n","protected":false},"author":10,"featured_media":20172,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,39],"tags":[7406,7404,7405],"class_list":["post-20136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-storage","tag-copy-linux-os-to-new-drive","tag-migrate-linux-os-to-new-drive","tag-move-linux-os-to-new-disk","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/20136"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=20136"}],"version-history":[{"count":19,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/20136\/revisions"}],"predecessor-version":[{"id":20922,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/20136\/revisions\/20922"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/20172"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=20136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=20136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=20136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}