无论这样做是否可取,从通过 SATA 转 USB 适配器电缆连接的外部硬盘驱动器启动时:
这会导致黑屏简单地GRUB
左上角有。显然系统已冻结。
如何确定外部驱动器:
$
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 335.4G 0 disk
├─sdb2 8:18 0 4.9M 0 part
├─sdb3 8:19 0 300K 0 part
└─sdb1 8:17 0 2.8G 0 part /media/nicholas/Ubuntu 20.10 amd64
sr0 11:0 1 1024M 0 rom
sda 8:0 0 149G 0 disk
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 148.5G 0 part
│ ├─ubuntu--vg-swap_1 253:1 0 8G 0 lvm [SWAP]
│ └─ubuntu--vg-root 253:0 0 140.5G 0 lvm /
└─sda1 8:1 0 487M 0 part /boot
$
$
$ ls /media/nicholas/Ubuntu\ 20.10\ amd64/
boot boot.catalog casper dists EFI install md5sum.txt pics pool preseed README.diskdefines ubuntu
$
$ ls /media/nicholas/Ubuntu\ 20.10\ amd64/README.diskdefines
/media/nicholas/Ubuntu 20.10 amd64/README.diskdefines
$
$
$
$ nl /media/nicholas/Ubuntu\ 20.10\ amd64/README.diskdefines
1 #define DISKNAME Ubuntu 20.10 "Groovy Gorilla" - Release amd64
2 #define TYPE binary
3 #define TYPEbinary 1
4 #define ARCH amd64
5 #define ARCHamd64 1
6 #define DISKNUM 1
7 #define DISKNUM1 1
8 #define TOTALNUM 0
9 #define TOTALNUM0 1
$
$ sudo fdisk -l
Disk /dev/sda: 149 GiB, 160000000000 bytes, 312500000 sectors
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: dos
Disk identifier: 0x4e19221b
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 312498175 311496706 148.5G 5 Extended
/dev/sda5 1001472 312498175 311496704 148.5G 8e Linux LVM
Disk /dev/mapper/ubuntu--vg-root: 140.5 GiB, 150894280704 bytes, 294715392 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ubuntu--vg-swap_1: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
GPT PMBR size mismatch (5746099 != 703282605) will be corrected by w(rite).
Disk /dev/sdb: 335.4 GiB, 360080694272 bytes, 703282606 sectors
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: 7EE1FFAC-4072-46B8-885E-A7EA3F9C70CF
Device Start End Sectors Size Type
/dev/sdb1 64 5735483 5735420 2.8G Microsoft basic data
/dev/sdb2 5735484 5745435 9952 4.9M EFI System
/dev/sdb3 5745436 5746035 600 300K Microsoft basic data
$
$ dmidecode -t 2
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.5 present.
Handle 0x0002, DMI type 2, 10 bytes
Base Board Information
Manufacturer: Gateway
Product Name: G33M05G1
Version: MP
Serial Number: ULYM82502591
Asset Tag:
Features:
Board is a hosting board
$
可以啟動嗎?
这可能是因为这是一个SATA
驱动器用过的是否出现引导问题,或者其他硬件类型的问题或配置问题?
也可以看看:
结果sudo parted --list
是:
Model: ATA MB2000GCWLT (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 538MB 537MB primary fat32 boot
2 539MB 2000GB 2000GB extended
5 539MB 2000GB 2000GB logical lvm
Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? ok
Warning: Not all of the space available to /dev/sdb appears to be used, you can fix the GPT to use all of the space (an extra
697536506 blocks) or continue with the current setting?
Fix/Ignore? i
Model: Mass Storage Device (scsi)
Disk /dev/sdb: 360GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 32.8kB 2937MB 2937MB ISO9660 hidden, msftdata
2 2937MB 2942MB 5095kB Appended2 boot, esp
3 2942MB 2942MB 307kB Gap1 hidden, msftdata
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/vgubuntu-swap_1: 1023MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 1023MB 1023MB linux-swap(v1)
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/vgubuntu-root: 1999GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 1999GB 1999GB ext4
答案1
使用sudo parted --list
并寻找boot
-flag。
例如:
user@machine:~$ sudo parted --list
Model: SD USD00 (sd/mmc)
Disk /dev/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 269MB 268MB primary fat32 boot, lba
2 269MB 15.8GB 15.5GB primary ext4
答案2
此外部 SATA 硬盘通过 USB 适配器电缆连接,可以从另一台电脑上正常启动。
用 dd 写入的操作系统是从 Ubuntu 下载的桌面 ISO。
对 GPT 消息有点好奇,但除此之外似乎有用。
这不是一个完整的解决方案,因为出于某种原因,该驱动器似乎无法启动另一台电脑。
从外部硬盘启动时:
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 2G 1 loop /rofs
loop1 7:1 0 55.3M 1 loop /snap/core18/1885
loop2 7:2 0 217.9M 1 loop /snap/gnome-3-34-1804/60
loop3 7:3 0 50.7M 1 loop /snap/snap-store/481
loop4 7:4 0 62.1M 1 loop /snap/gtk-common-themes/1506
loop5 7:5 0 30.9M 1 loop /snap/snapd/9721
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 512M 0 part
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 1.8T 0 part
├─vgubuntu-root 253:0 0 1.8T 0 lvm
└─vgubuntu-swap_1 253:1 0 976M 0 lvm
sdb 8:16 0 335.4G 0 disk
├─sdb1 8:17 0 2.7G 0 part /cdrom
├─sdb2 8:18 0 4.9M 0 part
├─sdb3 8:19 0 300K 0 part
└─sdb4 8:20 0 332.6G 0 part /var/crash
sr0 11:0 1 1024M 0 rom
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/loop0: 1.98 GiB, 2125537280 bytes, 4151440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 55.32 MiB, 58007552 bytes, 113296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 217.89 MiB, 228478976 bytes, 446248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 50.67 MiB, 53133312 bytes, 103776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 62.09 MiB, 65105920 bytes, 127160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop5: 30.94 MiB, 32440320 bytes, 63360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: MB2000GCWLT
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: dos
Disk identifier: 0x4312a4c3
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1050623 1048576 512M b W95 FAT32
/dev/sda2 1052670 3907028991 3905976322 1.8T 5 Extended
/dev/sda5 1052672 3907028991 3905976320 1.8T 8e Linux LVM
Disk /dev/mapper/vgubuntu-root: 1.82 TiB, 1998833319936 bytes, 3903971328 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/vgubuntu-swap_1: 976 MiB, 1023410176 bytes, 1998848 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdb: 335.35 GiB, 360080694272 bytes, 703282606 sectors
Disk model: Storage Device
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: 7EE1FFAC-4072-46B8-885E-A7EA3F9C70CF
Device Start End Sectors Size Type
/dev/sdb1 64 5735483 5735420 2.7G Microsoft basic data
/dev/sdb2 5735484 5745435 9952 4.9M EFI System
/dev/sdb3 5745436 5746035 600 300K Microsoft basic data
/dev/sdb4 5746688 703282542 697535855 332.6G Linux filesystem
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=8083828k,nr_inodes=2020957,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1626960k,mode=755)
/dev/sdb1 on /cdrom type iso9660 (ro,noatime,nojoliet,check=s,map=n,blocksize=2048)
/dev/loop0 on /rofs type squashfs (ro,noatime)
/cow on / type overlay (rw,relatime,lowerdir=/filesystem.squashfs,upperdir=/cow/upper,workdir=/cow/work)
/dev/sdb4 on /var/log type ext4 (rw,relatime)
/dev/sdb4 on /var/crash type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=18984)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
/var/lib/snapd/snaps/core18_1885.snap on /snap/core18/1885 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-34-1804_60.snap on /snap/gnome-3-34-1804/60 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snap-store_481.snap on /snap/snap-store/481 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snapd_9721.snap on /snap/snapd/9721 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1506.snap on /snap/gtk-common-themes/1506 type squashfs (ro,nodev,relatime,x-gdu.hide)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=1626956k,nr_inodes=406739,mode=700,uid=999,gid=999)
gvfsd-fuse on /run/user/999/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=999,group_id=999)
portal on /run/user/999/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=999,group_id=999)
ubuntu@ubuntu:~$