Describe WorkingGroups/ToolChain/IncreaseImageSize here.

Increase the size of rootfs in open embedded image for V8 model

Step 1: Get the openembedded image

Step 2: Increase the size of the image

  • Add 10 GB to the image "vexpress64-openembedded_lamp-armv8_20130423-299.img"

dd if=/dev/zero conv=notrunc oflag=append
of=vexpress64-openembedded_lamp-armv8_20130423-299.img bs=1M
count=8192
  • This command appended ~ 9GB space at the end of the image.

   8192+0 records in
   8192+0 records out
   8589934592 bytes (8.6 GB) copied, 86.4366 s, 99.4 MB/s

Step 3: Configuring the 10GB space in the second partition (root file system)

fdisk vexpress64-openembedded_lamp-armv8_20130423-299.img
Command (m for help) p
This will show partions in the image.
     Blocks   Id  System
     vexpress64-openembedded_lamp-armv8_20130423-299.img1   *       63 106494       53216    e  W95 FAT16 (LBA)
  vexpress64-openembedded_lamp-armv8_20130423-299.img2           106496  4194303     2043904   83  Linux
  • Now we need to delete the 2nd partition.

      Command (m for help) d
      Partition number (1-4): 2

  • Then recreate the partion 2 as shown below
  •      Command (m for help): n
         Partition type:
           p   primary (1 primary, 0 extended, 3 free)
           e   extended
        Select (default p): p 
        Partition number (1-4, default 2): 2
        First sector (106495-20971519, default 106495): 106496
        Last sector, +sectors or +size{K,M,G} (106496-20971519, default     20971519):
       Using default value 20971519
       Command (m for help): w
       The partition table has been altered!
       Syncing disks.

Step 4: Resize the image after booting

../Foundation_v8pkg/Foundation_v8 --image img-foundation.axf
--block-device vexpress64-openembedded_lamp-armv8_20130423-299.img
--network=nat --network-nat-ports=8022=22
  • Once booted now see in the xterm window

    df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/root        1.9G   1.2G  699M  66% /
  • To increase the size do resize2fs /dev/vda2.
  • This will increase the size to ~9GB.

    To confim do df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/root        9.8G   1.2G  8.3M  12% /

WorkingGroups/ToolChain/IncreaseImageSize (last modified 2013-05-28 06:41:11)