How to reduce Chromium OS image size?

40 views
Skip to first unread message

Jingwen Ye

unread,
Feb 17, 2022, 10:52:37 AM2/17/22
to Chromium OS Development
I want to boot Chromium OS in qemu, but the size of chromiumos_image.bin is 6.4G is larger than the limitation of QEMU (4GB). Hence, I try to reduce the size of chromiumos_image.bin to <2GB.

chromiumos_image.bin is built from by running 

./build_image --board=${BOARD} --noenable_rootfs_verification dev

and I need to run 

./build_packages --board=${BOARD}

first. Thus, I guess I should do something in these two steps to reduce the size of image (such as remove some package?). But I have no idea about this problem. Hope anyone can do me a favor.

Mike Frysinger

unread,
Feb 17, 2022, 11:06:35 AM2/17/22
to Jingwen Ye, Chromium OS Development
what do you mean by "limitation of QEMU (4GB)" ?  QEMU supports large disk sizes just fine ... in fact, we boot large disks all the time in QEMU.
-mike

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev

Allen Webb

unread,
Feb 17, 2022, 11:07:59 AM2/17/22
to Mike Frysinger, Jingwen Ye, Chromium OS Development
On Thu, Feb 17, 2022 at 10:06 AM Mike Frysinger <vap...@chromium.org> wrote:
what do you mean by "limitation of QEMU (4GB)" ?  QEMU supports large disk sizes just fine ... in fact, we boot large disks all the time in QEMU.
-mike

On Thu, Feb 17, 2022 at 10:52 AM Jingwen Ye <jy...@cornell.edu> wrote:
I want to boot Chromium OS in qemu, but the size of chromiumos_image.bin is 6.4G is larger than the limitation of QEMU (4GB). Hence, I try to reduce the size of chromiumos_image.bin to <2GB.

Are you sure you are not trying to pass the whole system image for the kernel image?
 

chromiumos_image.bin is built from by running 

./build_image --board=${BOARD} --noenable_rootfs_verification dev

and I need to run 

./build_packages --board=${BOARD}

first. Thus, I guess I should do something in these two steps to reduce the size of image (such as remove some package?). But I have no idea about this problem. Hope anyone can do me a favor.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev
---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Jingwen Ye

unread,
Feb 17, 2022, 10:29:44 PM2/17/22
to Chromium OS Development, Mike Frysinger, Chromium OS Development, Jingwen Ye
This is my first time to use QEMU, it showed an error (OS image larger than 4GB). Now I am trying to solve this problem with your guidance

Jingwen Ye

unread,
Feb 17, 2022, 10:29:44 PM2/17/22
to Chromium OS Development, Allen Webb, Jingwen Ye, Chromium OS Development, Mike Frysinger
Can you give me more detials about it? My idea is reducing the unnecessary part of image just like software. My PC memory is 8GB and it seems like cannot accept too large-size OS image

Mike Frysinger

unread,
Feb 17, 2022, 10:50:45 PM2/17/22
to Jingwen Ye, Chromium OS Development, Allen Webb
the image doesn't go into RAM.  so 8GB RAM doesn't matter.  this is your hard drive we're talking about here.  i doubt your PC has only an 8GB hard drive.

if you're unfamiliar with how to run QEMU on the command line, and you don't have a GUI in your distro to run it, use the cros_vm command in the CrOS checkout to launch the VM for you.
-mike


Reply all
Reply to author
Forward
0 new messages