YMMV

* your mileage may vary

Sunday, 27 April 2014

Beaglebone Black (BBB) Resize Partitions

BBB img files are usually about 1.6G and don't use all of the available disk space.  Use gparted or fdisk to expand the file system to use the full disk.  

Caution:  can be dangerous
confirm which disk to resize 
df -h
(normally /dev/mmcblk0)
fdisk /dev/mmcblk0
p (to print the current table)
should see something like this:
 Disk /dev/mmcblk0: 8010 MB, 8010072064 bytes
4 heads, 16 sectors/track, 244448 cylinders, total 15644672 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: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *        2048      198655       98304    e  W95 FAT16 (LBA)
/dev/mmcblk0p2          198656    15644671     7723008   83  Linux

(select default values - normally should be ok)
d (to delete partition)
2 (2nd partition)
n
2 (2nd partition)
p (for primary)
w (to commit the changes)
resize2fs /dev/mmcblk0
reboot 

No comments:

Post a Comment