Giter Club home page Giter Club logo

rootonusb's Introduction

rootOnUSB

Set rootfs to be on a USB drive

WARNING: This is a low level system change. You may have issues which are not easily solved. You should do this working on a freshly flashed micro SD card, and certainly do not attempt this with valuable data on the card itself. Assume that if this does not work, you may have to flash the micro SD card again. A serial debug console is useful if things go wrong.

The scripts in this repository will setup a NVIDIA Jetson Nano Developer Kit to set the rootfs to a USB drive. This involves four steps. The first step requires the Linux kernel to be rebuilt to include the Tegra USB firmware drivers internally. A convenience script named buildKernel.sh provides this functionality.

$ ./buildKernel.sh

The script downloads another repository (buildKernelAndModules) from the JetsonHacksNano Github account. buildKernelAndModules provides scripts to download the kernel sources, make the kernel, and then copy the kernel image to /boot/Image. The rootToUSB repository leverages these functions, while adding the necessary firmware and kernel configurations to allow a USB drive to run as the root file system. After the kernel has finished building, you can reboot the system to make sure it compiled correctly.

The second step does not have representation here. The user must prepare a USB drive (preferably USB 3.0, SSD, HDD, or SATA->USB) by formatting as ext4 with a partition. It is easier if the user only plugs in one USB drive during this procedure. When finished, the disk should show as /dev/sda1 or similar. Typically it is easiest to set the volume label for later use.

The third step, copyRootToUSB copies the contents of the entire system micro SD card to the USB drive. Naturally, the USB drive storage should be larger than the micro SD card. In order to copyRootToUSB:

usage: ./copyRootToUSB.sh [directory | [-d directory ] | [-v volume_label ] | [-h]]

  -d | --directory     Directory path to parent of kernel

  -v | --volume_label  Label of Volume to lookup

  -h | --help  This message

The fourth step modifies the file /boot/extlinux/extlinux.conf An entry should be added to point to the new rootfs (typically this is /dev/sda1). There is a sample configuration file: sample-extlinux.conf

Release Notes

July, 2019

  • Initial Release
  • Jetson Nano
  • L4T 32.2 (JetPack 4.2.1)
  • Linux kernel 4.9.140

April, 2019

  • Initial Release
  • Jetson Nano
  • L4T 32.1.0 (JetPack 4.2)
  • Linux kernel 4.9.140

rootonusb's People

Contributors

jetsonhacksnano avatar jetsonhacks avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.