(2015-06-26, 11:12)vbat99 Wrote: But, I recall you suggesting to have a larger Fat partition than the default, like 512MB, with remaining as EXT4.
Can this be done under windows? or can you link me to info on how to do this.
Probably not with Windows - you might be able to install tools that sort of understand the ext2/3/4 file systems but IMHO you're better off using a Linux system, either booting a LiveCD or a virtual image. With a Linux system you can then use gparted to partition the SD card into FAT and ext4, sizing the FAT partition to be about 512MB. You could probably also do this on a Raspbian system with the SD card in a USB card reader.
If you've only got a command line, the following should partition the card correctly, and should work on a Pi, even an OpenELEC system, but you'll need to run this as root (not an issue for OpenELEC), and set the DISK variable to your SD card device (eg. /dev/sdb) - note this could
destroy your current system if you choose the wrong device (etc.)
Code:
# Set DISK to the SD card device eg. /dev/sdb, /dev/sdc etc. - check dmesg for details
DISK="/dev/sdX"
# Now create the partitions on $DISK:
umount ${DISK}* 2>/dev/null
parted -s "$DISK" mklabel msdos
parted -s "$DISK" mkpart primary fat32 -- 1MiB 512MiB
parted -s "$DISK" mkpart primary ext2 -- 516MiB -2cyl
parted -s "$DISK" set 1 boot on
partprobe "$DISK"
mkfs.vfat "${DISK}1" -I -n System
mkfs.ext4 -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 "${DISK}2" -L Storage
Check that alignment of both partitions is optimal:
Code:
parted "$DISK" align-check optimal 1
parted "$DISK" align-check optimal 2
When partition 1 and 2 are correctly aligned, the following should be output:
Once you've partitioned the SD card, copy the firmware/kernel/System files to the FAT partition:
- Mount the freshly formatted SD card - assume for the purposes of this guide that the FAT partition is mounted as /media/sd/System
- Extract all files from the OpenELEC tar file - assume the files are extracted to a directory called <extractdir>
- Copy the firmware, kernel and system files to the FAT partition, then delete the extract directory:
Code:
cp -r <extractdir>/3rdparty/bootloader/* /media/sd/System
cp <extractdir>/target/KERNEL /media/sd/System/kernel.img
cp <extractdir>/target/SYSTEM /media/sd/System/SYSTEM
rm -fr <extractdir>
- Unmount the SD card
- Install the SD card in the Raspberry Pi and boot OpenELEC