Or you could just boot the uSD card with the 2G uSD image and run:
sudo /opt/scripts/tools/grow_partition.sh
...then worst-case you only mess up your BeagleBone and not your x86 PC.
On 1/16/2015 8:45 PM, William Hermans wrote:
> Ok, so as a note to all those out there . . . to resize one of the 2G
> images to *any* sdcard size, The below "guide" will work. However, this is
> only tested on a single partition image, and if using a 2 partition image,
> you need to use the appropriate partition. **USE AT YOUR OWN RISK* *One
> single typo can render your file system and / or the boot loader inoperable
> . . .
>
> *These steps were taken on an i386 Debian install ( PC ) with the sdcard
> listed at /dev/sdc:*
>
> *william@eee-pc:~$ sudo fdisk /dev/sdc*
>
> *Command (m for help): p*
>
> Disk /dev/sdc: 3963 MB, 3963617280 bytes
> 184 heads, 31 sectors/track, 1357 cylinders, total 7741440 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/sdc1 * 2048 3481599 1739776 83 Linux
>
> *Command (m for help): d*
> Selected partition 1
> *Command (m for help): p*
>
> Disk /dev/sdc: 3963 MB, 3963617280 bytes
> 184 heads, 31 sectors/track, 1357 cylinders, total 7741440 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
>
> *Command (m for help): n*
> Partition type:
> p primary (0 primary, 0 extended, 4 free)
> e extended
>
> *Select (default p): p*
>
>
> *Partition number (1-4, default 1): 1First sector (2048-7741439, default
> 2048): 2048Last sector, +sectors or +size{K,M,G} (2048-7741439, default
> 7741439):*
> Using default value 7741439
>
> *Command (m for help): p*
>
> Disk /dev/sdc: 3963 MB, 3963617280 bytes
> 36 heads, 27 sectors/track, 7964 cylinders, total 7741440 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/sdc1 2048 7741439 3869696 83 Linux
>
> *Command (m for help): a*
> *Partition number (1-4): 1*
>
> *Command (m for help): p*
>
> Disk /dev/sdc: 3963 MB, 3963617280 bytes
> 36 heads, 27 sectors/track, 7964 cylinders, total 7741440 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/sdc1 * 2048 7741439 3869696 83 Linux
>
>
> *Command (m for help): w*
> The partition table has been altered!
>
> Calling ioctl() to re-read partition table.
> Syncing disks.
> william@eee-pc:~$
>
> *william@eee-pc:~$ sudo e2fsck -f /dev/sdc1*
> e2fsck 1.42.5 (29-Jul-2012)
> 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
> rootfs: 14430/108864 files (0.1% non-contiguous), 74875/434944 blocks
>
> *william@eee-pc:~$ sudo resize2fs /dev/sdc1*
> resize2fs 1.42.5 (29-Jul-2012)
> Resizing the filesystem on /dev/sdc1 to 967424 (4k) blocks.
> The filesystem on /dev/sdc1 is now 967424 blocks long.
>
> *Then on the Beagelbone Black once booted . . .*
>
> *root@beaglebone:~# df -h /*
> Filesystem Size Used Avail Use% Mounted on
> /dev/mmcblk0p1 3.7G 235M 3.2G 7% /
>
> *root@beaglebone:~# uname -a*
> Linux beaglebone 3.14.26-ti-r39 #1 SMP PREEMPT Mon Dec 8 04:56:09 UTC 2014
> armv7 l GNU/Linux
>
> *root@beaglebone:~# cat /ID.txt*
> BeagleBoard.org BeagleBone Debian Image 2014-11-19
>
> For those who may be wondering. This image was pulled off the recommended
> links for "official" testing images. The initial partition size is 2G (
> minimal command line image ). This is an "all-in-one" partition where the
> boot loader files are in a "1M hole" at the beginning of the sdcard.
> Initial kernel was 3.8.13-bone67 then upgraded to the latest 3.14.x TI
> kernel using APT.
>
> *root@beaglebone:~# ls /boot/*
--
Charles Steinkuehler
cha...@steinkuehler.net