This tutorial illustrates how to generate the microSD contents to use with Gentoo Linux ported by Kdev.
Insert a blank microSD card in an USB reader and umount it.
Type dmesg to see on wich device the microSD is allocated (for example /dev/sdc).
Create a primary partition using fdisk:
$ sudo fdisk /dev/sdc Command (m for help):
Type d to delete the current partition.
Command (m for help): d Selected partition 1
Now type n and p and 1 and Enter and Enter to create a new primary partition:
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-243, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-243, default 243): Using default value 243
So w to write the operation selected on the microSD card:
Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
Unmount the microSD ad create a ext2 filesystem on the partitioned microSD card typing:
$ sudo mke2fs -T small /dev/sdc1 mke2fs 1.41.4 (27-Jan-2009) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 489472 inodes, 1951864 blocks 97593 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=69206016 239 block groups 8192 blocks per group, 8192 fragments per group 2048 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553, 1024001 Writing inode tables: 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.
Now create a mount directory and mount on it the microSD card filesystems:
$ sudo mkdir /mnt/gentoo $ sudo mount /dev/sdc1 /mnt/gentoo
Move in your home directory and get the rootFS files fron KDev web site:
$ cd $ wget http://www.kdev.it/filesystem_gentoo_011009.tar --2009-10-05 17:12:12-- http://www.kdev.it/filesystem_gentoo_011009.tar Resolving www.kdev.it... 81.29.148.61 Connecting to www.kdev.it|81.29.148.61|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 371128118 (354M) [application/x-tar] Saving to: `filesystem_gentoo_011009.tar' 100%[========================================================================>] 371,128,118 512K/s in 12m 25s 2009-10-05 17:24:37 (487 KB/s) - `filesystem_gentoo_011009.tar' saved [371128118/371128118]
Move in the microSD mount point and untar the rootFS:
$ cd /mnt/gentoo $ sudo tar xzvpf /home/myhomedir/filesystem_gentoo_011009.tar .
When ends sync the microSD card:
$ sync $ cd
Unmount the microSD and use it with your FOX Board G20.