WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Prepare piCore SD card in core/corepure64  (Read 2441 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Prepare piCore SD card in core/corepure64
« on: February 23, 2017, 08:22:38 AM »
I just got myself an RPi3, loaded up piCore and everything worked first go  :)

In case anybody was wondering how to prepare the piCore SD card in core/corepure64

Insert SD card into laptop and check it is seen:
Code: [Select]
$ dmesg | tail -10
...
mmc0: new high speed SDHC card at address 0001
mmcblk0: mmc0:0001 00000 29.8 GiB
 mmcblk0: p1

Copy image to SD card:
Code: [Select]
$ unzip piCore-8.1.5.zip
Archive:  piCore-8.1.5.zip
  inflating: piCore-8.1.5.img
  inflating: piCore-8.1.5.img.md5.txt
  inflating: README

$ md5sum -c piCore-8.1.5.img.md5.txt
piCore-8.1.5.img: OK

$ sudo dd if=piCore-8.1.5.img of=/dev/mmcblk0
90112+0 records in
90112+0 records out
46137344 bytes (44.0MB) copied, 8.140182 seconds, 5.4MB/s

Check image was written correctly:
Code: [Select]
$ fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 32.0 GB, 32010928128 bytes
64 heads, 32 sectors/track, 30528 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1               5          34       30720   c Win95 FAT32 (LBA)
/dev/mmcblk0p2              35          44       10240  83 Linux

Resize second partition:
Code: [Select]
$ sudo fdisk /dev/mmcblk0

The number of cylinders for this disk is set to 30528.
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): d
Partition number (1-4): 2

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

Disk /dev/mmcblk0: 32.0 GB, 32010928128 bytes
64 heads, 32 sectors/track, 30528 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1               5          34       30720   c Win95 FAT32 (LBA)
/dev/mmcblk0p2              35       30528    31225856  83 Linux

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table

Check and resize filesystem:
Code: [Select]
$ sudo fsck.ext4 -f /dev/mmcblk0p2
e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mmcblk0p2: 55/2560 files (1.8% non-contiguous), 9584/10240 blocks

$ tce-load -i e2fsprogs
$ sudo resize2fs /dev/mmcblk0p2
resize2fs 1.42.13 (17-May-2015)
Resizing the filesystem on /dev/mmcblk0p2 to 31225856 (1k) blocks.
[takes several minutes]

Now all that's left is to compile flwm classic  :P