Expand data.img ?

722 views
Skip to first unread message

Vincent Cojot

unread,
Jun 23, 2019, 4:31:26 PM6/23/19
to andro...@googlegroups.com
Hi all,
I am using 8.1r2 on a Lenovo Yoga 12 with Windows 10 on it (for BIOS updates, mostly). Things are working well but I had made the poor decision of creating a data.img that was only 16g in size.
In other words, under Windows (NTFS), I have a c:\android_8.1r2\data.img that is 16gb in size (it's sparse so it doesn't take up that amount of disk space).
Is there a way to expand that data.img.file to something bigger? I looked at the file but couldn't figure out what type of filesystem was on it.

Any ideas? I'f like to keep the data but expand the size of the img file to avoid running out of space too often.

Also, it seems that data.img only gets created if I select 'system as read-write' or is it only when installing onto an ntfs partition?

Btw, that latop upgraded just fine from 8.1r1 to 8.1r2. Thank you!

Vincent

DDS Central

unread,
Jun 23, 2019, 4:59:50 PM6/23/19
to Android-x86
File system is ext4. Use Linux resize2fs command to resize the file system after resizing the image file.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/CA%2Be54vPY67zU8W1ExqqAnuA0LWKwrPCfX9ZpMhiKYXbini%2BEmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Vincent Cojot

unread,
Jun 23, 2019, 5:43:32 PM6/23/19
to andro...@googlegroups.com
I could not even find a partition table in the img file. What format (if any) is the image file in? qcow2 images usually have a format type with virtual size and features. Or is that just an mkfile?

Chih-Wei Huang

unread,
Jun 24, 2019, 10:59:22 AM6/24/19
to Android-x86
Vincent Cojot <vin...@cojot.name> 於 2019年6月24日 週一 上午5:43寫道:
>
> I could not even find a partition table in the img file. What format (if any) is the image file in? qcow2 images usually have a format type with virtual size and features. Or is that just an mkfile?

It's just ext4 raw format.

Please read
https://groups.google.com/d/msg/android-x86/i6LvLR3DrRQ/Eu7jbdK1AwAJ

Vincent Cojot

unread,
Jun 24, 2019, 11:11:39 AM6/24/19
to andro...@googlegroups.com
Great,
Exactly what I was looking for.
Many thanks,
Vincent

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.

/包子大犬一起打

unread,
Jul 4, 2019, 5:24:01 AM7/4/19
to Android-x86
There are tools that can unpack data.img file in windows.

Vincent Cojot

unread,
Jul 4, 2019, 10:01:52 AM7/4/19
to andro...@googlegroups.com
Hi,
I'm using Linux mostly (even if this laptop dual boots) so after being made aware of the steps, it was a 1 minute task to expand data.img successfully.

For the record, I used this:
* Expand data.img:
Boot to debug mode, then

# mount -o remount,rw /mnt
# dd if=/dev/zero bs=1G count=8 >> /src/data.img
(append 8G space to /src/data.img)
# e2fsck -f /src/data.img
# resize2fs /src/data.img 


--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.

For more options, visit https://groups.google.com/d/optout.


--
,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,                                           Vincent S. Cojot, Computer Engineering. STEP project. _.,-*~'`^`'~*-,._.,-*~
Ecole Polytechnique de Montreal, Comite Micro-Informatique. _.,-*~'`^`'~*-,.
Linux Xview/OpenLook resources page _.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'
http://step.polymtl.ca/~coyote  _.,-*~'`^`'~*-,._ coy...@NOSPAM4cojot.name                                             
They cannot scare me with their empty spaces                                                                            Between stars - on stars where no human race is                                                                         I have it in me so much nearer home                                                                                     To scare myself with my own desert places.       - Robert Frost                      
Reply all
Reply to author
Forward
0 new messages