Prepare a bootable USB disk

This section describes the steps to prepare a bootable USB disk on a Linux host system. After you've prepared a bootable USB disk, you can copy the QNX SBL container sbl_os to it so that you can boot the SCB100 board.

Prepare a bootable USB disk on a Linux host

The following is a quick, step-by-step method for formatting the USB disk from a Linux terminal:
  1. Run the following command without the USB disk inserted to your host system:
    $ mount
    . . .
                        

    Note the mounted devices listed. Now insert the USB disk to your Linux host and run the same command a second time.

    $ mount
    . . .
    /dev/sdb1
                        

    When the command is run with the USB disk inserted, an additional device should appear (for example, sdb1. What you see may differ on your computer). This additional device is the target device.

    For the remainder of these instructions, we'll use sdb1 for the device used. Substitute your own device that you noted when you ran the mount command for the second time.

  2. If the device is mounted, unmount it. For example:
    $ umount /dev/sdb1
                        

    After you run the command, your USB disk is now ready to be partitioned.

  3. Using administrator privileges, run the following commands, substituting your device for sdb, and responding to the prompts as indicated. For example:
    $ sudo fdisk /dev/sdb
                        
    Note:
    Since you are formatting the whole USB disk and not just a partition, you may need to strip the identifier at the end of the mountpoint when you run the fdisk command. For example, for sdb1, the identifier is 1. For more information about the identifier, see the user guide for the variant of Linux that you're running.
  4. Remove the existing partitions. Keep typing the d command until no partitions are left. For example:
    Command (m for help): d
    No partition is defined yet!
                        
  5. Type u and then o to create the FAT32 partition:
    Command (m for help): u
    
    Changing display/entry units to cylinders (DEPRECATED!).
    
    Command (m for help): o
    Cylinders as display units are deprecated.
    
    Created a new DOS disklabel with disk identifier 0xc7ae9af4.
                        
  6. Type n followed by p to create a new primary partition. For example:
    Command (m for help): n
    
    Partition type:
    p   primary (0 primary, 0 extended, 4 free)
    e   extended
    Select (default p): p
                        
  7. Type 1 to set the partition as the primary partition and specify the first and last cylinder for your card. For example, enter the default value for First cylinder and Last cylinder, which in this example are 2 and 15193. Your defaults may be different depending on the size of your USB disk. Then type Y to remove the signature.
    Partition number (1-4, default 1): 1
    First cylinder (2-15193, default 2): 2
    Last cylinder, +/-cylinders or +/-size{K,M,G,T,P} (2-15193, default 15193): 15193
    
    Created a new partition 1 of type 'Linux' and of size 14.9 GiB.
    Partition #1 contains a vfat signature.
    
    Do you want to remove the signature? [Y]es/[N]o: Y
    
    The signature will be removed by a write command.
                        
  8. Type a to set the active partition. Generally, this should be partition 1.
    Command (m for help): a
    Selected partition 1
    The bootable flag on partition 1 is enabled now.
                        
  9. Type t and then c to set the FAT32 partition type 12.
    Command (m for help): t
    Selected partition 1
    Hex code (type L to list all codes): c
    Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.
    
                        
  10. Type w to write the changes and exit.
    Command (m for help): w
    
    The partition table has been altered.
    Calling ioctl() to re-read partition table.
    Syncing disks.
                        
  11. Format the USB disk as command below:
    $ sudo mkfs.vfat /dev/sdb1
    mkfs.fat 4.1 (2017-01-24)
                        
    Note:
    The identifier, such as 1 at the end of the mountpoint must be included.

Now you've created a bootable USB disk for the SCB100 board. You must transfer the QNX SBL container sbl_os that you built in previous section to the USB disk.

Copying QNX SBL Container sbl_os onto a USB Drive

Follow these steps to prepare the USB with QNX SBL Container sbl_os.
  1. Connect and mount the USB disk to the Linux host machine. For example:
    $ mkdir /tmp/disk
    $ sudo mount /dev/sdb1 /tmp/disk
                        
  2. Copy the QNX SBL container sbl_os to the /boot directory of the USB disk. For example:
    $ sudo mkdir /tmp/disk/boot
    $ sudo cp sbl_os /tmp/disk/boot
    $ sudo umount /tmp/disk
                        
  3. Disconnect the USB disk from the Linux host system and connect it to the SCB100 board.
Note:
By default, SBL expects the OS container to be presented in the /boot directory of the boot partition. The container file name and location may need to be changed if a customized SBL configuration is used.
Page updated: