最后一个解决的大问题,没想到弄了1个多礼拜
MBR修复 !!!!!!!!!!!!(实体机以及vbox虚拟机中测试通过)
1.lsblk
2.sudo fdisk -l
3.sudo mount /dev/sdXXX /mnt
4.sudo mount /dev/sdXXX /mnt/boot
5.sudo manjaro-chroot -a
6.grub-probe -t device /boot/grub
7.sudo grub-install /dev/sda
8.sudo grub-install --recheck /dev/sda
9.update-grub
efi修复(vbox虚拟机中测试通过)
1.lsblk
2.sudo fdisk -l
3.sudo mount /dev/sdXXX /mnt
4.sudo mount /dev/sdXXX /mnt/boot
5.sudo mount /dev/sdXXX /mnt/boot/efi
5.sudo manjaro-chroot -a
6.sudo pacman -S os-prober grub efibootmgr
7.grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro
8.grub-mkconfig -o /boot/grub/grub.cfg
9.update-grub
10.ls -l /dev/disk/by-uuid/ #查看UUID
11.sudo gedit /etc/fstab #编辑 /etc/fstab 文件,查看EFI分区的UUID,修改挂载后需要修复系统(源系统)的/etc/fstab文件EFI分区的UUID(×××这一步因为自己疏忽,1个月才弄明白并解决!!!×××)
manjaro-xfce efi修复(实体机以及vbox虚拟机中测试通过)
最近安装了xfce版本(GPT模式),修复引导好像又不太一样了,主要问题是
sudo manjaro-chroot -a 命令后 提示:No linux partitions detected ! (无Linux分区被检测出)
解决方法:
1.lsblk
2.sudo fdisk -l
3.sudo mount /dev/sdXXX /mnt
4.cd /mnt/@
5.sudo manjaro-chroot . (注意后面有个英文句号点结果出现sh-5.1# )
6.sudo su
7.lsblk
8.sudo mount /dev/sdXXX /mnt/boot
9.sudo mount /dev/sdXXX /mnt/boot/efi
10.grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro
11.grub-mkconfig -o /boot/grub/grub.cfg
12.update-grub
13.ls -l /dev/disk/by-uuid/ #查看UUID
14.sudo gedit /etc/fstab #编辑 /etc/fstab 文件,查看EFI分区的UUID,修改挂载后需要修复系统(源系统)的/etc/fstab文件EFI分区的UUID(××× 这一步相当重要!!!×××)
[manjaro@manjaro ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 130.5M 1 loop /run/miso/sfs/livefs
loop1 7:1 0 581.8M 1 loop /run/miso/sfs/mhwdfs
loop2 7:2 0 1.5G 1 loop /run/miso/sfs/desktopfs
loop3 7:3 0 695.2M 1 loop /run/miso/sfs/rootfs
sda 8:0 0 30G 0 disk
├─sda1 8:1 0 300M 0 part
├─sda2 8:2 0 26.7G 0 part
└─sda3 8:3 0 3G 0 part
sr0 11:0 1 2.9G 0 rom /run/miso/bootmnt
[manjaro@manjaro ~]$ sudo mount /dev/sda2 /mnt
[manjaro@manjaro ~]$ cd /mnt/@
[manjaro@manjaro @]$ sudo manjaro-chroot .
sh-5.1# sudo su
[manjaro /]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 130.5M 1 loop
loop1 7:1 0 581.8M 1 loop
loop2 7:2 0 1.5G 1 loop
loop3 7:3 0 695.2M 1 loop
sda 8:0 0 30G 0 disk
|-sda1 8:1 0 300M 0 part
|-sda2 8:2 0 26.7G 0 part /
`-sda3 8:3 0 3G 0 part
sr0 11:0 1 2.9G 0 rom
[manjaro /]# mount /dev/sda1 /boot/efi
[manjaro /]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 130.5M 1 loop
loop1 7:1 0 581.8M 1 loop
loop2 7:2 0 1.5G 1 loop
loop3 7:3 0 695.2M 1 loop
sda 8:0 0 30G 0 disk
|-sda1 8:1 0 300M 0 part /boot/efi
| /boot/efi
|-sda2 8:2 0 26.7G 0 part /
`-sda3 8:3 0 3G 0 part
sr0 11:0 1 2.9G 0 rom
[manjaro /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro-xfce
Installing for x86_64-efi platform.
Installation finished. No error reported.
[manjaro /]# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.13-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.13-x86_64.img
Found initrd fallback image: /boot/initramfs-5.13-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Info: Separate boot partition not detected
Found snapshot: 2021-10-12 10:33:04 | timeshift-btrfs/snapshots/2021-10-12_10-33-04/@
Found snapshot: 2021-10-12 10:03:56 | timeshift-btrfs/snapshots/2021-10-12_10-03-56/@
Found snapshot: 2021-10-11 23:14:18 | timeshift-btrfs/snapshots/2021-10-11_23-14-18/@
Found 3 snapshot(s)
Unmount /tmp/grub-btrfs.vU8JAqwDVa .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
[manjaro /]# update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.13-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.13-x86_64.img
Found initrd fallback image: /boot/initramfs-5.13-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Info: Separate boot partition not detected
Found snapshot: 2021-10-12 10:33:04 | timeshift-btrfs/snapshots/2021-10-12_10-33-04/@
Found snapshot: 2021-10-12 10:03:56 | timeshift-btrfs/snapshots/2021-10-12_10-03-56/@
Found snapshot: 2021-10-11 23:14:18 | timeshift-btrfs/snapshots/2021-10-11_23-14-18/@
Found 3 snapshot(s)
Unmount /tmp/grub-btrfs.twft2UQWUC .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
[manjaro /]# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 9 Oct 16 02:36 2021-09-27-19-59-50-00 -> ../../sr0
lrwxrwxrwx 1 root root 10 Oct 16 02:36 4a7e5641-2d0a-4405-bac6-b19df8c28da0 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 16 02:36 A0A9-5D01 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 16 02:36 f07a29bf-d167-401d-9718-09862396d3bb -> ../../sda3
[manjaro /]# sudo nano /etc/fstab
[manjaro /]# exit
exit
sh-5.1# exit
exit
umount: /mnt/@: target is busy.
[manjaro@manjaro @]$ reboot