日期:2014-05-16  浏览次数:20854 次

sd卡分区和编译linux内核
1.对SD卡分区不要挂载SD卡 umount
2.查看SD卡 fdisk /dev/sdb
Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Selected partition 2

Command (m for help):
Command (m for help):
Command (m for help):
Command (m for help):
Command (m for help): p

Disk /dev/sdb: 1967 MB, 1967128576 bytes
61 heads, 62 sectors/track, 1015 cylinders, total 3842048 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 identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p1
Partition number (1-4, default 1): 1
First sector (2048-3842047, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-3842047, default 3842047): +512M

Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (1050624-3842047, default 1050624):
Using default value 1050624
Last sector, +sectors or +size{K,M,G} (1050624-3842047, default 3842047):
Using default value 3842047

Command (m for help): p

Disk /dev/sdb: 1967 MB, 1967128576 bytes
61 heads, 62 sectors/track, 1015 cylinders, total 3842048 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 identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     1050623      524288   83  Linux
/dev/sdb2         1050624     3842047     1395712   83  Linux

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 83

Command (m for help): p

Disk /dev/sdb: 1967 MB, 1967128576 bytes
61 heads, 62 sectors/track, 1015 cylinders, total 3842048 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 identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     1050623      524288    b  W95 FAT32
/dev/sdb2         1050624     3842047     1395712   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
root@ubuntu:/home/hero# mkfs.vfat /dev/