SOLVED: Simple USB Stick Installation Instructions for LEDE

My goal was a procedure that would work on all LEDE devices, so including packages to support USB 2.0 & USB 3.0 would be important.

Which should be selected by default for each device, so I was asking because if you need that package for your device it has to be added to the default packages for that device.

For the quickstart guide it is OK to go quick and dirty like this, and I'm not going to change the quickstart regardless of the result of your test.

But for the other tutorial we assume that these packages for USB support are already there and the instructions to install them are under "troubleshooting" pages.

Especially we don't have any provisions for telling people to install kmod-usb3 (usb 3.0 driver) for a device with USB 2.0 port.

So could you please uninstall kmod-usb3 and see if it still works? Sorry to bore you on this, but I think it is important.

Am I correct that opkg installing a package that’s not required (or is already present) has no effect, except perhaps to consume a bit more Flash memory?

If it's not required it will waste space, if it's already present it won't. But in this case it won't break anything.

Sorry, not boredom - I just missed that initial request. I just uninstalled kmod-usb3, and the USB drive continues to work.

I should note that I suspect the problem was the lack of the other package - kmod-usb-storage. After I installed it, the USB drive worked.

Here's what I saw. After installing the initial set of packages from the procedure (opkg install block-mount e2fsprogs kmod-fs-ext4) I tried to do the next step (mkfs.ext4) but got an error:

root@LEDE-MediaRoom:~# mkfs.ext4 /dev/sda1
mke2fs 1.43.3 (04-Sep-2016)
The file /dev/sda1 does not exist and no size was specified.

To diagnose, I installed lsbutils and saw this:

root@LEDE-MediaRoom:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/2p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=, 480M

Note that the last line has "Driver=" I looked at the installed packages, and kmod-usb2 was there, but not kmod-usb-storage

root@LEDE-MediaRoom:~# opkg list-installed | grep usb
kmod-leds-wndr3700-usb - 4.4.71-1
kmod-usb-core - 4.4.71-1
kmod-usb-ledtrig-usbport - 4.4.71-1
kmod-usb-ohci - 4.4.71-1
kmod-usb2 - 4.4.71-1
libusb-1.0 - 1.0.21-1
usbutils - 007-6

I installed both kmod-usb-storage, and kmod-usb3 (because I read some other documentation that recommended it).

root@LEDE-MediaRoom:~# opkg install kmod-usb3 kmod-usb-storage
Installing kmod-usb3 (4.4.71-1) to root...
Installing kmod-usb-storage (4.4.71-1) to root...
Installing kmod-scsi-core (4.4.71-1) to root...
Configuring kmod-scsi-core.
Configuring kmod-usb-storage.
Configuring kmod-usb3.

Now the Mass Storage device has a proper driver ("Driver=usb-storage")

root@LEDE-MediaRoom:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/2p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
root@LEDE-MediaRoom:~# ls -l /dev

At that point, the remainder of the procedure (mkfs.ext4, etc.) worked as desired.

Update: Added error messages after initial mkfs.ext4 for complete history

1 Like

Ok, thanks for taking the time to do that. :smiley:

That's probably because you don't understand what step 3 does. What you're basically doing is copying the overlay partition (including old fstab) to your external storage and since you've not switched to that new overlay yet you're still effectively changing routers flash overlay contents when you edit fstab. So next time you boot you will again be using the old version of the overlay you copied earlier. So better switch step 3 - 4 and you'll be fine,

Please remove this, this is only used for file systems like vfat(fat32 etc) and such and you're only installing ext4 this would not make any sense.

Thank you @Timeless for the tip.

As for the kmod-nls packages... they are included in the default 17.01.x lede images (at least for my WRT1900ACS), and I thought my "you may also need" phrase was self explanatory. Sorry for that.

So I think it's better for someone to check if those kmod's are pre-installed and not to remove them (there is no need after all) or decide if he needs them.

Mmh they are not in all images I suppose. It would not make any sense. It's just a language pack for fat file systems. So without installing kmod-fs-vfat this would not make any sense to me.

The kernel driver mentions this:

The base Native Language Support. A number of filesystems depend on it (e.g. FAT, JOLIET, NT, BEOS filesystems), as well as the ability of some filesystems to use native languages (NCP, SMB).

I don't think "you probably need this" is self explanatory for some people. They would think ah of.. I need that and blindly executing those commands without thinking. Not that it is bad, but it will take unnecessary storage space :slight_smile:

1 Like

I'm pretty sure too that the nls packages are not in all images.

But since we're talking about extroot, I don't think some kilobytes are a big deal and I find it kind of ironic to worry about "unnecessary storage space".

I personally have installed packages that I don't need (and I may never need), like gcc, unzip, unrar, gdb, screen, netdiscover etc...

1 Like

You have a valid point. But still multiple "some kilobytes" can add up. And that was not the point I was trying to make. I just mentioned the given information about NLS packages was incomplete. And hopefully I made it more clear where they are good for so people can actually decide if they need them instead of just blindly installing stuff.

1 Like

Thank you for this, I just copy pasted all your commands and it worked fine for me.

I have been trying this for a while and couldn't get it to work properly until now.

If anyone wants to know my router is a TP-Link WDR4300 and using LEDE 17.01.4

Timeless gave us a useful tip, to switch 4 to 3, that means to first create fstab and then copy the overlay partition to the usb disk. And that makes sense.

Haven't tried it yet but I will the next time I want to setup my box.

A post was split to a new topic: Squid installation on extroot

This topic was automatically closed after 13 hours. New replies are no longer allowed.