Debian stock on Cubox-i, USB issue
My backup server was off for a while now. Something broken in my Sheevaplug power supply. And, if I do regular backup of my data on laptop, this is not the case for my server, so it was urgent to find a solution. I first though to buy a Cubox-M which is more powerful, but it's 250$ ! Quite expensive for this kind of stuff ! So I bought a second hand Cubox-i for for only 30€. This is a clone of my current server. I had to install everything from scratch, so I follow Solid Run instructions to prepare my SDCard with UBoot (with a new 2022 release and the ability to read ext4 partitions !).
> sudo dd if=SPL of=/dev/sdX bs=1k seek=1 conv=sync
> sudo dd if=u-boot.img of=/dev/sdX bs=1k seek=69 conv=sync
Then, I wanted to try to install a Debian distribution in stock version (with "nothing" from SolidRun) for an easier maintenance.
My SDCard partitioning looks like (partitioned with gparted) :
On the main partition, I downloaded generic netboot console install from Debian server (netboot.tar.gz) and uncompress all files in the main partition. But I think it's better to put all in a directory named boot. Then put it in my Cubox and start to install using serial console.
> screen /dev/ttyUSB0 115200
Everything went fine, except that the image is configured for old stable release. So, I have to migrate to stable one (and don't forgot to remove installation files !).
When all was installed, I tried to put a USB key, but nothing happened... USB seems to work :
> lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
After looking for kernel logs for a while (and a bit despairs), I found the solution : Debian compile its kernel with only few drivers linked. Most of them are in modules (located in /lib/modules/kernelname). And the one missing is USB PHY driver phy-mxs-usb ! In my main server, I had it compiled because I use target imx6/7.
So, then simplest way to test is :
> sudo modprobe phy-mxs-usb
And for automatic loading at boot time :
> sudo echo phy-mxs-usb >> /etc/modules
I also added tun, dm-mod and dm-crypt.