标签:
杂谈 |
mount -t vfat /dev/mmcblk0p1 /mnt/sd/
/dev/mmcblk0p1 is write-protected, mounting read-only
查了一下后发现解决办法如下:
原文来自:http://ubuntuforums.org/archive/index.php/t-341241.html
Mount my SD card writable
I have a SD card reader integrated in my laptop. I followed the procedure described at ThinkWiki (http://www.thinkwiki.org/wiki/Ho ... .10_.27edgy_eft.27:) so the card is auto mounted when inserted.
But it is mounted as readable only. So I unmounted the device and tried to mount it writable:
/media$ sudo mount /dev/mmcblk0p1 mmcdisk/ -rw
mount: block device /dev/mmcblk0p1 is write-protected but explicit `-w' flag given
And the card is not mounted.
However, I know it is not write-protected because my camera can write photos on it!
So, how am I supposed to make this card writable with Ubuntu?
1. 更换命令继续尝试
mount -t vfat /dev/mmcblk0p1 /media/mmcdisk -o iocharset=utf8,umask=000 仍然报错。
2. 查看硬盘及分区类型
And you think it's vfat/fat32! What's the output of this command from a terminal?
fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 9331 74951226 83 Linux
/dev/hda2 9332 9729 3196935 5 Extended
/dev/hda5 9332 9729 3196903+ 82 Linux swap / Solaris
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda doesn't contain a valid partition table
Disk /dev/mmcblk0: 252 MB, 252968960 bytes
16 heads, 32 sectors/track, 965 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 1 965 246989+ 6 FAT16
说明SD卡的格式是fat16,不是ntfs,没问题。
3. 修改fstab,以rv选择mount,成功!
Remount SD card with rv options.
mkdir /media/sdcard
chmod u+w /media/sdcard
then edit /etc/fstab, and add the following:
/dev/mmcblk0p1 /media/sdcard auto umask=0,rw,user,auto 0 0
mount -o remount -o rv /dev/mmcblk0p1
That's what I've just done and it's working.