From my point of view, the default raspberry OS images or the installation script, lacks of some useful features, such as:
- Deployment from an image
- A bigger fat partition (useful for data exchange; it able to insert this SD in a Windows computer and copy files there)
- Additional partition for data (having system and data separated, it is possible to have smaller backups containing only system partition)
- Deployment from a installation script
- OSMC (installation script, creates a
- a 1st partition of 242MB FAT32-LBA
- a 2nd partition using the rest of the SD.
So, we can improve the default deployment with the following solutions:
- Deploy the standard image on a bigger SD card (default)
- Deploy the standard image on a bigger SD card and resize partitions (gparted)
- Manual method 1
- Manual method 2
- Deploy standard image on a bigger SD card
- Resize ext partition (decrease from begining) in order to free space after the fat32 partition
- Copy or pack (tar) files from fat32 partition
- Delete fat partition
- Create a new fat32 (lba) partition with desired size
- Paste, untar files on fat32 partition
Some examples of a "better" partition
Partition backups on imagesBackups to image can be done at partition level, using dd command or graphical tool (i.e Disks in Ubuntu)
To restore an image containing a partition, you have to create a partition on destination disk.
If you are using "Disks" and image size and destination partition have not the same size, it will alert you but don't worry it works.
Checking content of imagessudo fdisk /media/midisco/raspberry_cosas/OpenELEC-RPi.arm-4.0.5.img
Resizing OS from an image
GpartedIn theory with gparted it is possible to resize fat and ext partitions but it
sometimes can have problems resizing a fat32 filesystem, it means that partition have desired size but filesystem and available space still having the original size.
-usually works fine with ext2, ext3 partitions
Manual method for fat32 partitiondd partition1(fat32) on a disk
Copy or pack (tar) files from fat32 partition
Create a new fat32 (lba) partition with desired size
Paste, untar files