0

I got new 120GB SSD and I want to restore my Linux Mint from my ddrescued /dev/mapper/mint--vg-root

I splited SSD to 500MB sdb1 Ext4 and 119GB sdb2 LVM as it was before crash.

Then I created mint-vg group and made root volume. Restored ddrescued Mint image to mint--vg-root.

Then I installed GRUB to mounted sdb1 with this:

sudo grub-install --root-directory=/media/user/mouted_sdb1 /dev/sdb

Now when I boot from SSD I get GRUB black screen I tried how-rescue-non-booting-grub-2-Linux, but GRUB says, that my lvm partitition has unknown filesystem:

grub> ls (hd0,msdos <TAB>

Available partititions are

Partitition hd0,msdos1: Filesystem type ext* - Last modified .....

Partitition hd0,msdos2: No known filesystem detected - Partitition start at ....

I tried boot-repair with GUI. It lists my mapper/mint--vg-root, but after repair my mint not in list of systems. Mark mapper/mint--vg-root as default requires LiveCD.

Tried to:

insmod lvm

In grub console without result (still no known):

Tried this:

sudo grub-mkconfig -o grub.cfg

It says that /dev/mapper/mint--vg-root is found, but in grub.cfg is no record about this.

How make GRUB to load my Mint from lvm?

UPDATE:

Here some Boot Info Summary from my old system and from new. In new I have no "Extended partitition"

OLD:

sdb1:

File system:       ext2

Boot sector type:  -

Boot sector info: 

Operating System:  

Boot files:        /grub/grub.cfg /grub/i386-pc/core.img

sdb2:

File system:       Extended Partition

Boot sector type:  -

Boot sector info: 

sdb5:

File system:       LVM2_member

Boot sector type:  -

Boot sector info: 

mint-vg-root:

File system:       ext4

Boot sector type:  -

Boot sector info: 

Mounting failed:   mount: wrong fs type, bad option, bad superblock on /dev/mapper/mint--vg-root,
   missing codepage or helper program, or other error
   In some cases useful info is found in syslog - try
   dmesg | tail or so.

mint-vg-swap_1:

File system:       swap

Boot sector type:  -

Boot sector info: 

new Boot Info Summary:

sdb1:

File system:       ext4

Boot sector type:  -

Boot sector info: 

Operating System:  

Boot files:        /boot/grub/grub.cfg /boot/grub/i386-pc/core.img

sdb2:

File system:       LVM2_member

Boot sector type:  -

Boot sector info: 

mint-vg-root:

File system:       ext4

Boot sector type:  -

Boot sector info: 

Operating System:  Linux Mint 18.1

Boot files:        /etc/fstab

SOLVED with how-rescue-non-booting-grub-2-Linux with some modifications in GRUB console:

grub> set root=(lvm/mint--vg-root)
grub> linux (hd0,msdos1)/boot/vmlinuz-4.4.0-112-generic root=/dev/mapper/mint--vg-root
grub> initrd (hd0,msdos1)/boot/initrd.img-4.4.0-112-generic
grub> boot

After boot I ran boot-repair and it works now.

  • So you took an image of your old drive and copied it to the new one using dd? – Raman Sailopal Jan 29 '18 at 11:43
  • Yes. I took image from /dev/mapper/mint--vg-root from old drive. Then put image to new prepared /dev/mapper/mint--vg-root. All with dd – serebuka Jan 29 '18 at 11:46
  • Probably I had to copy partitition with grub too. But that SSD is gone – serebuka Jan 29 '18 at 11:49
  • Yeah, taking a copy of the actual disk partitions would have been the best way to go. – Raman Sailopal Jan 29 '18 at 11:51
  • I added old and new boot info summary. Seems different. New is without Extended partitition containing LVM. – serebuka Jan 29 '18 at 12:07
0

SOLVED with how-rescue-non-booting-grub-2-Linux with some modifications in GRUB console:

grub> set root=(lvm/mint--vg-root)
grub> linux (hd0,msdos1)/boot/vmlinuz-4.4.0-112-generic root=/dev/mapper/mint--vg-root
grub> initrd (hd0,msdos1)/boot/initrd.img-4.4.0-112-generic
grub> boot

Where (hd0,msdos1) is sdb1.

After boot I ran boot-repair and it works now

Also I fixed UUIDs in /etc/fstab, because my boot /folder is mounted from (hd0,msdos1) partitition. There are all files like vmlinuz... and initrd.img to boot properly.

0

i did the same but totally avoided non lvm pointers:

grub> set root=(lvm/mint--vg-root)
grub> linux /boot/vmlinuz-4.4.0-112-generic root=/dev/mapper/mint--vg-root
grub> initrd (hd0,msdos1)/boot/initrd.img-4.4.0-112-generic
grub> boot

best regards, alex

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.