How to install Debian Linux on a TI-Nspire

DISCLAIMER: I AM IN NO WAY RESPONSIBLE FOR ANYTHING THAT MAY HAPPEN TO YOUR CALCULATOR OR COMPUTER AS A RESULT OF FOLLOWING THIS GUIDE

Video

These instructions are written for use on a computer running Debian (If you don’t have a computer running Debian you can use Virtual Box). Steps with a “~” in front will take a while. If you use a Raspberry Pi, you can skip installing qemu-user-static and binfmt-support, and skip step 5

You will need:

  • A TI-Nspire CX running a version of TI-OS supported by Ndless
  • A flash drive. The flash drive should ideally be at least 2GB, but 1GB might work.
  • A Mini-B OTG USB cable.
  • A powered USB hub if you want to plug anything else into the calculator.

  1. Install Ndless. Ndless lets you run 3rd party programs on your TI-Nspire.
  2. Prepare a flash drive. Use gparted (or mkfs.ext4) to format the drive as one ext4 partition.
  3. ~ Install programs on host. “sudo apt-get install qemu-user-static binfmt-support debootstrap”. These programs let you create and setup a rootfs on one computer.
  4. ~ Debootstrap. Mount the flash drive using “sudo mount /dev/sdbX /mnt” substituting sdbX for your flash drive. Now run “sudo debootstrap –arch=armel –foreign stable /mnt“. This command will install a Debian rootfs onto the flash drive.
  5. Copy files to rootfs. Run “sudo cp /usr/bin/qemu-arm-static /mnt/usr/bin” to copy the arm emulator, and “sudo cp /etc/apt/sources.list /mnt/etc/apt/sources.list” to copy the apt list file.
  6. ~ Finish debootstrapping. Change into the new rootfs with “sudo chroot /mnt“. This will automatically run the arm binaries in the qemu emulator. Finish the job with “/debootstrap/debootstrap –second-stage“. This will install all the programs on the rootfs.
  7. Set a root password. Run “passwd” to set a root password.
  8. ~ Set up apt-get. Update the apt-get sources with “apt-get update”.
  9. Install any extra programs. You will need to download any extra programs you want now, because the calculator doesn’t have internet. Run “apt-get install -d ” to download the packages. The “-d” is important, otherwise it will try to install the packages as well. You will finish installing the packages when booted into Debian on the calculator. I recommend making a file with all the installed package names so you don’t forget what ones you downloaded.
  10. Install the kernel, device tree, and linuxloader2. Download the three files indicated in my handy graphic, located here. If you are using a TI-Nspire CX or CX CAS, you need the “DTB for CX”, “DTB for Touchpad” is for the touchpad models (duh) and I think you can figure out what the last one is for 😉 Rename the kernel file to “zImage.tns” and rename the dtb file to “nspire.dtb.tns”. Send all three files to a folder called “linux” on your calculator.
  11. Nspire_linux_downloads
  12. Set up boot script. Add “ext.ll2 linuxloader2” to the end of ndless.cfg.tns (in the ndless folder). This is easily done using nTxt. This line allows you to use a script to boot linux, and saves a whole lot of typing every time you want to boot linux. Download start_usb.ll2.tns and put it into the linux folder, along with zImage.tns and linuxloader2.tns.
  13. ~ Boot! Make sure Ndless is installed and the flash drive is plugged into the calculator and run start_usb.ll2.tns. If all went well Debian should be booting! It takes a while (~2 minutes) to boot, so be patient.
  14. ~ Finish installing packages. Log in as root, and “apt-get install ” for any packages you downloaded in step 9.
  15. Add users. Use “adduser ” to add any users to the system.
    Done! You have successfully installed a full installation of Debian onto your calculator.

(Credit for linux on the calculator goes to tangrs on omnimaga)

Please leave comments with any suggestions or things I might have missed.

18 thoughts on “How to install Debian Linux on a TI-Nspire”

  1. sudo debootstrap –arch=armel –foreign stable /mnt is != from sudo debootstrap –arch=armel –foreign stable /mnt. Those arent double dashes

    1. You’re right, those should be double dashes. I have two dashes typed in the post editor, I think WordPress is eating the extra dash, I’ll look into it. Thanks for commenting 🙂

  2. I can’t install any packages. I tried “apt-get install -d micropython” and “apt-get install -d python2.7” and such, and I got errors saying can’t find any package by regex X.

    I looked at the /etc/apt/sources.list and it was blank.

    What do I do?

  3. Good timing with your comment. I just started looking back into this, and I think I need to make a new post about this. Some things have changed, and I think I can make it better. Keep your eyes peeled for a new post sometime next week (or sooner).

  4. Hello! I am “that one user from Omnimaga” of the same username. Specifically the one who created this thread: https://www.omnimaga.org/ti-nspire-projects/peripheral-not-identified/

    The Debian installation on the calculator has been functioning very well. It’s useful for typing essays and such during times of education (school), though that ABCDEF keyboard can be a bit of a pain, haha.
    I was wondering if there was any way to install more packages onto the USB driver after the initial installation? I figure I would just chroot to the USB again, but I’m afraid that there might be something more that I have to do [with QEMU and whatnot]. I would rather not completely reinstall the OS, as I’ve probably made some modifications to system files that I doubt I’ll remember to change again (possibly with cron to mount the rootfs as r/w on startup).

    Also — how’s that new guide going? It’s been about 6 months since you had said you were going to create it 😛

    1. installing new packages can be done by chrooting onto the USB drive and using apt-get install -d again, or by just copying .deb files to the USB drive and installing them on the calculator (though meeting package dependencies can be a pain this way).

      also, debootstrap –second-stage can be run on the calculator itself rather than through QEMU (though it might be a bit slow), and I don’t believe it’s necessary to copy over sources.list from the host system to the USB drive.

      1. god damn it those should be double-dashes after “debootstrap”

        here’s a test to see if escaping dashes works: \-\-

        1. well that didn’t work.
          as an aside, nSonic2MS breaks some linuxloader2 scripts. you’ll need to point to the relative location of your Linux files within the script (as in, from the root nSonic defines) rather than from the calculator’s predetermined root of /documents.

  5. Hi, I just followed your guide, and I’m having issues. When plugging the usb drive (or any usb device) into the calculator, it is as if i did not even plug in the usb adapter. I don’t get a “peripheral not identified” error or any error. There are no lights on the usb drive. Running the script acts as if the drive isnt plugged in, it just goes to a black screen and stays there until reset. Any ideas? the adapter is brand new, here’s the one: https://www.amazon.com/dp/B004ZMYEMY/

Leave a Reply to Ivoah Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.