- You can also boot from USB drive partition.
- The file named cmdline.txt must exist on BOOT (fat) partition on sd card or emmc.
- The content of that file must be: root=/dev/sdXn, where /dev/sdXn is the USB drive partition (as visible from OPI) to which to boot (for example root=/dev/sda1).
- The line which mounts / in /etc/fstab on USB partition Linux must point to the right partition.
- You can use install_to_usb script to install Linux oun USB drive partition and automaticaly create right cmdline.txt and fstab.
- If cmdline.txt does not exist, or USB drive partition is not accesible (USB drive not attached), system boots to /dev/mmcblk0p1 (sdcard if inserted, otherwise emmc, if available)
- Bootable SD Card or EMMC must be accesible when booting to USB, but it is not necessary that the second partition contains valid Linux fs, sd card can have only the 1st (fat) partition
- You can have different Linux installations on different USB drive partitions, just edit the cmdline.txt to select to which to boot.
- The latest uImage must be used.
Using install_to_usb script:
- Use install_to_usb script to install Linux to USB drive partition. Can be used to backup your SDCard/EMMC installation.
-
Copy the Code
- sudo install_to_usb /dev/sdXn [btrfs]|[noformat]
- /dev/sdXn is the USB drive partition to which to install (for example /dev/sda1)
- if the second parameter is btrfs, USB partition will be formated as btrfs, otherwise as ext4
- if the second parameter is noformat, USB partition will not be formated, content of the partition will be updated (in case you have used install_to_usb to backup your sdcard/emmc before)
- be careful not to select the wrong USB partition, it will be erased/updated!
- If the script does not exist on your image, download desktop_scripts.tar.gz, unpack to /usr/local/bin.
- You must have the new uImage version, with boot to usb enabled.