• [OrangePi] Booting from USB drive


    • 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.
        1. sudo install_to_usb /dev/sdXn [btrfs]|[noformat]
        Copy the Code

      • /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.
  • 相关阅读:
    【UVa#10325】The Lottery
    【洛谷P1868】饥饿的奶牛
    【NOI2005】维护数列
    【NOIP2018】保卫王国
    【洛谷P4719】动态dp
    【NOI2014】魔法森林
    【洛谷P4234】最小差值生成树
    【国家集训队】Tree II
    面试1
    struts2中的方法的调用
  • 原文地址:https://www.cnblogs.com/vanwoos/p/4903512.html
Copyright © 2020-2023  润新知