AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[gpt](ubuntu)

Martin Hope
WaterOfDark
Asked: 2020-12-17 10:19:10 +0800 CST

Kubuntu 无法启动了

  • 0

我正在使用 Kubuntu 20.04,并且在disk manager

所以我想问题是disk manager接下来应该出现的服务(很高兴知道下一个服务)。

我使用的是 AMD CPU 和 GPU,在更新之前一切都运行良好。从那时起,我清理了所有不需要的 ppa(所以 steam、spotify 和 wineHQ)仍然安装,但它们不应该干扰系统。我比较了来自实时系统的所有包并安装了缺少的一个,并且还重新配置了每个包dpkg-reconfigure而不做任何更改。

在引导期间,我没有看到任何失败的服务..

我想让它再次运行,而无需重新安装。感谢您的时间。


编辑

从旧的 Boot.log 它应该停在这里:

 Starting Snap Daemon...
 Starting Login Service...
 Starting Thermal Daemon Service...
 Starting Disk Manager...
 Starting LSB: This service…d stops the USB Arbitrator....
 Starting WPA supplicant...
 Starting Rotate log files...
 Starting Daily man-db regeneration...

也许一个驱动器的 MBR/GPT 扇区出了问题?

sdc1: __________________________________________________________________________

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

sdc2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Unknown
    Boot sector info:  According to the info in the boot sector, sdc2 has 
                       1549178879 sectors, but according to the info from 
                       fdisk, it has 5844146175 sectors.
    Operating System:  
    Boot files:        
boot kubuntu services mbr gpt
  • 1 个回答
  • 54 Views
Martin Hope
User
Asked: 2020-11-30 15:11:14 +0800 CST

使用 GPT 和 EFI 安装 Lubuntu 20.04

  • 0

我有一个现有的 Lubuntu 18.04 安装,我想升级到 20.04。Lubuntu 文档说这需要全新安装。我之前的 18.04 安装使用 GPT 和 EFI。在从 live USB 安装 20.04 期间,我按照此博客文章中的建议卸载了以前的驱动器并选择擦除磁盘,以便 Lubuntu 会自动分区。

然而,Lubuntu 20.04 似乎已经决定安装为 MBR 而不是 GPT,也没有 EFI。

没有 GPT: sudo fdisk -l显示Disklabel type: dos

没有 EFI /sys/firmware/efi不存在

我愿意重新安装,但如何让 Lubuntu 安装 GPT 和 EFI?我必须手动分区吗?或者有没有办法让它自动完成?

partitioning lubuntu uefi mbr gpt
  • 1 个回答
  • 3380 Views
Martin Hope
tebbs
Asked: 2020-03-06 18:03:36 +0800 CST

为什么我的 WD blue 4tb 磁盘在 gparted、gdisk、parted 和 fdisk 中显示为 2tb

  • 1

它们使用双 sas raid 卡连接。目标是使用 mdadm 创建一个用于 nas 目的的大型 raid 6 阵列和一个 plex 服务器。但如果我似乎无法格式化 4tb,我不会尝试创建一个巨大的 24tb 数组。

nasplex@nasplex-pc:~$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): ^C
nasplex@nasplex-pc:~$ sudo parted /dev/sdc
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: ATA WDC WD40EZRZ-19G (scsi)
Disk /dev/sdc: 2199GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name              Flags
 1      1049kB  2199GB  2199GB               Linux filesystem

(parted) ^C                                                               

nasplex@nasplex-pc:~$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 1.102 TiB, 2199023254528 bytes, 4294967294 sectors
Disk model: WDC WD40EZRZ-19G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B128F58D-0CAC-4EF4-B57A-B0883ACD65EC

Device     Start        End    Sectors Size Type
/dev/sdc1   2048 4294967260 4294965213   2T Linux filesystem
nasplex@nasplex-pc:~$ 

nasplex@nasplex-pc:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 111.8G  0 disk 
└─sda1   8:1    0 111.8G  0 part /
sdb      8:16   0 465.8G  0 disk 
├─sdb1   8:17   0   5.6G  0 part 
└─sdb2   8:18   0 460.2G  0 part 
sdc      8:32   0     2T  0 disk 
└─sdc1   8:33   0     2T  0 part 
sdd      8:48   0     2T  0 disk 
sde      8:64   0     2T  0 disk 
sdf      8:80   0     2T  0 disk 
sdg      8:96   0     2T  0 disk 
sdh      8:112  0     2T  0 disk 
sdi      8:128  0     2T  0 disk 
sdj      8:144  0     2T  0 disk 
sr0     11:0    1  1024M  0 rom  

lubuntu gparted gpt
  • 1 个回答
  • 781 Views
Martin Hope
thatonetallguy
Asked: 2020-02-04 10:54:37 +0800 CST

Ubuntu 19.10双启动,找不到电脑硬盘安装

  • 2

我尝试在我的新戴尔 Latitude 5500 上以通常的双引导配置安装 Ubuntu 19.10。它在其 512GB 驱动器上带有 BitLocker 加密。我将 Ubuntu 的音量缩小到大约 200GB,禁用加密并等待 Windows 解密驱动器。我还关闭了 Windows 快速启动。到目前为止,一切都很好。笔记本电脑的驱动器有一个 GPT 表,所以我也使用 Rufus 制作了一个带有 GPT 的可启动 Ubuntu USB。

但是当我通过 UEFI 从戴尔 BIOS 启动到 USB 并尝试进行 Ubuntu 安装时,安装程​​序告诉我我没有足够的空间,并且我的笔记本电脑只有 7.8GB 的​​空间。我使用的 USB 是 8GB,所以安装程序很可能会看到,并且根本无法在笔记本电脑中找到 512GB 驱动器。自从成为 Linux 用户以来,我已经进行了几十次双引导安装,但从未遇到过这个问题。任何帮助将不胜感激。

dual-boot partitioning gpt
  • 1 个回答
  • 204 Views
Martin Hope
DKebler
Asked: 2019-11-18 21:40:58 +0800 CST

如何在不损坏 GPT 分区表的情况下截断未使用空间的磁盘映像文件(结束指针)

  • 3

关于获取磁盘映像并缩小根(仿生)文件系统分区然后截断映像以删除成为可用空间的部分的大量信息。喜欢 https://softwarebakery.com//shrinking-images-on-linux

所以基本上分为三个步骤。使用 resize2fs 缩小分区上的文件系统,然后也减小分区的大小。然后最后删除图像文件中现在未使用的空间。

这是我遇到问题的第三部分。每次我尝试 dd 或 truncate 时,图像的所有分区都会被删除,就好像图像文件中的 GPT 分区表被丢弃一样。

这是原始图像

GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk rock64-base.img: 30310400 sectors, 14.5 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 159DCEDE-DBEA-4657-96D9-2CE178A96B7E
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 30310366
Partitions will be aligned on 64-sector boundaries
Total free space is 30 sectors (15.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64            8063   3.9 MiB     8300  loader1
   2            8064            8191   64.0 KiB    8300  reserved1
   3            8192           16383   4.0 MiB     8300  reserved2
   4           16384           24575   4.0 MiB     8300  loader2
   5           24576           32767   4.0 MiB     8300  atf
   6           32768          262143   112.0 MiB   0700  boot
   7          262144        30310366   14.3 GiB    8300  root

然后在前两个步骤之后

Found valid GPT with protective MBR; using GPT.
Disk test.img: 30310400 sectors, 14.5 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 159DCEDE-DBEA-4657-96D9-2CE178A96B7E
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 30310366
Partitions will be aligned on 64-sector boundaries
Total free space is 23555002 sectors (11.2 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64            8063   3.9 MiB     8300  loader1
   2            8064            8191   64.0 KiB    8300  reserved1
   3            8192           16383   4.0 MiB     8300  reserved2
   4           16384           24575   4.0 MiB     8300  loader2
   5           24576           32767   4.0 MiB     8300  atf
   6           32768          262143   112.0 MiB   0700  boot
   7          262144         6755394   3.1 GiB     8300  primary

可以看到根文件系统分区已经缩减到3.1G

我可以很好地加载该图像。我可以把它放回 SD 卡上并启动我的设备。所以步骤 1 和 2 没问题。

在此处输入图像描述

现在...

如果我完成了执行 `truncate --size=$[(6755394+1)*512] 'test.img' 的过程

和

GPT fdisk (gdisk) version 1.0.3

Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! Error 25 reading partition table for CRC check!
Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk test2.img: 6755395 sectors, 3.2 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 159DCEDE-DBEA-4657-96D9-2CE178A96B7E
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 30310366
Partitions will be aligned on 64-sector boundaries
Total free space is 23555002 sectors (11.2 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64            8063   3.9 MiB     8300  loader1
   2            8064            8191   64.0 KiB    8300  reserved1
   3            8192           16383   4.0 MiB     8300  reserved2
   4           16384           24575   4.0 MiB     8300  loader2
   5           24576           32767   4.0 MiB     8300  atf
   6           32768          262143   112.0 MiB   0700  boot
   7          262144         6755394   3.1 GiB     8300  primary

在此处输入图像描述

显然 truncate(或 dd 就此而言)在 GPT 中表现不佳。在此文件上运行 gdisk 确认 gpt 已被丢弃

如果我在截断的文件上运行 gdisk,它会报告一个垃圾 GPT。

所以很明显我在这里遗漏了一些东西。显然,当磁盘文件的末尾发生更改时,GPT 会损坏或需要修复(不匹配)。即使它在第 2 步结束时很好/存在。我弄乱了 gdisk 并且无法修复它。除此之外,我想要一个可以用脚本做的解决方案,而这个 GPT 不起作用。

因此,因为它是 GPT,我是否需要使用截断或 dd 以外的其他东西,还是必须在截断后手动“修复”GPT。

这是 gdisk 验证报告的内容

Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Problem: Disk is too small to hold all the data!
(Disk size is 6755395 sectors, needs to be 30310400 sectors.)
The 'e' option on the experts' menu may fix this problem.

Problem: GPT claims the disk is larger than it is! (Claimed last usable
sector is 30310366, but backup header is at
30310399 and disk size is 6755395 sectors.
The 'e' option on the experts' menu will probably fix this problem

Partition(s) in the protective MBR are too big for the disk! Creating a
fresh protective or hybrid MBR is recommended.
partitioning disk-image gpt gdisk
  • 1 个回答
  • 4671 Views
Martin Hope
TacoV
Asked: 2019-04-07 08:49:55 +0800 CST

grub 安装失败

  • 0

我有一段时间的双启动桌面。

  • /dev/sda - 包含 Windows 的 SSD 驱动器
  • /dev/sdb - 包含 Ubuntu 的 SSD 驱动器
  • /dev/sdc - 包含两种操作系统数据的 HDD 驱动器

最近我将 SSD 驱动器从 MBR 切换到 GPT,并在我的 BIOS 中关闭了旧模式,所以现在是 UEFI。

从那以后,GRUB 消失了,我无法再次安装它。

首先,我尝试了从 live USB 启动的“常规”方式,chroot 到 /dev/sdb 上的系统并运行 grub-install。这会导致错误:

grub-install: warning: this GPT partition label contains no BIOS Boot Partition: embedding won't be possible
grub-install: error: embedding is not possible, but this is required for cross-disk install

将它安装到 /dev/sdb 是可能的,但是根据哪个设备获得启动优先级,在操作系统中没有选择(所以从 sda 启动,然后直接启动到 Windows,从 sdb 启动,然后直接启动到 Ubuntu)。

然后我尝试擦除 /dev/sdb 并从 live USB 重新安装,但在完成设置后,我收到一个错误,即无法安装 grub。不在 sda 上,不在 sdb 上。如果我第一次启动“尝试 Ubuntu”并更新,我将无济于事,这一步它一直失败。我尝试了 lvm 和常规,我尝试手动设置设备分区操作并让设置执行此操作。

我尝试在重新安装之前修复 Windows 启动,但没有任何改变(公平地说,Windows 启动正常,所以可能没有太多需要修复的东西)。我尝试了 bootrec.exe 的所有选项,我尝试了 bcdboot,我尝试了启动修复。

知道我还能尝试什么吗?

grub2 dual-boot gpt
  • 1 个回答
  • 1354 Views
Martin Hope
liaoweizhi
Asked: 2019-01-13 06:20:32 +0800 CST

当我使用 UEFI + GPT 安装带有自定义分区的 Ubuntu 16.04 时,我应该选择主要还是逻辑?

  • 7

当我使用 UEFI+ GPT 安装 Ubuntu 16.04 时,我感到不确定!为什么我不选择默认安装?因为它很愚蠢。

创建 EFI 分区时,应该选择主分区还是逻辑分区?

当我创建一个 EXT4 分区时,我应该选择主分区还是逻辑分区?

当我创建一个 SWAP 分区时,我应该选择主分区还是逻辑分区?

“预留引导区”的作用是什么?

uefi 16.04 gpt
  • 2 个回答
  • 19059 Views
Martin Hope
coolcatco888
Asked: 2018-07-22 17:58:09 +0800 CST

将混合 GPT/MBR 转换为纯 GPT 分区方案

  • 5

我想知道如何安全地将混合 GPT/MBR 转换为纯 GPT 分区方案?(无需重新格式化)

我问的原因是,我目前使用 Ubuntu 16.04 LTS、Windows 10 和 Mac OSX Lion 进行三次启动。

最初我需要使用混合分区方案格式化我的驱动器来安装 Windows 7,但我已经升级到 Windows 10。

我现在知道 Windows 10 支持从 GPT 分区启动,我想将所有内容转换为纯 GPT 分区方案而不重新格式化。

如果我能做到这一点,我将能够将我的 HFS+ 分区重新格式化为 APFS 分区并安装 High Sierra。

所以问题是:

  1. 如何将我的混合 MBR 转换为纯 GPT?
  2. 如果我这样做,它会破坏启动到我的任何操作系统吗?(Windows 10、Linux、MacOSX)

这是我的 gdisk 输出:

GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): CBC86EEB-C878-4C46-9963-120433EB0BED
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 8-sector boundaries
Total free space is 269477 sectors (131.6 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF02  EFI System Partition
   2          409640       293378391   139.7 GiB   AF00  Mac OSX
   3       293642240       684265471   186.3 GiB   0700  WINDOWS 7
   4       684265472      1075085311   186.4 GiB   0700  LINUX
   5      1075085865      1087375589   5.9 GiB     8200  
   6      1087375590      3907024064   1.3 TiB     0700  
partitioning mbr gpt
  • 2 个回答
  • 15176 Views
Martin Hope
George
Asked: 2018-07-04 03:32:28 +0800 CST

LTS 18.0.4 上的西班牙文版 GPT

  • 1

当我运行 gpt 时,我收到以下帮助消息:

Modo de uso: gpt [opções] algoritmos...

Opções:
   -v            mostra versão do programa
   -h            mostra esse texto
   -o <arquivo>  compila e salva programa como <arquivo>
   -t <arquivo>  salva o código em linguagem C como <arquivo>
   -s <arquivo>  salva o código em linguagem Assembly como <arquivo>
   -i            interpreta o algoritmo
   -d            exibe dicas no relatório de erros

   Maiores informações no manual.

我实际上不确定 GPT 是什么,我将它与 gdisk 混淆了一秒钟并尝试运行gpt /dev/disk,但我收到了一些西班牙语错误消息。

这是预期的行为吗?我不是在抱怨 Ubuntu 是多语言的,只是看起来很奇怪。我正在运行的版本uname -a是:Linux clickhouse_2 4.15.0-24-generic #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

lts 18.04 gpt
  • 1 个回答
  • 117 Views
Martin Hope
warsong
Asked: 2018-02-20 17:17:55 +0800 CST

如何在 Ubuntu 中将 MBR 驱动器(加密的 LVM 或未加密的 LVM)转换为 GPT?

  • 2

当未检测到 UEFI BIOS 时(例如当硬件不支持 EFI/太旧时),Ubuntu 安装程序默认设置为 MBR 驱动器。它仍然使用 LVM 作为自动分区方案。

在 Fedora 中,有一种方法可以强制安装程序使用引导标志 (inst.gpt) 创建带有 LVM 的 GPT 驱动器。

目前没有办法在 Ubuntu 上执行此操作,那么如何在安装后使用 LVM 方案将 MBR 驱动器转换为 GPT ?目前我发现的唯一文档(http://www.rodsbooks.com/gdisk/mbr2gpt.html)不包括 LVM 设置(加密与否)。

我正在尝试的设置是戴尔 Latitude E6400(2009 年制造,没有 EFI)上的 Ubuntu 16.04.6,但这适用于用户想要使用 GPT 而不是 MBR 的任何非 EFI 系统。目前,当我运行安装程序并选择 LVM(加密)时,安装程​​序会使用 MBR 创建方案。

虽然这里的一些答案可能适用于https://askubuntu.com/a/85857/39237,但它不包括 LVM(加密与否)。

请注意,我正在寻找的答案不一定需要涵盖加密的 LVM 设置(甚至可能不可能,但我还不能 100% 确定这一点)。涵盖未加密的 LVM 设置的答案是可以的。

lvm mbr gpt
  • 2 个回答
  • 1198 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve