LVM ddrescued 장치에서 Linux를 실행하도록 분리된 GRUB 구성

LVM ddrescued 장치에서 Linux를 실행하도록 분리된 GRUB 구성

새로운 120GB SSD를 얻었고 ddrescued에서 Linux Mint를 복원하고 싶습니다./dev/mapper/mint--vg-root

충돌 전과 마찬가지로 SSD를 500MB sdb1 Ext4와 119GB sdb2 LVM으로 분할했습니다.

mint-vg그런 다음 그룹을 만들고 root볼륨을 만들었습니다. ddrescued Mint 이미지를 mint--vg-root.

그런 다음 GRUB을 설치하여 다음을 설치했습니다 sdb1.

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

이제 SSD에서 부팅할 때 GRUB 검은색 화면을 사용해 보았습니다.방법-구조-비부팅-grub-2-Linux, 그러나 GRUB에서는 내 lvm 파티션에 알 수 없는 파일 시스템이 있다고 말합니다.

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 ....

GUI를 사용해보려고 합니다 boot-repair. 내 목록이 표시되지만 mapper/mint--vg-root수정 후 내 민트가 시스템 목록에 없습니다. 기본값으로 표시됨 mapper/mint--vg-root에는 LiveCD가 필요합니다.

노력하다:

insmod lvm

grub 콘솔에 결과가 없습니다(아직 알 수 없음).

이것을 시도했습니다 :

sudo grub-mkconfig -o grub.cfg

발견되었다고는 /dev/mapper/mint--vg-root하지만 grub.cfg기록이 없습니다.

GRUB이 lvm에서 Mint를 로드하도록 하려면 어떻게 해야 합니까?

고쳐 쓰다:

다음은 기존 시스템과 새 시스템의 일부 부팅 정보를 요약한 것입니다. 새로운 것에는 "확장 파티션"이 없습니다

오래된:

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: 

민트-vg-루트:

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.

민트-VG-swap_1:

File system:       swap

Boot sector type:  -

Boot sector info: 

신규 창업정보 요약:

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: 

민트-vg-루트:

File system:       ext4

Boot sector type:  -

Boot sector info: 

Operating System:  Linux Mint 18.1

Boot files:        /etc/fstab

해결됨그리고방법-구조-비부팅-grub-2-LinuxGRUB 콘솔에서 일부 수정:

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

부팅한 후 실행했는데 boot-repair이제 작동합니다.

답변1

해결됨그리고방법-구조-비부팅-grub-2-LinuxGRUB 콘솔에서 일부 수정:

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

어디.(hd0,msdos1)sdb1

부팅 후 시동 복구를 실행했는데 이제 작동합니다.

/etc/fstab부팅이 파티션 /folder에서 (hd0,msdos1)설치 되었으므로 UUID도 수정했습니다 . 다음과 같은 파일이 모두 있습니다 vmlinuz. 그러면 initrd.img올바르게 시작할 수 있습니다.

답변2

나는 똑같은 일을 했지만 lvm이 아닌 포인터를 완전히 피했습니다.

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

안부 인사, 알렉스

답변3

BIOS 부팅 모드 대신 efi를 사용하는 경우 명령이 약간 다릅니다. 루트 lvm 파티션 외에도 커널이 포함된 efi 파티션을 찾을 수도 있습니다. 내 시스템의 efi 파티션(hd0,gpt1)에서 intrd 이미지와 vmlinuz를 찾았습니다.

grub> ls
(hd0) (hd0,gpt1) (hd0,gpt2) (hd1) (hd1,gpt1) (lvm/mint_vg_root) (lvm/mint_vg_var)

grub> ls (lvm/mint_vg_root)/boot/
./ ../

grub> ls (hd0,gpt1)/
./ ../ efi/ vmlinuz-5.13.0-7620-generic initrd.img-5.13.0-7620-generic

grub> set root=(lvm/mint_vg_root) 
grub> linuxefi (hd0,gpt1)/vmlinuz-5.13.0-7620-generic root=/dev/mapper/mint_vg_root
grub> initrdefi  (hd0,gpt1)/initrd.img-5.13.0-7620-generic
grub> boot

관련 정보