打印

DM8168 SD启动卡的手动制作

[复制链接]
324|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
Plantt|  楼主 | 2017-9-23 11:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
DM8168 SD启动卡的手动制作



1、用fdisk 命令查看sd卡是否接入,接入的位置在什么地方
root@xubbwd-VirtualBox:~# fdisk -l
Disk /dev/sda: 429.5 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders, total 838860800 sectors
Units = 扇区 of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002b500
   设备 启动      起点          终点     块数   Id  系统
/dev/sda1   *        2048   836763647   418380800   83  Linux
/dev/sda2       836765694   838858751     1046529    5  扩展
/dev/sda5       836765696   838858751     1046528   82  Linux 交换 / Solaris
Disk /dev/sdb: 1948 MB, 1948254208 bytes
60 heads, 62 sectors/track, 1022 cylinders, total 3805184 sectors
Units = 扇区 of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
   设备 启动      起点          终点     块数   Id  系统

root@xubbwd-VirtualBox:~# df -lh
文件系统        容量  已用  可用 已用% 挂载点
/dev/sda1       393G  3.0G  370G    1% /
udev            492M  4.0K  492M    1% /dev
tmpfs           201M  780K  200M    1% /run
none            5.0M     0  5.0M    0% /run/lock
none            501M  200K  501M    1% /run/shm
share           405G   53G  352G   14% /media/sf_share
/dev/sr0         62M   62M     0  100% /media/VBOXADDITIONS_4.3.10_93012
/dev/sdb1       1.9G   17M  1.8G    1% /media/6C42-0744

2、删除分区
root@xubbwd-VirtualBox:~# fdisk /dev/sdb
命令(输入 m 获取帮助): d
Selected partition 1
命令(输入 m 获取帮助): wq
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

3、新建分区
root@xubbwd-VirtualBox:~# fdisk /dev/sdb
命令(输入 m 获取帮助): m
命令操作
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
命令(输入 m 获取帮助): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
分区号 (1-4,默认为 1): 1
起始 sector (2048-3805183,默认为 2048): 2048
Last sector, +扇区 or +size{K,M,G} (2048-3805183,默认为 3805183): 200000
命令(输入 m 获取帮助): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
分区号 (1-4,默认为 2): 2
起始 sector (200001-3805183,默认为 200001): 200001
Last sector, +扇区 or +size{K,M,G} (200001-3805183,默认为 3805183):
将使用默认值 3805183
命令(输入 m 获取帮助): wq
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
root@xubbwd-VirtualBox:~# fdisk -l
Disk /dev/sda: 429.5 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders, total 838860800 sectors
Units = 扇区 of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002b500
   设备 启动      起点          终点     块数   Id  系统
/dev/sda1   *        2048   836763647   418380800   83  Linux
/dev/sda2       836765694   838858751     1046529    5  扩展
/dev/sda5       836765696   838858751     1046528   82  Linux 交换 / Solaris
Disk /dev/sdb: 1948 MB, 1948254208 bytes
60 heads, 62 sectors/track, 1022 cylinders, total 3805184 sectors
Units = 扇区 of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
   设备 启动      起点          终点     块数   Id  系统
/dev/sdb1            2048      200000       98976+  83  Linux
/dev/sdb2          200001     3805183     1802591+  83  Linux

4、标准sdb1为启动盘
root@xubbwd-VirtualBox:/home# fdisk /dev/sdc
命令(输入 m 获取帮助): m
命令操作
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
命令(输入 m 获取帮助): a
分区号 (1-4): 1
命令(输入 m 获取帮助): wq
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

5、格式化分区
root@xubbwd-VirtualBox:~# mkfs
mkfs          mkfs.cramfs   mkfs.ext3     mkfs.ext4dev  mkfs.msdos    mkfs.vfat     
mkfs.bfs      mkfs.ext2     mkfs.ext4     mkfs.minix    mkfs.ntfs
root@xubbwd-VirtualBox:~# mkfs -V -t vfat /dev/sdb1
mkfs (util-linux 2.20.1)
mkfs.vfat /dev/sdb1
mkfs.vfat 3.0.12 (29 Oct 2011)
root@xubbwd-VirtualBox:~# mkfs -V -t ext3 /dev/sdb2
mkfs (util-linux 2.20.1)
mkfs.ext3 /dev/sdb2
mke2fs 1.42 (29-Nov-2011)
文件系统标签=
OS type: Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
112672 inodes, 450647 blocks
22532 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=465567744
14 block groups
32768 blocks per group, 32768 fragments per group
8048 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: 完成                           





相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

637

主题

901

帖子

4

粉丝