grub 启动分区表

grub 启动分区表

我想在我的双启动 acer 上扩展 Ubuntu 18.04 的磁盘。一切运行顺利,但它需要一些额外的空间,因为我最初只给了它 20 GB。

所以我在 Windows 磁盘管理器中又切出了 40 GB。在 Linux GParted 中,我将磁盘添加为sda7ext4 并挂载它。但是当我想安装某些东西时,它并没有像我预期的那样运行,因为仍然没有足够的空间。

从那以后,我真的搞砸了。我按照以下步骤重写了分区表:https://www.ryadel.com/en/resize-extend-disk-partition-unallocated-disk-space-linux-centos-rhel-ubuntu-debian/

重启后仅转到 GRUB 2.04。

以下为boot-repair报告全文:

boot-repair-4ppa125                                              [20220205_1207]

============================== Boot Info Summary ===============================

 => No boot loader is installed in the MBR of /dev/sda.
 => Syslinux MBR (3.61-4.03) is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/2012: NTFS
    Boot sector info:  According to the info in the boot sector, sda1 starts 
                       at sector 0. But according to the info from fdisk, 
                       sda1 starts at sector 2048.
    Operating System:  
    Boot files:        

sda2: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Windows 8/2012: FAT32
    Boot sector info:  According to the info in the boot sector, sda2 starts 
                       at sector 0. But according to the info from fdisk, 
                       sda2 starts at sector 1230848.
    Operating System:  
    Boot files:        /efi/Boot/bootx64.efi /efi/Boot/fbx64.efi 
                       /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                       /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg 
                       /efi/Microsoft/Boot/bootmgfw.efi 
                       /efi/Microsoft/Boot/bootmgr.efi 
                       /efi/Microsoft/Boot/memtest.efi 
                       /efi/OEM/Boot/bootmgfw.efi /efi/OEM/Boot/bootmgr.efi 
                       /efi/OEM/Boot/memtest.efi

sda3: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/2012: NTFS
    Boot sector info:  According to the info in the boot sector, sda4 starts 
                       at sector 0. But according to the info from fdisk, 
                       sda4 starts at sector 2107392.
    Operating System:  Windows 10
    Boot files:        /Windows/System32/winload.exe

sda5: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/2012: NTFS
    Boot sector info:  According to the info in the boot sector, sda5 starts 
                       at sector 0. But according to the info from fdisk, 
                       sda5 starts at sector 1919410176.
    Operating System:  
    Boot files:        

sda6: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sdb1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  SYSLINUX 4.03 2010-10-22 ........>..sr>........._7...0...~.....~...f...M.f.f....f..0~....>E}.u......
    Boot sector info:  Syslinux looks at sector 15258136 of /dev/sdb1 for 
                       its second stage. SYSLINUX is installed in the  
                       directory. No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /boot/grub/grub.cfg /syslinux.cfg 
                       /efi/BOOT/grubx64.efi /ldlinux.sys


================================ 1 OS detected =================================

OS#1:   Windows 10 on sda4

============================ Architecture/Host Info ============================

CPU architecture: 64-bit
Live-session OS is Ubuntu 64-bit (Boot-Repair-Disk 64bit 20200604, bionic, x86_64)


===================================== UEFI =====================================

BIOS is EFI-compatible, and is setup in EFI-mode for this live-session.
SecureBoot disabled.

efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 2001,0003,0000,0001,2002,2003
Boot0000* Yes   PciRoot(0x0)/Pci(0x1f,0x2)/Sata(5,0,0)/HD(2,GPT,196fe452-8af1-4ce2-bb34-d2c3adfe387e,0x12c800,0x96000)/File(\EFI\ubuntu\shimx64.efi)A01 ..
Boot0001* ubuntu    HD(2,GPT,196fe452-8af1-4ce2-bb34-d2c3adfe387e,0x12c800,0x96000)/File(\EFI\ubuntu\shimx64.efi)
Boot0002* USB HDD: VendorCoProductCode  PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/HD(1,MBR,0x29baf10,0x40,0xefffc0)RC
Boot0003* Windows Boot Manager  HD(2,GPT,196fe452-8af1-4ce2-bb34-d2c3adfe387e,0x12c800,0x96000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot2001* EFI USB Device    RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

728124f6ec8e22fbdbe7034812c81b95   sda2/Boot/bootx64.efi
5dabe049a4dad758d975dc2e60a7f00e   sda2/Boot/fbx64.efi
621356d82b109cd860ad92cdf241c58b   sda2/ubuntu/grubx64.efi
f243a42f3bd3164872e792dbc2610270   sda2/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95   sda2/ubuntu/shimx64.efi
88d8877ed3e6c65fe091f4fe40c8beff   sda2/Microsoft/Boot/bootmgfw.efi
9804a5af3899975c598d2e323c04ed87   sda2/Microsoft/Boot/bootmgr.efi
bad97e7203aec2bd026403a7f70688b9   sda2/OEM/Boot/bootmgfw.efi
976a6ef4ad76d6f70c6c357a93f0fd47   sda2/OEM/Boot/bootmgr.efi


============================= Drive/Partition Info =============================

Disks info: ____________________________________________________________________

sda : is-GPT,   no-BIOSboot,    has---ESP,  not-usb,    not-mmc, has-os,    2048 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

sda1    : no-os,    32, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far
sda2    : no-os,    32, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far
sda4    : is-os,    32, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sda5    : no-os,    32, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sda6    : no-os,    32, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios

Partitions info (2/3): _________________________________________________________

sda1    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, recovery-or-hidden, no-bmgr,    notwinboot
sda2    : is---ESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
sda4    : isnotESP, part-has-no-fstab,  no-nt,  haswinload, no-recov-nor-hid,   no-bmgr,    notwinboot
sda5    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, recovery-or-hidden, no-bmgr,    notwinboot
sda6    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot

Partitions info (3/3): _________________________________________________________

sda1    : not-sepboot,  no-boot,    part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  std-grub.d, sda
sda2    : not-sepboot,  no-boot,    part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  std-grub.d, sda
sda4    : not-sepboot,  no-boot,    part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  std-grub.d, sda
sda5    : not-sepboot,  no-boot,    part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  std-grub.d, sda
sda6    : maybesepboot, no-boot,    part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  std-grub.d, sda

fdisk -l (filtered): ___________________________________________________________

Disk sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: E21C3F18-DAE5-4654-AB4F-FAD7617B691E
           Start        End    Sectors   Size Type
sda1        2048    1230847    1228800   600M Windows recovery environment
sda2     1230848    1845247     614400   300M EFI System
sda3     1845248    2107391     262144   128M Microsoft reserved
sda4     2107392 1794564095 1792456704 854.7G Microsoft basic data
sda5  1919410176 1953523711   34113536  16.3G Windows recovery environment
sda6  1794564096 1919410175  124846080  59.5G Linux filesystem
Partition table entries are not in disk order.
Disk sdb: 7.5 GiB, 8053063680 bytes, 15728640 sectors
Disk identifier: 0x029baf10
      Boot Start      End  Sectors  Size Id Type
sdb1  *       64 15728639 15728576  7.5G  c W95 FAT32 (LBA)
Disk zram0: 985.5 MiB, 1033338880 bytes, 252280 sectors
Disk zram1: 985.5 MiB, 1033338880 bytes, 252280 sectors
Disk zram2: 985.5 MiB, 1033338880 bytes, 252280 sectors
Disk zram3: 985.5 MiB, 1033338880 bytes, 252280 sectors

parted -lm (filtered): _________________________________________________________

sda:1000GB:scsi:512:512:gpt:ATA Samsung SSD 870:;
1:1049kB:630MB:629MB:ntfs::hidden, diag;
2:630MB:945MB:315MB:fat32::boot, esp;
3:945MB:1079MB:134MB::Microsoft reserved partition:msftres;
4:1079MB:919GB:918GB:ntfs:Basic data partition:msftdata;
6:919GB:983GB:63.9GB:ext4::;
5:983GB:1000GB:17.5GB:ntfs::hidden, diag;
sdb:8053MB:scsi:512:512:msdos:VendorCo ProductCode:;
1:32.8kB:8053MB:8053MB:fat32::boot, lba;
zram3:1033MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:1033MB:1033MB:linux-swap(v1)::;
zram1:1033MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:1033MB:1033MB:linux-swap(v1)::;
zram2:1033MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:1033MB:1033MB:linux-swap(v1)::;
zram0:1033MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:1033MB:1033MB:linux-swap(v1)::;

blkid (filtered): ______________________________________________________________

NAME   FSTYPE   UUID                                 PARTUUID                             LABEL             PARTLABEL
sda                                                                                                         
├─sda1 ntfs     2E40A63140A60027                     383a5d99-3fe4-465c-84e1-5b315e2f6051 Recovery          Basic data partition
├─sda2 vfat     E6A8-2CAF                            196fe452-8af1-4ce2-bb34-d2c3adfe387e ESP               EFI system partition
├─sda3                                               c2cd845d-e34d-4b06-98d2-54f698c27834                   Microsoft reserved partition
├─sda4 ntfs     FA1E8A891E8A3E9F                     d860a256-1fe8-4e96-9a49-4eab95441b66 Acer              Basic data partition
├─sda5 ntfs     6C7EAC187EABD8DA                     b8d1d4ae-24ee-418b-8e66-98f485a9414f Push Button Reset Basic data partition
└─sda6 ext4     4b8f8c0e-f755-4ab9-bd2f-b4cb9147f989 1d57bc32-c0e1-754c-9ad2-7a178beb285e                   
sdb                                                                                                         
└─sdb1 vfat     CE4E-68A9                            029baf10-01                                            
zram0                                                                                                       
zram1                                                                                                       
zram2                                                                                                       
zram3                                                                                                       

df (filtered): _________________________________________________________________

       Avail Use% Mounted on
sda1   315.7M  47% /mnt/boot-sav/sda1
sda2   241.8M  18% /mnt/boot-sav/sda2
sda4    99.4G  88% /mnt/boot-sav/sda4
sda5   847.4M  95% /mnt/boot-sav/sda5
sda6    37.1G   0% /mnt/boot-sav/sda6
sdb1     6.6G  12% /cdrom

Mount options: __________________________________________________________________

sda1   rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda2   rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
sda4   rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda5   rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda6   rw,relatime
sdb1   ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro

===================== sda2/efi/ubuntu/grub.cfg (filtered) ======================

search.fs_uuid ede1e272-fb1d-4582-a4d7-b18262720996 root hd0,gpt6 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

====================== sdb1/boot/grub/grub.cfg (filtered) ======================

Boot-Repair-Disk session
Boot-Repair-Disk session (failsafe)

========================= sdb1/syslinux.cfg (filtered) =========================

default menu.c32
prompt 0
menu title UNetbootin
timeout 100

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash ---

label ubnentry0
menu label ^Help
kernel /ubnkern
append initrd=/ubninit 

label ubnentry1
menu label ^64bit session
kernel /casper/vmlinuz
append initrd=/casper/initrd file=/cdrom/preseed/lubuntu.seed boot=casper  quiet splash ---

label ubnentry2
menu label ^64bit session (failsafe)
kernel /casper/vmlinuz
append initrd=/casper/initrd file=/cdrom/preseed/lubuntu.seed boot=casper  noapic noapm nodma nomce nolapic nomodeset nosmp vga=normal ---

label ubnentry3
menu label Boot-Repair-Disk session
kernel /casper/vmlinuz
append initrd=/casper/initrd file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash --

label ubnentry4
menu label Boot-Repair-Disk session (failsafe)
kernel /casper/vmlinuz
append initrd=/casper/initrd file=/cdrom/preseed/lubuntu.seed boot=casper noapic noapm nodma nomce nolapic nomodeset nosmp vga=normal --


==================== sdb1: Location of files loaded by Grub ====================

           GiB - GB             File                                 Fragment(s)
            ?? = ??             boot/grub/grub.cfg                             1

================== sdb1: Location of files loaded by Syslinux ==================

           GiB - GB             File                                 Fragment(s)
            ?? = ??             syslinux.cfg                                   1
            ?? = ??             ldlinux.sys                                    1
            ?? = ??             menu.c32                                       1

=============== sdb1: Version of COM32(R) files used by Syslinux ===============

 menu.c32                           :  COM32R module (v4.xx)


=============================== StdErr Messages ================================

File descriptor 63 (pipe:[43699]) leaked on lvs invocation. Parent PID 1833: /bin/bash

Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would not act on the MBR.
Additional repair would be performed:  win-legacy-basic-fix     
paste.ubuntu.com ko ()
paste.debian.net ko ()

有人能建议如何再次启动 Ubuntu 吗?我发现sda6缺少引导扇区类型等。有人能建议如何修复吗?

答案1

抱歉发了不必要的帖子。幸运的是,我准确地记下了两个分区的开始和结束块。使用 live usb ubuntu,我将分区表反转回来。从此,linux 照常从磁盘启动。之后,我使用 live usb 和工具 gparted 将未分配的 40 GB 磁盘合并到安装了 linux 的现有 20 GB 磁盘。gparted 成功移动文件,重启后,我有 60 GB 可用于 linux。

相关内容