|
我在按照《SD系统启动制作方法》的内容制作SD卡时失败,并且SD原来的两个分区
找不到了,估计是被破坏掉了。下面是我按照资料里面的执行步骤:
1. sudo fdisk -l ---> 终端会显示SD卡的设备节点名为 sdd 其中两个分区分别为sdd1和sdd2
2. sudo ./mksdboot-tl.sh --device /dev/sdd
希望各位路过的大侠帮忙分析一下原因,谢谢!
以下是具体执行信息:
tronlong@tronlong-virtual-machine:/media/tronlong/nfs/sdboot/mksdboot-tl$ sudo fdisk -l
[sudo] password for tronlong:
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 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: 0x2e7082af
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 39845887 39843840 19G 83 Linux
/dev/sda2 39847934 41940991 2093058 1022M 5 Extended
/dev/sda5 39847936 41940991 2093056 1022M 82 Linux swap / Solaris
Disk /dev/sdc: 20 GiB, 21474836480 bytes, 41943040 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: 20 GiB, 21474836480 bytes, 41943040 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/sdd: 7.4 GiB, 7948206080 bytes, 15523840 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: 0x0470f66e
Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 63 1911734 1911672 933.4M c W95 FAT32 (LBA)
/dev/sdd2 1911735 15518789 13607055 6.5G 83 Linux
tronlong@tronlong-virtual-machine:/media/tronlong/nfs/sdboot/mksdboot-tl$ sudo ./mksdboot-tl.sh --device /dev/sdd
************************************************************
* THIS WILL DELETE ALL THE DATA ON /dev/sdd *
* *
* WARNING! Make sure your computer does not go *
* in to idle mode while this script is *
* running. The script will complete, *
* but your SD card may be corrupted. *
* *
* Press <ENTER> to confirm.... *
************************************************************
unmounting device '/dev/sdd1'
unmounting device '/dev/sdd2'
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 1.0536 s, 995 kB/s
sfdisk: invalid option -- 'D'
Usage:
sfdisk [options] <dev> [[-N] <part>]
sfdisk [options] <command>
Display or manipulate a disk partition table.
Commands:
-A, --activate <dev> [<part> ...] list or set bootable MBR partitions
-d, --dump <dev> dump partition table (usable for later input)
-J, --json <dev> dump partition table in JSON format
-g, --show-geometry [<dev> ...] list geometry of all or specified devices
-l, --list [<dev> ...] list partitions of each device
-F, --list-free [<dev> ...] list unpartitions free areas of each device
-s, --show-size [<dev> ...] list sizes of all or specified devices
-T, --list-types print the recognized types (see -X)
-V, --verify [<dev> ...] test whether partitions seem correct
--part-label <dev> <part> [<str>] print or change partition label
--part-type <dev> <part> [<type>] print or change partition type
--part-uuid <dev> <part> [<uuid>] print or change partition uuid
--part-attrs <dev> <part> [<str>] print or change partition attributes
<dev> device (usually disk) path
<part> partition number
<type> partition type, GUID for GPT, hex for MBR
Options:
-a, --append append partitions to existing partition table
-b, --backup backup partition table sectors (see -O)
--bytes print SIZE in bytes rather than in human readable format
-f, --force disable all consistency checking
--color[=<when>] colorize output (auto, always or never)
colors are enabled by default
-N, --partno <num> specify partition number
-n, --no-act do everything except write to device
--no-reread do not check whether the device is in use
-O, --backup-file <path> override default backup file name
-o, --output <list> output columns
-q, --quiet suppress extra info messages
-X, --label <name> specify label type (dos, gpt, ...)
-Y, --label-nested <name> specify nested label type (dos, bsd)
-L, --Linux deprecated, only for backward compatibility
-u, --unit S deprecated, only sector unit is supported
-h, --help display this help and exit
-v, --version output version information and exit
Available columns (for -o):
gpt: Device Start End Sectors Size Type Type-UUID Attrs Name UUID
dos: Device Start End Sectors Cylinders Size Type Id Attrs Boot End-C/H/S
Start-C/H/S
bsd: Slice Start End Sectors Cylinders Size Type Bsize Cpg Fsize
sgi: Device Start End Sectors Cylinders Size Type Id Attrs
sun: Device Start End Sectors Cylinders Size Type Id Flags
For more details see sfdisk(8).
ERROR
tronlong@tronlong-virtual-machine:/media/tronlong/nfs/sdboot/mksdboot-tl$
|
|