2013-03-28 15:28:27 +01:00
|
|
|
Add empty space to the image
|
|
|
|
============================
|
|
|
|
|
|
|
|
Add 2Gb
|
|
|
|
|
2014-03-26 16:42:20 +01:00
|
|
|
> dd if=/dev/zero bs=1024k count=2048 >> 2014-01-07-wheezy-raspbian.img
|
2013-03-28 15:28:27 +01:00
|
|
|
|
2014-03-26 16:42:20 +01:00
|
|
|
Expand partition size
|
2013-03-28 15:28:27 +01:00
|
|
|
=====================
|
|
|
|
|
2014-03-26 16:42:20 +01:00
|
|
|
> fdisk 2014-01-07-wheezy-raspbian.img
|
2013-03-28 15:28:27 +01:00
|
|
|
|
|
|
|
Command (m for help): *p*
|
2013-03-26 18:13:35 +01:00
|
|
|
|
|
|
|
Disk 2013-02-09-wheezy-raspbian.img: 4087 MB, 4087349248 bytes
|
|
|
|
255 heads, 63 sectors/track, 496 cylinders, total 7983104 sectors
|
|
|
|
Units = sectors of 1 * 512 = 512 bytes
|
|
|
|
Sector size (logical/physical): 512 bytes / 512 bytes
|
|
|
|
I/O size (minimum/optimal): 512 bytes / 512 bytes
|
|
|
|
Disk identifier: 0x00014d34
|
|
|
|
|
|
|
|
Device Boot Start End Blocks Id System
|
|
|
|
2013-02-09-wheezy-raspbian.img1 8192 122879 57344 c W95 FAT32 (LBA)
|
2013-03-28 15:28:27 +01:00
|
|
|
2013-02-09-wheezy-raspbian.img2 *122880* 3788799 1832960 83 Linux
|
2013-03-26 18:13:35 +01:00
|
|
|
|
2013-03-28 15:28:27 +01:00
|
|
|
Command (m for help): *d*
|
|
|
|
Partition number (1-4): *2*
|
2013-03-26 18:13:35 +01:00
|
|
|
|
2013-03-28 15:28:27 +01:00
|
|
|
Command (m for help): *n*
|
2013-03-26 18:13:35 +01:00
|
|
|
Partition type:
|
|
|
|
p primary (1 primary, 0 extended, 3 free)
|
|
|
|
e extended
|
2013-03-28 15:28:27 +01:00
|
|
|
Select (default p):
|
|
|
|
Partition number (1-4, default 2):
|
|
|
|
First sector (2048-7983103, default 2048): *122880*
|
2013-03-26 18:13:35 +01:00
|
|
|
Last sector, +sectors or +size{K,M,G} (122880-7983103, default 7983103):
|
|
|
|
Using default value 7983103
|
|
|
|
|
2013-03-28 15:28:27 +01:00
|
|
|
Command (m for help): *w*
|
2013-03-26 18:13:35 +01:00
|
|
|
The partition table has been altered!
|
|
|
|
|
|
|
|
Syncing disks.
|
|
|
|
|
2013-03-28 15:28:27 +01:00
|
|
|
Resize partition
|
|
|
|
================
|
|
|
|
|
|
|
|
> df | grep /mnt/arm
|
|
|
|
|
2013-09-18 15:38:17 +02:00
|
|
|
/dev/loop0 3927752 1955672 1794172 53% /mnt/arm_rPi
|
|
|
|
/dev/loop1 57288 18960 38328 34% /mnt/arm_rPi/boot
|
2013-03-28 15:28:27 +01:00
|
|
|
|
2013-09-18 15:38:17 +02:00
|
|
|
sudo resize2fs /dev/loop0
|
2013-03-26 18:13:35 +01:00
|
|
|
|