Solved How Do I Load Drivers From Removable Media?

Solved issue
Code:
less | cat /proc/partitions

Try using up arrow and down arrow keys with "less".
 


Code:
less | cat /proc/partitions

Try using up arrow and down arrow keys with "less".
All I get when using "less" is the console printing ^[[A for up and ^[[B for down. Page Up and Down don't work either.
 
Last edited:
Without trying to be rude... there gets to be a point...

I use IoT all day long on hundreds of devices. I usually use this ...


But it shouldn't really matter. Any IoT distro worth it's salt should have basic commands.

I have also used ...


...and...

https://ubuntu.com/download/core?from=iotpage - it's less featured, but still has most basic commands.

We've given several ways to do this, if none of them work... maybe it's time to try something else.

We tend to stay away from - https://www.beagleboard.org/distros as they tend to more hardware specific, and less generic.
 
Last edited:
Unfortunately, fdisk is also unsupported by the installer version of BusyBox. Do you know any other commands?
The following is an example the use of busybox. It's not clear to me why a version of busybox would not have a functioning fdisk binary, but be that as it may. Nevetheless I outline in the following the usage of busybox here in the hope that it would be helpful.

The following command shows output which confirms that both fdisk and dmesg are in the busybox binary on a debian system and therefore should be ready for use. Note that a lot of the irrelevant output has been snipped.
Code:
$ busybox --help
BusyBox v1.37.0 (Debian 1:1.37.0-4) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   or: function [arguments]...
<snip>
Currently defined functions:
<snip>
dmesg ... fdisk
<snip>

Without a usb plugged into the machine the fdisk output is the following:
Code:
$ busybox fdisk -l
Disk /dev/nvme0n1: 466 GB, 500107862016 bytes, 976773168 sectors
60563 cylinders, 256 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/nvme0n1p1    0,0,2       1023,255,63          1  976773167  976773167  465G ee EFI GPT
The output just shows the single drive.

After the usb has been plugged in, the output shows the usb along with its device name, /dev/sda and the partitions on the usb, /dev/sda1 and /dev/sda2.
Code:
$ busybox fdisk -l
Disk /dev/nvme0n1: 466 GB, 500107862016 bytes, 976773168 sectors
60563 cylinders, 256 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/nvme0n1p1    0,0,2       1023,255,63          1  976773167  976773167  465G ee EFI GPT
Disk /dev/sda: 29 GB, 30765219840 bytes, 60088320 sectors
3725 cylinders, 256 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sda1    0,0,2       1023,255,63          1   60088319   60088319 28.6G ee EFI GPT
/dev/sda2    0,0,1       0,0,1                0          0          1   512  0 Empty


It is also possible to see the device names of a plugged in usb with the dmesg command as suggested in post #12. The output from the dmesg command in the following shows both when the usb was first plugged into the machine, and then when it was withdrawn, that is, disconnected:
Code:
$ busybox dmesg
<snip>
6887.792135] usb 1-2.2: new high-speed USB device number 7 using xhci_hcd
[ 6887.897394] usb 1-2.2: New USB device found, idVendor=0781, idProduct=5567, bcdDevice= 1.00
[ 6887.897411] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6887.897417] usb 1-2.2: Product: Cruzer Blade
[ 6887.897422] usb 1-2.2: Manufacturer: SanDisk
[ 6887.897426] usb 1-2.2: SerialNumber: 04009126081823063724
[ 6887.899315] usb-storage 1-2.2:1.0: USB Mass Storage device detected
[ 6887.900068] scsi host9: usb-storage 1-2.2:1.0
[ 6887.930451] usbcore: registered new interface driver uas
[ 6888.909367] scsi 9:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.00 PQ: 0 ANSI: 6
[ 6888.912245] scsi 9:0:0:0: Attached scsi generic sg1 type 0
[ 6888.955006] sd 9:0:0:0: [sda] 60088320 512-byte logical blocks: (30.8 GB/28.7 GiB)
[ 6888.956170] sd 9:0:0:0: [sda] Write Protect is off
[ 6888.956179] sd 9:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 6888.956637] sd 9:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 6889.017064]  sda: sda1 sda2 sda3 sda4
[ 6889.017839] sd 9:0:0:0: [sda] Attached SCSI removable disk
[ 6909.080786] usb 1-2.2: USB disconnect, device number 7

If this sort of output is not available in dmesg, then the other usage of the command is to use it as suggested in post #12 watching the output on the terminal screen.

If your version of busybox doesn't have the capacity to show these sorts of results, it may be worth considering using a debian download disk which includes the non-free firmware, which should include the broadcom firmware. Perhaps have a look at this page: https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/, and then the archive to make a selection.
 
The following is an example the use of busybox. It's not clear to me why a version of busybox would not have a functioning fdisk binary, but be that as it may. Nevetheless I outline in the following the usage of busybox here in the hope that it would be helpful.

The following command shows output which confirms that both fdisk and dmesg are in the busybox binary on a debian system and therefore should be ready for use. Note that a lot of the irrelevant output has been snipped.
Code:
$ busybox --help
BusyBox v1.37.0 (Debian 1:1.37.0-4) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   or: function [arguments]...
<snip>
Currently defined functions:
<snip>
dmesg ... fdisk
<snip>

Without a usb plugged into the machine the fdisk output is the following:
Code:
$ busybox fdisk -l
Disk /dev/nvme0n1: 466 GB, 500107862016 bytes, 976773168 sectors
60563 cylinders, 256 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/nvme0n1p1    0,0,2       1023,255,63          1  976773167  976773167  465G ee EFI GPT
The output just shows the single drive.

After the usb has been plugged in, the output shows the usb along with its device name, /dev/sda and the partitions on the usb, /dev/sda1 and /dev/sda2.
Code:
$ busybox fdisk -l
Disk /dev/nvme0n1: 466 GB, 500107862016 bytes, 976773168 sectors
60563 cylinders, 256 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/nvme0n1p1    0,0,2       1023,255,63          1  976773167  976773167  465G ee EFI GPT
Disk /dev/sda: 29 GB, 30765219840 bytes, 60088320 sectors
3725 cylinders, 256 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sda1    0,0,2       1023,255,63          1   60088319   60088319 28.6G ee EFI GPT
/dev/sda2    0,0,1       0,0,1                0          0          1   512  0 Empty


It is also possible to see the device names of a plugged in usb with the dmesg command as suggested in post #12. The output from the dmesg command in the following shows both when the usb was first plugged into the machine, and then when it was withdrawn, that is, disconnected:
Code:
$ busybox dmesg
<snip>
6887.792135] usb 1-2.2: new high-speed USB device number 7 using xhci_hcd
[ 6887.897394] usb 1-2.2: New USB device found, idVendor=0781, idProduct=5567, bcdDevice= 1.00
[ 6887.897411] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6887.897417] usb 1-2.2: Product: Cruzer Blade
[ 6887.897422] usb 1-2.2: Manufacturer: SanDisk
[ 6887.897426] usb 1-2.2: SerialNumber: 04009126081823063724
[ 6887.899315] usb-storage 1-2.2:1.0: USB Mass Storage device detected
[ 6887.900068] scsi host9: usb-storage 1-2.2:1.0
[ 6887.930451] usbcore: registered new interface driver uas
[ 6888.909367] scsi 9:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.00 PQ: 0 ANSI: 6
[ 6888.912245] scsi 9:0:0:0: Attached scsi generic sg1 type 0
[ 6888.955006] sd 9:0:0:0: [sda] 60088320 512-byte logical blocks: (30.8 GB/28.7 GiB)
[ 6888.956170] sd 9:0:0:0: [sda] Write Protect is off
[ 6888.956179] sd 9:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 6888.956637] sd 9:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 6889.017064]  sda: sda1 sda2 sda3 sda4
[ 6889.017839] sd 9:0:0:0: [sda] Attached SCSI removable disk
[ 6909.080786] usb 1-2.2: USB disconnect, device number 7

If this sort of output is not available in dmesg, then the other usage of the command is to use it as suggested in post #12 watching the output on the terminal screen.

If your version of busybox doesn't have the capacity to show these sorts of results, it may be worth considering using a debian download disk which includes the non-free firmware, which should include the broadcom firmware. Perhaps have a look at this page: https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/, and then the archive to make a selection.
It's not the version of BusyBox that comes with a fully installed version of Debian. It's the version of BusyBox that is built into the system installer BEFORE an operating system is installed. That's where I think your confusion comes from. You're looking at things from the perspective of a fully installed operating system. I haven't even gotten half way there yet.

However, the advice to download a CD image from the non-free section seems to be the easiest way to solve this issue. I can't believe I didn't think of that sooner.
 
Figured it out. I'll post a guide here to help those who stumble upon this post via Google and to satiate the curiosity of those who are watching this thread.

Prerequisites
1. Either install Debian Linux to a virtual machine, or install Debian on a new partition on another computer, or use another computer that already has Debian Linux installed.

2. Once Debian is installed/booted up, download both the b43-fwcutter and the firmware-b43-installer by clicking on the ftp server that corresponds to your country.

3. Install these packages in the order of fwcutter first, and b43-installer second.

4. Grab a blank/empty USB flash drive (or back up all of the data on the USB stick to your harddrive if it's not blank), and plug it into your computer. Use the built-in "Disks" utility to format your flash drive as ext4 [IMPORTANT: formatting your flash drive as ext4 is a MUST! You CANNOT skip this step]. Once formatted, open the File Manager, and click on File System (located in the left-hand margin; in the KDE Dolphin File manager, you click on your hard drive under Devices to access the root folder) then navigate to /lib/firmware. [On GNOME based installations, open the File Manager, and click anywhere in the File Path Bar (it looks kind of like a web browser address bar). For example, if your File Path Bar says Home when you open up the Debian File Manager, you simply click the word Home and it will switch to /home/<username>. Then, all you need to do is delete all of the text except the first / symbol and hit Enter. This will bring you to the Root Folder.] In the firmware folder, you should see a folder labeled "b43" (if it's not visible, you may have to enable the option to show hidden files/folders). Copy the b43 folder to your USB flash drive.

Installing Debian:
1. Insert the Live CD/installation USB flash drive, and enter your manufacturers boot menu by pressing F12, F11, or F2 (it differs depending on manufacturer). Select the option to boot from CD or USB. [NOTE: Do NOT insert the USB flash drive that contains the b43 folder on it. Your computer may not boot to the installation image if two flash drives are plugged in at the same time.]

2. When the Debian menu pops up, select the option to "Start Installer". Select your language, location, and keyboard configuration options.

3. After Debian loads some files, you'll come to a screen that says you are missing the b43-open/ucode30_mimo.fw and b43/ucode30_mimo.fw files. At this screen, press Ctrl+Alt+F2 (some laptops require you to press Fn+Ctrl+Alt+F2) to load the BusyBox Shell. Press Enter when prompted.

4. At this point, you're going to need to find where Linux assigns your flash drive after plugging it in. To do this, first type:
Code:
ls /dev/sd*
and hit Enter. Take note of the list that appears.

5. Now, plug in the flash drive that contains the b43 folder on it. Now type the same ls /dev/sd* command as before and hit Enter. Note any new entries that appeared. Typically, the entry you're looking for is the one with the number after it (for example, if two new entries of /dev/sdc and /dev/sdc1 appear, you're going to want to choose sdc1).

6. Now type:
Code:
mount /dev/sdc1 -t ext4 /mnt
assuming sdc1 is where your flash drive is located (you may have to type in something else). Hit Enter.

7. Type:
Code:
cd /mnt
Hit Enter. Type:
Code:
ls
Hit Enter. If you do not see the b43 folder listed after typing "ls", then you need to go back and try another one of the entries that popped up in Step 5. Make sure you type umount /mnt (note that it's spelled "umount", not unmount; yeah, I agree: terrible design choice) before trying to mount another entry.

8. After seeing the b43 folder, type:
Code:
cp -pR b43/ /lib/firmware/.
Hit Enter.

9. Type:
Code:
cd /
Hit Enter.
Type
Code:
umount /mnt
Hit Enter. You can now remove the USB drive with the b43 folder on it. Type Exit and hit Enter. Then, type Ctrl+Alt+F5 to return to the installation screen.

You should now be able to press Continue at the screen requesting the ucode30_mimo.fw files and finish the installation. Cheers!
 
Last edited:


Follow Linux.org

Members online


Top