Chroot on SD card

Skip to first unread message

Jared Maddox

Jun 27, 2022, 1:47:41 PMJun 27
to ChromiumOS Discussion
Hello, all. I'm having trouble trying to use Debian's debootstrap command to install a chroot environment onto an SD card via Crostini to use on Crostini.

The reason is that I want a low-headache way to have access to the standard apt-get stuff without running afoul of SSD limits- thus a chroot. I DO NOT want a completely separate image to run on the VM, I do not care about the shortcut icons for applications (if I really care about shortcuts in the future, then I can deal with that using some app later, even if I have to write it myself), I do not want to restrict myself to always having the SD card in the computer (more particularly, I want to be able to have different things on different cards, so e.g. one card might hold most compsatible Debian games, another a particularly big game, a third might have every development tool available via Debian stable).

The plan is to enter the Crostini terminal, run a script that's stored in the home directory, and the script will either print out an error message (if it doesn't detect a configured chroot environment; the message will contain instructions in such a case to describe the normal crosh commands to fix that), or enter the sd card chroot environment. Maybe the script will do more things later, and probably it'll have to use FUSE to link some "root" files to the chroot context (e.g. for Garcon), but that's stuff I'll deal with as it seems appropriate.

Unfortunately, every time I try to run debootstrap, it promptly errors out complaining about noexec or nodev (I have confirmed that nodev is the problem, the script wants to build some device files and thus was modified to check for the ability to do so around 2002). I was expecting to run into hurdles getting anything other than standard terminal I/O running, but this prevents me from even reaching those hurdles.

Is there a smarter way to do this? Am I wrong in assuming that Crostini is Debian-enough to start off like this?
Reply all
Reply to author
0 new messages