Ubuntu 下格式化 分区U盘SD 卡
2014-07-25 13:05
357 查看
大概有两种方式:命令行方式或图形界面方式
1.命令行
[plain] view
plaincopyprint?
sudo fdisk -l
查看你的设备的符号,显示结果通常如下:
[plain] view
plaincopyprint?
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c4c5b
Device Boot Start End Blocks Id System
/dev/sda1 * 1 60065 482466816 83 Linux
/dev/sda2 60065 60802 5917697 5 Extended
/dev/sda5 60065 60802 5917696 82 Linux swap / Solaris
Disk /dev/sdb: 1954 MB, 1954545664 bytes
255 heads, 63 sectors/track, 237 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00069760
找到你的设备的盘符,我的是 /dev/sdb
[html] view
plaincopyprint?
sudo umount /dev/sdb
[html] view
plaincopyprint?
sudo fdisk /dev/sdb
在终端显示内容如下:
[html] view
plaincopyprint?
Command (m for help):
输入m得到帮助信息:
[html] view
plaincopyprint?
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)
开始分区
如果你的设备已经有分区,先删除你的分区:
[html] view
plaincopyprint?
Command (m for help): d 删除命令
Partition number (1-4): 1 删除地几个分区
[html] view
plaincopyprint?
如果有多个分区,接着执行命令d,输入分区号
创建新分区:
[html] view
plaincopyprint?
Command (m for help): n 创建分区命令
Command action
e extended
p primary partition (1-4)
p 选择分区的类型 e:扩展分区 p:主分区
Partition number (1-4): 1 分区号 1:第一个分区
First cylinder (1-237, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-237, default 237): +512M 分区的大小
创建第二个分区:同上
[html] view
plaincopyprint?
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (67-237, default 67):
Using default value 67
Last cylinder, +cylinders or +size{K,M,G} (67-237, default 237): +512M
把第一个分区做为FAT32d 分区:
[html] view
plaincopyprint?
Command (m for help): t 改变分区的id
Partition number (1-4): 1 改变第一个分区
Hex code (type L to list codes): c 变为dos兼容的格式
Changed system type of partition 1 to c (W95 FAT32 (LBA))
查看分区情况:
[html] view
plaincopyprint?
Command (m for help): p
Disk /dev/sdb: 1954 MB, 1954545664 bytes
255 heads, 63 sectors/track, 237 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00069760
Device Boot Start End Blocks Id System
/dev/sdb1 1 66 530113+ c W95 FAT32 (LBA)
/dev/sdb2 67 132 530145 83 Linux
保存写入上面的内容:
[html] view
plaincopyprint?
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
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)
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
格式化分区:
[html] view
plaincopyprint?
sudo mkfs.vfat -F 32 -n boot /dev/sdb1 //boot是为分区起的名字,就是在硬盘上显示的名字 格式化位fat32格式 第一个分区<pre name="code" class="html">sudo mkfs.ext3 -L linux_fs /dev/sdb2 // linux_fs 是第二个分区的名字,格式化位 ext3格式</pre><br>
<p></p>
<pre></pre>
OK,Over。
<p></p>
<p><br>
</p>
2.图形界面:
需要安装分区工具:GParted,在Ubuntu 的软件中心搜索GParted,然后下载安装:
完成之后,在终端执行 sudo gpartedbin
在右上角选择你的设备是 /dev/sdb 2G的SD 卡
第一个按钮图标是创建新的分区:
以选择分区的类型 Primary或者 Extended,分区的大小 New size(MB),分区的格式 ,添加标签 Label,标签是分区的名字
我的第一个分区是 1024M, 主分区,FAT32 ,boot(分区的名字)
1.命令行
[plain] view
plaincopyprint?
sudo fdisk -l
查看你的设备的符号,显示结果通常如下:
[plain] view
plaincopyprint?
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c4c5b
Device Boot Start End Blocks Id System
/dev/sda1 * 1 60065 482466816 83 Linux
/dev/sda2 60065 60802 5917697 5 Extended
/dev/sda5 60065 60802 5917696 82 Linux swap / Solaris
Disk /dev/sdb: 1954 MB, 1954545664 bytes
255 heads, 63 sectors/track, 237 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00069760
找到你的设备的盘符,我的是 /dev/sdb
[html] view
plaincopyprint?
sudo umount /dev/sdb
[html] view
plaincopyprint?
sudo fdisk /dev/sdb
在终端显示内容如下:
[html] view
plaincopyprint?
Command (m for help):
输入m得到帮助信息:
[html] view
plaincopyprint?
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)
开始分区
如果你的设备已经有分区,先删除你的分区:
[html] view
plaincopyprint?
Command (m for help): d 删除命令
Partition number (1-4): 1 删除地几个分区
[html] view
plaincopyprint?
如果有多个分区,接着执行命令d,输入分区号
创建新分区:
[html] view
plaincopyprint?
Command (m for help): n 创建分区命令
Command action
e extended
p primary partition (1-4)
p 选择分区的类型 e:扩展分区 p:主分区
Partition number (1-4): 1 分区号 1:第一个分区
First cylinder (1-237, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-237, default 237): +512M 分区的大小
创建第二个分区:同上
[html] view
plaincopyprint?
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (67-237, default 67):
Using default value 67
Last cylinder, +cylinders or +size{K,M,G} (67-237, default 237): +512M
把第一个分区做为FAT32d 分区:
[html] view
plaincopyprint?
Command (m for help): t 改变分区的id
Partition number (1-4): 1 改变第一个分区
Hex code (type L to list codes): c 变为dos兼容的格式
Changed system type of partition 1 to c (W95 FAT32 (LBA))
查看分区情况:
[html] view
plaincopyprint?
Command (m for help): p
Disk /dev/sdb: 1954 MB, 1954545664 bytes
255 heads, 63 sectors/track, 237 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00069760
Device Boot Start End Blocks Id System
/dev/sdb1 1 66 530113+ c W95 FAT32 (LBA)
/dev/sdb2 67 132 530145 83 Linux
保存写入上面的内容:
[html] view
plaincopyprint?
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
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)
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
格式化分区:
[html] view
plaincopyprint?
sudo mkfs.vfat -F 32 -n boot /dev/sdb1 //boot是为分区起的名字,就是在硬盘上显示的名字 格式化位fat32格式 第一个分区<pre name="code" class="html">sudo mkfs.ext3 -L linux_fs /dev/sdb2 // linux_fs 是第二个分区的名字,格式化位 ext3格式</pre><br>
<p></p>
<pre></pre>
OK,Over。
<p></p>
<p><br>
</p>
2.图形界面:
需要安装分区工具:GParted,在Ubuntu 的软件中心搜索GParted,然后下载安装:
完成之后,在终端执行 sudo gpartedbin
在右上角选择你的设备是 /dev/sdb 2G的SD 卡
第一个按钮图标是创建新的分区:
以选择分区的类型 Primary或者 Extended,分区的大小 New size(MB),分区的格式 ,添加标签 Label,标签是分区的名字
我的第一个分区是 1024M, 主分区,FAT32 ,boot(分区的名字)
相关文章推荐
- Ubuntu 下格式化 分区U盘SD 卡
- Ubuntu 下格式化 分区U盘SD 卡
- 在ubuntu下删除U盘分区及多分区格式化
- Ubuntu下分区格式化U盘(fdisk&&mkfs)
- Ubuntu下格式化并分区u盘
- 文件系统结束Ubuntu下分区格式化U盘(fdisk&&mkfs)
- Ubuntu 分区与格式化
- 不用光驱,不用分区,不用格式化,硬盘模式安装双系统XP+linux ubuntu==wubi
- windows 无法格式化U盘为 NTFS 可以在 ubuntu 完成
- Ubuntu下分区格式化U盘(fdisk&&mkfs)
- 让死掉的U盘起死回生,使用UBUNTU给U盘格式化
- windows7下格式化ubuntu分区后造成win7无法引导解决方法
- linux分区与格式化(ubuntu)
- Ubuntu 硬盘”分区“图文教程(用于光盘,U盘安装Ubuntu)
- 在linux下对U盘进行格式化及分区
- Linux下对U盘的分区与格式化
- 解决Ubuntu自动挂载U盘/SD Card被识别为只读文件系统
- ubuntu 怎么格式化U盘?
- ubuntu 格式化u盘