Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_faq:fix_grub_initramfs_boot [2022/01/14 20:13] – [Fix GRUB MBR -> GPT] adminlinux_faq:fix_grub_initramfs_boot [2022/01/14 20:39] (current) – [Real Fix] admin
Line 100: Line 100:
  
 ====== Real Fix ====== ====== Real Fix ======
 +  /usr/sbin/grub-probe: error: disk `lvmid/N3HVdL-143p-0oFW-Gx6d-SroA-tA8e-1Icrfe/wpdsZY-qoqU-j7M1-LGSL-IA2p-hK6I-brvC9D' not found.
 смотрим диски смотрим диски
 <code> <code>
Line 114: Line 115:
 Я знаю, что EFI находится на (hd1,gpt2), а / и /boot - на LVM-томе **/dev/pve/root** \\ Я знаю, что EFI находится на (hd1,gpt2), а / и /boot - на LVM-томе **/dev/pve/root** \\
 Монтируем root и биндим все что надо: Монтируем root и биндим все что надо:
 +<code>root@rescue ~ # blkid /dev/pve/root
 +/dev/pve/root: UUID="507da6be-c993-414a-91c1-fee245500c4d" BLOCK_SIZE="4096" TYPE="ext4"
 +root@rescue ~ # lsblk /dev/pve/root
 +NAME     MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
 +pve-root 253:0    0  96G  0 lvm  
 +root@rescue ~ # resize2fs /dev/pve/root 95G
 +resize2fs 1.46.2 (28-Feb-2021)
 +Please run 'e2fsck -f /dev/pve/root' first.
 +
 +root@rescue ~ # e2fsck -f /dev/pve/root
 +e2fsck 1.46.2 (28-Feb-2021)
 +Pass 1: Checking inodes, blocks, and sizes
 +Pass 2: Checking directory structure
 +Pass 3: Checking directory connectivity
 +Pass 4: Checking reference counts
 +Pass 5: Checking group summary information
 +/dev/pve/root: 60013/6291456 files (0.2% non-contiguous), 1830899/25165824 blocks
 +root@rescue ~ # resize2fs /dev/pve/root 95G
 +resize2fs 1.46.2 (28-Feb-2021)
 +Resizing the filesystem on /dev/pve/root to 24903680 (4k) blocks.
 +The filesystem on /dev/pve/root is now 24903680 (4k) blocks long.
 +
 +root@rescue ~ # lvreduce -L -1G /dev/pve/root
 +  WARNING: Reducing active logical volume to 95.00 GiB.
 +  THIS MAY DESTROY YOUR DATA (filesystem etc.)
 +Do you really want to reduce pve/root? [y/n]: y
 +  Size of logical volume pve/root changed from 96.00 GiB (24576 extents) to 95.00 GiB (24320 extents).
 +  Logical volume pve/root successfully resized.
 +root@rescue ~ # e2fsck -f /dev/pve/root
 +e2fsck 1.46.2 (28-Feb-2021)
 +Pass 1: Checking inodes, blocks, and sizes
 +Pass 2: Checking directory structure
 +Pass 3: Checking directory connectivity
 +Pass 4: Checking reference counts
 +Pass 5: Checking group summary information
 +/dev/pve/root: 60013/6225920 files (0.2% non-contiguous), 1826787/24903680 blocks
 +root@rescue ~ # mount /dev/mapper/pve-root /mnt
 +root@rescue ~ #  mount -t proc proc /mnt/proc
 +root@rescue ~ #  mount -t sysfs sys /mnt/sys
 +root@rescue ~ #  mount -o bind /dev /mnt/dev
 +root@rescue ~ #  mount -t devpts pts /mnt/dev/pts/
 +root@rescue ~ #  chroot /mnt
 +root@rescue:/# mount /dev/nvme0n1p2 /boot/efi/
 +root@rescue:/#  update-grub
 +Generating grub configuration file ...
 +Found linux image: /boot/vmlinuz-5.13.19-1-pve
 +Found initrd image: /boot/initrd.img-5.13.19-1-pve
 +Found memtest86+ image: /boot/memtest86+.bin
 +Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
 +done
 +root@rescue:/# grub-install /dev/nvme0n1
 +Installing for i386-pc platform.
 +Installation finished. No error reported.
 +root@rescue:/# exit
 +exit
 +root@rescue ~ # umount /mnt/proc
 +root@rescue ~ # umount /mnt/sys
 +root@rescue ~ # umount /mnt/dev/pts 
 +root@rescue ~ # umount /mnt/dev
 +root@rescue ~ # umount /mnt/boot/efi 
 +root@rescue ~ # umount /mnt
 +</code>
  
  
  • linux_faq/fix_grub_initramfs_boot.txt
  • Last modified: 2022/01/14 20:39
  • by admin