制作SD系统启动卡问题 - TMS320DM8148 - 嵌入式开发者社区 - 51ele.net
设为首页收藏本站

嵌入式开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 4902|回复: 2
打印 上一主题 下一主题

[已解决] 制作SD系统启动卡问题

[复制链接]

9

主题

23

帖子

1156

积分

金牌会员

Rank: 6Rank: 6

积分
1156
跳转到指定楼层
楼主
发表于 2017-6-29 15:56:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我在按照《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$


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏1 分享淘帖
回复

使用道具 举报

0

主题

1

帖子

18

积分

新手上路

Rank: 1

积分
18
沙发
发表于 2017-6-30 00:02:33 | 只看该作者
    在Ubuntu16.04中的分区工具sfdisk做了很多改动,原因是,之前的sfdisk有很多危险选项,可以轻易的修改磁盘CHS参数(分别指柱面,磁头,扇区),这会改变硬盘和分区的设备!!    所以为了使sfdisk更加安全,到了Ubuntu16.04的时候其实不仅-D 选项是无效的,还剔除了很多危险参数。比如在Ubuntu16.04(14.04不知道)之前,都是使用 sfdisk -D -H 255 -S 63 -C $total_cyln $device这条命令来设置分区大小的,但是到了16.04所有参数都不能用了。用sfdisk新的选项的话,网上教材不多,所以那时候我尝试了很多次都没成功。后来打算用parted来分区(是一种可以分2T以上的磁盘分区工具,sfdisk 只能分2T以下),参考别人写的,然后做了替换,在Ubuntu16.04可以成功制作启动卡,我以为这样就可以了,但是后来装到板子上却无法启动内核,卡在启动界面上。无奈只能灰溜溜的放弃了。。。。(好悲催
    我的解决方法,将Ubuntu换回12.04.就不回出现这种问题了!!后来我的师兄跟我说,在实际工程开发中,基本都是使用Ubuntu12.04或者10.04进行开发,所以不要一味的追求最新版的Ubuntu系统,先让其他人去踩踩坑,把问题解决了,我们再去学习的时候就有前车之鉴了,哈哈哈。。。要听大神师兄的话才是硬道理,而sfdisk新用法的话,可以自己私底下慢慢去摸索。所以我建议你换回12.04


回复 支持 反对

使用道具 举报

9

主题

23

帖子

1156

积分

金牌会员

Rank: 6Rank: 6

积分
1156
板凳
 楼主| 发表于 2017-6-30 14:00:05 | 只看该作者
Flypei 发表于 2017-6-30 00:02
在Ubuntu16.04中的分区工具sfdisk做了很多改动,原因是,之前的sfdisk有很多危险选项,可以轻易的修改 ...

我一开始也怀疑是版本的问题,但是就是不想放弃已经安装使用的16.04,因为我已经基本配置好了很多开发环境,一重新换版本又得浪费几天时间,可是现在发现,不换浪费的时间更多今天果断重新安装了12.04的版本,你说的很对,新版本不是我这等菜鸟玩的起的……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|嵌入式开发者社区 ( 粤ICP备15055271号

GMT+8, 2024-4-20 07:12 , Processed in 0.038379 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2015 Comsenz Inc.

快速回复 返回顶部 返回列表