- # fdisk /dev/sda
- The number of cylinders for this disk is set to 35560.
- There is nothing wrong with that, but this is larger than 1024,
- and could in certain setups cause problems with:
- 1) software that runs at boot time (e.g., old versions of LILO)
- 2) booting and partitioning software from other OSs
- (e.g., DOS FDISK, OS/2 FDISK)
- Command (m for help): m #<------------显示fdisk菜单
- Command action
- 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)
- Command (m for help): p #<--------------------打印分区表
- Disk /dev/sda: 2002 MB, 2002780160 bytes
- 11 heads, 10 sectors/track, 35560 cylinders
- Units = cylinders of 110 * 512 = 56320 bytes
- Device Boot Start End Blocks Id System
- /dev/sda1 2 35561 1955775+ b W95 FAT32 #原有的FAT32分区
- Command (m for help): d #<-------------删除一个分区
- Selected partition 1
- Command (m for help): n #<-------------新建一个分区
- Command action
- e extended
- p primary partition (1-4)
- p #<--------------选择创建 primary 首要分区
- Partition number (1-4): 1 #<---------第一个首要分区
- First cylinder (1-35560, default 1): #<---------起始位置,直接回车用缺省值
- Using default value 1
- Last cylinder or +size or +sizeM or +sizeK (1-35560, default 35560): 300M
- #<---- 第一个分区使用 300M空间
- Command (m for help): p
- Disk /dev/sda: 2002 MB, 2002780160 bytes
- 11 heads, 10 sectors/track, 35560 cylinders
- Units = cylinders of 110 * 512 = 56320 bytes
- Device Boot Start End Blocks Id System
- /dev/sda1 1 300 16495 83 Linux
- Command (m for help): n #<----建第二个分区
- Command action
- e extended
- p primary partition (1-4)
- p #<--------------选择创建 primary 首要分区
- Partition number (1-4): 2 #<---------第二个首要分区
- First cylinder (301-35560, default 301):
- Using default value 301
- Last cylinder or +size or +sizeM or +sizeK (301-35560, default 35560):
- Using default value 35560 #直接回车表示缺省值,即把剩下所有空间都归入这个分区
- Command (m for help): p
- Disk /dev/sda: 2002 MB, 2002780160 bytes
- 11 heads, 10 sectors/track, 35560 cylinders
- Units = cylinders of 110 * 512 = 56320 bytes
- Device Boot Start End Blocks Id System
- /dev/sda1 1 300 16495 83 Linux
- /dev/sda2 301 35560 1939300 83 Linux
- Command (m for help): w #<-------将分区表写入SD卡,至此才真正生效
- The partition table has been altered!
- Calling ioctl() to re-read partition table.
- Syncing disks.
- # mkfs.vfat /dev/sda1 #<----------格式化命令
- mkfs.vfat 2.11 (12 Mar 2005)
- [root@tch u-boot-1.1.6_hxy6410]# mkfs.ext3 /dev/sda2 #<------格式化命令
- mke2fs 1.39 (29-May-2006)
- Filesystem label=
- OS type: Linux
- Block size=4096 (log=2)
- Fragment size=4096 (log=2)
- 242880 inodes, 484825 blocks
- 24241 blocks (5.00%) reserved for the super user
- First data block=0
- Maximum filesystem blocks=499122176
- 15 block groups
- 32768 blocks per group, 32768 fragments per group
- 16192 inodes per group
- Superblock backups stored on blocks:
- 32768, 98304, 163840, 229376, 294912
- Writing inode tables: done
- Creating journal (8192 blocks): done
- Writing superblocks and filesystem accounting information:
- done
- This filesystem will be automatically checked every 33 mounts or
- 180 days, whichever comes first. Use tune2fs -c or -i to override.
1. 输入 m 显示所有命令列示。
2. 输入 p 显示硬盘分割情形。
3. 输入 a 设定硬盘启动区。
4. 输入 n 设定新的硬盘分割区。
4.1. 输入 e 硬盘为[扩展]分割区(extend)。
4.2. 输入 p 硬盘为[首要]分割区(primary)。
5. 输入 t 改变硬盘分割区属性。
6. 输入 d 删除硬盘分割区属性。
7. 输入 q 结束不存入硬盘分割区属性。
8. 输入 w 结束并写入硬盘分割区属性如果以前U盘有分区,需要输入d命令来依次删除分区,以下执行两次n命令创建一个 400M的FAT分区,以及把剩下的分区设为ext3,最后用w命令把结果保存下来.
Command (m for help): n Command action Command (m for help): n Command (m for help): p Disk /dev/sdb: 2041 MB, 2041577472 bytes Device Boot Start End Blocks Id System Command (m for help): w Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: 设备或资源忙. WARNING: If you have created or modified any DOS 6.x |
<*> Ext3 journalling file system support [*] Ext3 extended attributes [*] Ext3 POSIX Access Control Lists [*] Ext3 Security Labels |
--- MMC/SD/SDIO card support [*] MMC debugging [ ] Allow unsafe resume (DANGEROUS) *** MMC/SD/SDIO Card Drivers *** <*> MMC block device driver [*] Use bounce buffer for simple hosts <*> SDIO UART/GPS class support <*> MMC host test driver *** MMC/SD/SDIO Host Controller Drivers *** <*> Secure Digital Host Controller Interface support <*> Samsung S3C SD/MMC Card Interface support |
[root: /]# s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz). s3c2440-sdi s3c2440-sdi: running at 16875kHz (requested: 25000kHz). s3c2440-sdi s3c2440-sdi: running at 16875kHz (requested: 25000kHz). mmc0: new SD card at address 0002 mmcblk0: mmc0:0002 00000 1.90 GiB mmcblk0: p1 p2 FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! |
brw-rw---- 1 root root 179, 0 Sep 22 10:48 /dev/mmcblk0
brw-rw---- 1 root root 179, 2 Sep 22 10:48 /dev/mmcblk0p2