A VPS provider offers its users the ability to install and run any distribution, provided that you upload a bootable ISO image.
I'd like to run Ubuntu Core, however I haven't found a way to convert the images that Canonical provides to a bootable ISO.
qemu-img
reports that the image is in raw
format:
[chb]$ qemu-img info ubuntu-core-18-amd64.img
image: ubuntu-core-18-amd64.img
file format: raw
virtual size: 3.6G (3879731200 bytes)
disk size: 302M
I can use VirtualBox's VBoxManage tool to convert this "raw" image to a virtual disk that VirtualBox will recognize and boot:
VBoxManage convertfromraw ubuntu-core-18-amd64.img --format VDI \
ubuntu-core-18-amd64.vdi
I've looked at iat
but it seems focused on converting various flavors of optical disc images to one another. I thought raw2iso
might do the trick...
raw2iso MODE1 < ubuntu-core-18-amd64.img > ubuntu-core-18-amd64.iso
...but, even though the byte size of the img
file is a multiple of 2048, the output isn't recognized by anything.
Here's what hdiutil imageinfo
says about the img
file:
Size Information:
Total Bytes: 3879731200
Compressed Ratio: 1
Sector Count: 7577600
Total Non-Empty Bytes: 3879731200
Compressed Bytes: 3879731200
Total Empty Bytes: 0
...
partitions:
partition-scheme: GUID
block-size: 512
partitions:
0:
partition-name: Protective Master Boot Record
partition-start: 0
partition-synthesized: true
partition-length: 1
partition-hint: MBR
1:
partition-name: GPT Header
partition-start: 1
partition-synthesized: true
partition-length: 1
partition-hint: Primary GPT Header
2:
partition-name: GPT Partition Data
partition-start: 2
partition-synthesized: true
partition-length: 32
partition-hint: Primary GPT Table
3:
partition-name:
partition-start: 34
partition-synthesized: true
partition-length: 2014
partition-hint: Apple_Free
4:
partition-UUID: E765AD58-B838-4A24-8C2A-E022D7BEF1E5
partition-name: BIOS Boot
partition-hint-UUID: 21686148-6449-6E6F-744E-656564454649
partition-start: 2048
partition-number: 1
partition-length: 2048
partition-hint: 21686148-6449-6E6F-744E-656564454649
5:
partition-UUID: CC8F1CE4-0C99-4ECC-A757-FBC3FF6B9B71
partition-name: EFI System
partition-hint-UUID: C12A7328-F81F-11D2-BA4B-00A0C93EC93B
partition-start: 4096
partition-number: 2
partition-length: 102400
How can I convert this file to something that is recognized by most systems as a bootable, iso9660 image?