玄柴へUSBflashmemory,SDHCカードをMount
古ぅいELECOM USB FLASH MEMORY MF-AU2512SV (512M)をマウントしてみる
とりあえず何のデータが入ってるか知らんがそのままフォーマットしてみる
root@KuroSheeva:/# dmesg
:
usb 1-1: new high speed USB device using ehci_marvell and address 4
usb 1-1: configuration #1 chosen from 1 choice
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
scsi 4:0:0:0: Direct-Access USB 2.0 Flash Disk 0.00 PQ: 0 ANSI: 2
sd 4:0:0:0: [sda] 1024000 512-byte hardware sectors (524 MB)
sd 4:0:0:0: [sda] Write Protect is off
sd 4:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 4:0:0:0: [sda] Assuming drive cache: write through
sd 4:0:0:0: [sda] 1024000 512-byte hardware sectors (524 MB)
sd 4:0:0:0: [sda] Write Protect is off
sd 4:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 4:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 4:0:0:0: [sda] Attached SCSI removable disk
sd 4:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
root@KuroSheeva:/# fdisk /dev/sda1Command (m for help): p
Disk /dev/sda1: 524 MB, 524271616 bytes
17 heads, 59 sectors/track, 1020 cylinders
Units = cylinders of 1003 * 512 = 513536 bytes
Disk identifier: 0x6b736964This doesn’t look like a partition table
Probably you selected the wrong device.Device Boot Start End Blocks Id System
/dev/sda1p1 ? 1696908 3321551 814758329+ 74 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(288, 110, 36) logical=(1696907, 15, 19)
Partition 1 has different physical/logical endings:
phys=(366, 104, 37) logical=(3321550, 10, 43)
Partition 1 does not end on cylinder boundary.
/dev/sda1p2 ? 1326206 1863570 269488144 65 Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(107, 121, 32) logical=(1326205, 9, 47)
Partition 2 has different physical/logical endings:
phys=(10, 121, 13) logical=(1863569, 13, 6)
Partition 2 does not end on cylinder boundary.
/dev/sda1p3 ? 537378 1931558 699181456 53 OnTrack DM6 Aux3
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(345, 32, 19) logical=(537377, 4, 25)
Partition 3 has different physical/logical endings:
phys=(324, 77, 19) logical=(1931557, 10, 42)
Partition 3 does not end on cylinder boundary.
/dev/sda1p4 ? 3898315 3898380 32672 bb Boot Wizard hidden
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(65, 1, 0) logical=(3898314, 8, 57)
Partition 4 has different physical/logical endings:
phys=(128, 0, 7) logical=(3898379, 11, 28)
Partition 4 does not end on cylinder boundary.Partition table entries are not in disk order
Command (m for help): d
Partition number (1-4): 1Command (m for help): d
Partition number (1-4): 2Command (m for help): d
Partition number (1-4): 3Command (m for help): d
Selected partition 4Command (m for help): p
Disk /dev/sda1: 524 MB, 524271616 bytes
17 heads, 59 sectors/track, 1020 cylinders
Units = cylinders of 1003 * 512 = 513536 bytes
Disk identifier: 0x6b736964Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1020, default 1):(エンター)
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1020, default 1020):(エンター)
Using default value 1020Command (m for help): p
Disk /dev/sda1: 524 MB, 524271616 bytes
17 heads, 59 sectors/track, 1020 cylinders
Units = cylinders of 1003 * 512 = 513536 bytes
Disk identifier: 0x6b736964Device Boot Start End Blocks Id System
/dev/sda1p1 1 1020 511500+ 83 LinuxCommand (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 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.root@KuroSheeva:/# mkfs.ext2 /dev/sda1
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
128016 inodes, 511984 blocks
25599 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
63 block groups
8192 blocks per group, 8192 fragments per group
2032 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409Writing inode tables: done
Writing superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@KuroSheeva:/# mkdir /mnt/usb
root@KuroSheeva:/# mount /dev/sda1 /mnt/usb
root@KuroSheeva:/# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 507M 210M 298M 42% /
tmpfs 252M 0 252M 0% /lib/init/rw
varrun 252M 44K 252M 1% /var/run
varlock 252M 0 252M 0% /var/lock
udev 252M 12K 252M 1% /dev
tmpfs 252M 0 252M 0% /dev/shm
tmpfs 252M 0 252M 0% /var/cache/apt
/dev/sda1 485M 2.3M 457M 1% /mnt/usb
無事だ。でぁ読み書きのテストをば
root@KuroSheeva:/# time dd if=/dev/zero of=/mnt/usb/test bs=1M count=128
128+0 records in
128+0 records out
134217728 bytes (134 MB) copied, 11.7497 s, 11.4 MB/sreal 0m11.757s
user 0m0.000s
sys 0m0.770s
root@KuroSheeva:/# time dd if=/mnt/usb/test of=/dev/null bs=1M count=128
128+0 records in
128+0 records out
134217728 bytes (134 MB) copied, 0.619077 s, 217 MB/sreal 0m0.625s
user 0m0.000s
sys 0m0.620s
root@KuroSheeva:/# rm -rf /mnt/usb/test
root@KuroSheeva:/# umount /mnt/usb
USBフラッシュメモリ -> 1M*128で書き込み11.4MB/s 読み込み217MB/s
TEAM SDHC TG032G0SD26A(Class6 32G)安心の10年保証 をマウントしてみる
root@KuroSheeva:/# dmesg
:
usb-storage: device scan complete
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD32G 31567872KiB
mmcblk0: p1
root@KuroSheeva:/# fdisk /dev/mmcblk0The number of cylinders for this disk is set to 986496.
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): p
Disk /dev/mmcblk0: 32.3 GB, 32325500928 bytes
4 heads, 16 sectors/track, 986496 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk identifier: 0xac844385Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-986496, default 1):(エンター)
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-986496, default 986496): +256MCommand (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (8194-986496, default 8194):(エンター)
Using default value 8194
Last cylinder, +cylinders or +size{K,M,G} (8194-986496, default 986496): +512MCommand (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (24579-986496, default 24579):(エンター)
Using default value 24579
Last cylinder, +cylinders or +size{K,M,G} (24579-986496, default 986496):(エンター)
Using default value 986496Command (m for help): p
Disk /dev/mmcblk0: 32.3 GB, 32325500928 bytes
4 heads, 16 sectors/track, 986496 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk identifier: 0xac844385Device Boot Start End Blocks Id System
/dev/mmcblk0p1 1 8193 262168 83 Linux
/dev/mmcblk0p2 8194 24578 524320 83 Linux
/dev/mmcblk0p3 24579 986496 30781376 83 LinuxCommand (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 82
Changed system type of partition 2 to 82 (Linux swap / Solaris)Command (m for help): p
Disk /dev/mmcblk0: 32.3 GB, 32325500928 bytes
4 heads, 16 sectors/track, 986496 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk identifier: 0xac844385Device Boot Start End Blocks Id System
/dev/mmcblk0p1 1 8193 262168 83 Linux
/dev/mmcblk0p2 8194 24578 524320 82 Linux swap / Solaris
/dev/mmcblk0p3 24579 986496 30781376 83 LinuxCommand (m for help): w
The partition table has been altered!Calling ioctl() to re-read partition table.
Syncing disks.
root@KuroSheeva:/# mkfs.ext2 /dev/mmcblk0p1
mke2fs 1.41.4 (27-Jan-2009)
warning: 23 blocks unused.Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
65792 inodes, 262145 blocks
13108 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
32 block groups
8192 blocks per group, 8192 fragments per group
2056 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185Writing inode tables: done
Writing superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@KuroSheeva:/# mkswap /dev/mmcblk0p2
Setting up swapspace version 1, size = 524316 KiB
no label, UUID=06a5883b-40c8-49c2-9825-730d12dda7bd
root@KuroSheeva:/# mkfs.ext2 /dev/mmcblk0p3
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1925120 inodes, 7695344 blocks
384767 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
235 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000Writing inode tables: done
Writing superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@KuroSheeva:/# mkdir /mnt/sdhc
root@KuroSheeva:/# mount /dev/mmcblk0p3 /mnt/sdhc
root@KuroSheeva:/# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 507M 210M 298M 42% /
tmpfs 252M 0 252M 0% /lib/init/rw
varrun 252M 44K 252M 1% /var/run
varlock 252M 0 252M 0% /var/lock
udev 252M 28K 252M 1% /dev
tmpfs 252M 0 252M 0% /dev/shm
tmpfs 252M 0 252M 0% /var/cache/apt
/dev/mmcblk0p3 29G 44M 28G 1% /mnt/sdhc
いんやぁすごい時間がかかりました。おそるおそる読み書きのチェック
root@KuroSheeva:/# time dd if=/dev/zero of=/mnt/sdhc/test bs=1M count=128
128+0 records in
128+0 records out
134217728 bytes (134 MB) copied, 131.782 s, 1.0 MB/sreal 2m11.792s
user 0m0.010s
sys 0m0.570s
root@KuroSheeva:/# time dd if=/mnt/sdhc/test of=/dev/null bs=1M count=128
128+0 records in
128+0 records out
134217728 bytes (134 MB) copied, 0.606175 s, 221 MB/sreal 0m0.612s
user 0m0.000s
sys 0m0.610s
root@KuroSheeva:/# rm -rf /mnt/sdhc/test
root@KuroSheeva:/# umount /mnt/sdhc
SDHC -> 1M*128で書き込み1.0MB/s 読み込み221MB/s
書き込みが…遅い。SheevaPlugのときもこれでKernel更新したのでした。
玄柴のkernelはSheevaPlugと同じ2.6.22.18。
どうも2.6.30以前(だったっけ?)はSDHCのI/Oでエラーがあるみたいなんですね。
カーネル更新しないと…。
