Originally Published: Wednesday, 6 June 2001 Author: Mike Baker
Published to: develop_articles/Development Articles Page: 4/9 - [Printable]

OSDN Handheld Months: Installing Linux on a Casio E105

Linux.com Senior Developer Mike Baker takes us step-by-step through installing a Linux system on a MIPS-based Windows CE device. If pre-built distributions are not for you, then this article is.

  << Page 4 of 9  >>

Partitioning the Compact Flash

Partitioning the compact flash card is easy enough, if you use a compact flash to PCMCIA adapter you can just stick the card into any laptop running Linux and it'll show up as a hard-drive. If you don't have access to a laptop running Linux you can purchase either a PCMCIA adapter card or a compact flash USB adapter. If you decide to use a USB adapter you may find this article of some use. It may even be possible to repartition a compact flash card using Windows, however you'll need to be able to mount the ext2 partition so it won't help much.

Partitioning is done with nothing more than Linux's fdisk. It's assumed that the compact flash is /dev/hde.

$ fdisk /dev/hde

Command (m for help): p

Disk /dev/hde: 4 heads, 32 sectors, 978 cylinders
Units = cylinders of 128 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde1 * 1 978 62576 6 FAT16

Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-978, default 1): <enter>
Last cylinder or +size or +sizeM or +sizeK (1-978, default 978): +5M

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 6
Changed system type of partition 1 to 6 (FAT16)

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

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

Calling ioctl() to re-read partition table.

$ mkdosfs /dev/hde1
mkdosfs 2.8 (28 Feb 2001)
$ mke2fs /dev/hde2
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
warning: 63 blocks unused.

Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
14392 inodes, 57345 blocks
2870 blocks (5.00%) reserved for the super user
First data block=1
7 block groups
8192 blocks per group, 8192 fragments per group
2056 inodes per group
Superblock backups stored on blocks:

8193, 24577, 40961

Writing inode tables: done
Writing superblocks and filesystem accounting information: done





  << Page 4 of 9  >>