qtecOS Image
How to create an bootable qtecOS GNU/Linux image.
Requirements
What you will need:
- CFast card reader and CFast card.
- or USB flash drive
Windows/macOS
Requirements
You will need to download the balena Etcher 1 tool. Follow the official install instructions and be ready to prepare a qtecOS image into your CFast card.
- Download the
wic
image andbmap
file from the release server.
Example:
File Type Link .wic
https://packages.qtec.com/hafnium/images/qt5222/qtecos-hv-image-qt5222.rootfs.wic.gz .wic.bmap
https://packages.qtec.com/hafnium/images/qt5222/qtecos-hv-image-qt5222.rootfs.wic.bmap
-
Open balena etcher and select the
qtecos-hv-image-qt5222.rootfs.wic.gz
file and start flashing. -
After flashing is complete, unmount the drive properly from the Windows/macOS host.
For more details, you can refer to the following link.
Linux
Requirements
We will use the BMAP Tools (bmaptool
command) to prepare an image disk with
the latest qtecOS distro image.
Package Name | bmap-tools |
Description | The better dd for embedded projects, based on block maps. |
Repository | https://github.com/yoctoproject/bmaptool |
Assuming your Linux host is based on Debian GNU/Linux, install the package with:
sudo apt update && sudo apt install bmap-tools
Flash your CFast/USB flash drive
Download and write the image in one step, or follow the step-by-step guide
All-in-one command
Download and write the image in one step, using the following command:
sudo bmaptool copy https://packages.qtec.com/hafnium/images/qt5222/qtecos-hv-image-qt5222.rootfs.wic.gz /dev/sdX
Replace /dev/sdX
with the actual CFast or USB flash device.
Step-by-step guide
- Download the
wic
image andbmap
file from the release server.
Example:
File Type Link .wic
https://packages.qtec.com/hafnium/images/qt5222/qtecos-hv-image-qt5222.rootfs.wic.gz .wic.bmap
https://packages.qtec.com/hafnium/images/qt5222/qtecos-hv-image-qt5222.rootfs.wic.bmap
You can download the files from the command line directly using the wget
command. Example:
wget https://packages.qtec.com/hafnium/images/qt5222/qtecos-hv-image-qt5222.rootfs.wic.gz && \
wget https://packages.qtec.com/hafnium/images/qt5222/qtecos-hv-image-qt5222.rootfs.wic.bmap
- Write the
wic
image to the CFast card or USB flash drive.
sudo bmaptool copy qtecos-hv-image-qt5222.rootfs.wic.gz /dev/sdX
Replace /dev/sdX
with the actual CFast or USB flash device.
An easy way to find the correct disk device address (/dev/sdX
) for your
CFast or USB flash device is to run the dmesg
command right after connecting
the device to the computer.
The device will be listed as one of the last entries.
Note that running dmesg
might require superuser credentials in some systems,
in that case use: sudo dmesg
and type in the superuser password.
Example output:
msb@QTEC-P53-MSB-Debian:~$ sudo dmesg
[sudo] password for msb:
...
[80614.164481] usb 1-6.4: new high-speed USB device number 14 using xhci_hcd
[80614.369528] usb 1-6.4: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10
[80614.369533] usb 1-6.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[80614.369537] usb 1-6.4: Product: DataTraveler 3.0
[80614.369540] usb 1-6.4: Manufacturer: Kingston
[80614.369542] usb 1-6.4: SerialNumber: 408D5CBECBBDE7A10916341B
[80614.371241] usb-storage 1-6.4:1.0: USB Mass Storage device detected
[80614.371873] scsi host0: usb-storage 1-6.4:1.0
[80615.373490] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
[80615.374093] sd 0:0:0:0: Attached scsi generic sg0 type 0
[80615.374360] sd 0:0:0:0: [sda] 60604416 512-byte logical blocks: (31.0 GB/28.9 GiB)
[80615.374910] sd 0:0:0:0: [sda] Write Protect is off
[80615.374913] sd 0:0:0:0: [sda] Mode Sense: 45 00 00 00
[80615.375445] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[80615.583375] sda: sda1
[80615.586725] sd 0:0:0:0: [sda] Attached SCSI removable disk
In this case the disk is at /dev/sda
.
Some systems will auto-mount the disk and you will therefore be unable to
write to it with bmap.
And a cannot open block device
, Device or resource busy
error will be returned:
msb@QTEC-P53-MSB-Debian:~$ sudo bmaptool copy https://packages.qtec.com/hafnium/images/qt5222/qtecos-hv-image-qt5222.rootfs.wic.gz /dev/sda
bmaptool: info: discovered bmap file 'https://packages.qtec.com/hafnium/images/qt5222/qtecos-hv-image-qt5222.rootfs.wic.bmap'
bmaptool: ERROR: An error occurred, here is the traceback:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/bmaptools/CLI.py", line 116, in open_block_device
descriptor = os.open(path, os.O_WRONLY | os.O_EXCL)
bmaptool: ERROR: cannot open block device '/dev/sda' in exclusive mode: [Errno 16] Device or resource busy: '/dev/sda'
To fix this problem simply unmount the disk with the following command:
umount /dev/sda*
Remember to adjust /dev/sda
to the actual CFast or USB flash device.