System: Gentoo linux with Grub2.

I got new ssd drive, so I want to move root partition to this device. At moment I have these partitions:

/dev/sda1       2048      6143      4096     2M BIOS boot
/dev/sda2       6144    268287    262144   128M EFI System
/dev/sda3     268288   8388607   8120320   3.9G Linux filesystem
/dev/sda4    8388608 134217727 125829120    60G Linux filesystem
/dev/sda5  134217728 974676015 840458288 400.8G Linux filesystem

where sda2 is boot partition, sda3 - swap, sda4 - root, sda5 is lvm device.

New drive is fully managed by lvm. New root partition located at /dev/samsung-ssd/root. I've already changed /etc/fstab on new root.

I've read this answer https://unix.stackexchange.com/a/5318, but it suggests to move boot partition with root to new device, where I want to keep boot on old disk.

I tried to edit grub.conf and replace kernel boot option from root=/dev/sda4 to root=/dev/samsung-ssd/root, but got a kernel panic (failed to find root partition).

So my question is how to move root partition to new drive and keep boot partition on old?


I think, if it is gentoo than you should make your initramfs LVM "aware"…

So, first generate the initramfs with:

root# genkernel --lvm initramfs

Than add this to your grub configuration (/etc/default/grub):


And update the grub (update-grub ? I'm not sure…).

| improve this answer | |
  • 1
    Thanks! It solved my problem. To update grub I've used grub-mkconfig -o /boot/grub/grub.cfg – g4s8 Jan 19 '18 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.