id = 1754 title = "QEMU wrongly requires SD card sizes to be a power of two" state = "opened" created_at = "2023-07-07T22:08:46.264Z" closed_at = "n/a" labels = [] url = "https://gitlab.com/qemu-project/qemu/-/issues/1754" host-os = "Linux" host-arch = "x86" qemu-version = "8.0.50" guest-os = "Raspberry Pi OS" guest-arch = "ARM" description = """QEMU arbitrarily requires SD card sizes to be a power of 2. However, this behavior does not match the real world, and I am unable to pass a *physical* SD card into the guest operating system. ``` $ sudo qemu-system-aarch64 -M raspi2b -drive file=/dev/mmcblk0,if=sd,format=raw qemu-system-aarch64: Invalid SD card size: 29.7 GiB SD card size has to be a power of 2, e.g. 32 GiB. You can resize disk images with 'qemu-img resize ' (note that this will lose data if you make the image smaller than it currently is). ```""" reproduce = """1. Insert a physical SD card into your host system and make a note of its device name. It will be something like `/dev/mmcblk0` 2. Attempt to start a guest OS with the SD card attached. See the command above. 3. You will get an error saying that the card size is not a power of two.""" additional = """"""