Zaurus

2006/4/26 08:02 PM 更新

SDカードのext3化

pdaXrom単体ではSWAPメモリがないためFireFoxなど重いアプリケーションを動かすには厳しい。
これを回避するためにSDカード上にSWAPを作成すればいい。
SDカード上にSWAPを作成するにはFATではなくext3フォーマットにする必要がある。

SDカード上のパーティションを再作成
# umount /mnt/user
# umount /mnt/card

# fdisk /dev/mmcd/disc0/disc

Command (m for help): d
Selected partition 1

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-960, default 1):1
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-960, default 960):960

Command (m for help): p

Disk /dev/mmcd/disc0/disc: 495 MB, 495452160 bytes
1 heads, 1 sectors/track, 967680 cylinders, total 967680 sectors
Units = cylinders of 1 * 512 = 512 bytes

               Device Boot           Start         End          Blocks   Id  System
/dev/mmcd/disc0/part1               1        960      483839+  83  Linux


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

Calling ioctl() to re-read partition table.
Syncing disks.
作成したパーティション上にext3ファイルシステムを作成する。
# mkfs.ext3 /dev/mmcd/disc0/part1
mke2fs 1.34 (25-Jul-2003)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
120960 inodes, 483836 blocks
24191 blocks (5.00%) reserved for the super user
First data block=1
60 block groups
8192 blocks per group, 8192 fragments per group
2016 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
定期的にfsckが走らないようにする
# tune2fs -c 0 -i 0 /dev/mmcd/disc0/part1
tune2fs 1.34 (25-Jul-2003)
Setting maximal mount count to -1
Setting interval between check 0 seconds
作成したパーティションをマウント
# mount /mnt/card
マウントされたか確認
# mount
rootfs                            on   /               type rootfs (rw)
/dev/root                      on   /                type jffs2 (rw,noatime)
none                             on   /dev         type devfs (rw)
/proc                             on   /proc         type proc (rw)
none                             on   /dev/shm  type tmpfs (rw)
none                             on   /dev/pts    type devpts (rw)
/dev/mmcd/disc0/part1 on   /mnt/card  type ext3 (rw,noatime,nosuid,nodev)