用什么命令格式化SD卡?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
VOKU
帖子: 15
注册时间: 2013-02-22 15:52
系统: 4YF158

用什么命令格式化SD卡?

#1

帖子 VOKU » 2013-02-22 19:07

:em06
mraandtux
论坛版主
帖子: 5211
注册时间: 2009-12-12 19:29
系统: Kubuntu

Re: 用什么命令格式化SD卡?

#2

帖子 mraandtux » 2013-02-22 19:28

试试磁盘实用工具。
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 用什么命令格式化SD卡?

#3

帖子 速腾1994 » 2013-02-22 19:39

mkfs.ext4 /dev/sdb1,2,,3
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 用什么命令格式化SD卡?

#4

帖子 速腾1994 » 2013-02-22 19:40

mkfs.vfat /dev/sdb1,2,3
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 用什么命令格式化SD卡?

#5

帖子 速腾1994 » 2013-02-22 19:42

需要安装dosfstools
arch

代码: 全选

yaourt -S dosfstools
ubuntu

代码: 全选

 sudo apt-get install dosfstools
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 用什么命令格式化SD卡?

#6

帖子 速腾1994 » 2013-02-22 19:44

首先你要测试你的sdcard的位置

代码: 全选

sudo fdisk -l
确认位置 /dev/sda这个大多是硬盘
/dev/sdb1?
/dev/sdc1?
VOKU
帖子: 15
注册时间: 2013-02-22 15:52
系统: 4YF158

Re: 用什么命令格式化SD卡?

#7

帖子 VOKU » 2013-02-22 20:02

mraandtux 写了:试试磁盘实用工具。
:em06
附件
Screenshot-1.png
Screenshot.png
mraandtux
论坛版主
帖子: 5211
注册时间: 2009-12-12 19:29
系统: Kubuntu

Re: 用什么命令格式化SD卡?

#8

帖子 mraandtux » 2013-02-22 20:20

那就Unmount掉SD卡呗
VOKU
帖子: 15
注册时间: 2013-02-22 15:52
系统: 4YF158

Re: 用什么命令格式化SD卡?

#9

帖子 VOKU » 2013-02-22 20:27

z@z:~$ sudo mkfs.vfat /dev/sdc
mkfs.vfat 3.0.3 (18 May 2009)
mkfs.vfat: unable to open /dev/sdc



出错了! :em06
上次由 VOKU 在 2013-02-22 20:51,总共编辑 1 次。
VOKU
帖子: 15
注册时间: 2013-02-22 15:52
系统: 4YF158

Re: 用什么命令格式化SD卡?

#10

帖子 VOKU » 2013-02-22 20:28

mraandtux 写了:那就Unmount掉SD卡呗
一,格式化SD卡,为什么要先umount?
二,umount命令,是否相当于菜单"卸载"?
三,umount命令的完整格式?
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 用什么命令格式化SD卡?

#11

帖子 速腾1994 » 2013-02-22 21:30

sudo unmount /dev/sdc1
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 用什么命令格式化SD卡?

#12

帖子 速腾1994 » 2013-02-22 21:33

sdc1
sdc2
不是sdc
VOKU
帖子: 15
注册时间: 2013-02-22 15:52
系统: 4YF158

Re: 用什么命令格式化SD卡?

#13

帖子 VOKU » 2013-02-22 22:10

z@z:~$ sudo umount /dev/sdc1
z@z:~$ sudo mkfs.vfat /dev/sdc1
mkfs.vfat 3.0.3 (18 May 2009)
mkfs.vfat: unable to open /dev/sdc1
z@z:~$


umount了,但是不能格式化啊! :em06
VOKU
帖子: 15
注册时间: 2013-02-22 15:52
系统: 4YF158

Re: 用什么命令格式化SD卡?

#14

帖子 VOKU » 2013-02-22 22:18

用“磁盘实用工具”格式化,显示以下错误:
Error erasing: helper exited with exit code 1: In part_del_partition: device_file=/dev/sdc, offset=16384
Entering MS-DOS parser (offset=0, size=16039018496)
MSDOS_MAGIC found
looking at part 0 (offset 16384, size 16039002112, type 0x0c)
new part entry
looking at part 1 (offset 0, size 0, type 0x00)
new part entry
looking at part 2 (offset 0, size 0, type 0x00)
new part entry
looking at part 3 (offset 0, size 0, type 0x00)
new part entry
Exiting MS-DOS parser
MSDOS partition table detected
Warning: Unable to open /dev/sdc read-write (Read-only file system). /dev/sdc has been opened read-only.
got it
Warning: Unable to open /dev/sdc read-write (Read-only file system). /dev/sdc has been opened read-only.
got disk
got partition - part->type=0
Warning: Unable to open /dev/sdc read-write (Read-only file system). /dev/sdc has been opened read-only.
Error: Can't write to /dev/sdc, because it is opened read-only.
ped_disk_commit() failed
附件
Screenshot.png
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 用什么命令格式化SD卡?

#15

帖子 速腾1994 » 2013-02-22 23:59

because it is opened read-only.
只读了?
回复