Bug 15226 - lsblk: not found
Summary: lsblk: not found
Status: RESOLVED WORKSFORME
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2022.11
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-06 03:25 UTC by Andrei Cherniaev
Modified: 2023-01-06 15:04 UTC (History)
1 user (show)

See Also:
Host: qemu_x86
Target:
Build: Ubuntu 22 X86_64


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Cherniaev 2023-01-06 03:25:24 UTC
Why I can't use lsblk?

_________

Steps to Reproduce. I build Buildroot from git
git clone git://git.buildroot.net/buildroot
make clean -C buildroot
make -C buildroot qemu_x86_defconfig
make -C buildroot

I run
buildroot/output/images/start-qemu.sh

0) Actual Results. I try to use lsblk command via console
# lsblk
-sh: lsblk: not found

Expected Results. lsblk should be found in my system!

1)
lsusb works (return nothing)

2)
# fdisk -l
Disk /dev/vda: 60 MB, 62914560 bytes, 122880 sectors
121 cylinders, 16 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/vda doesn't contain a valid partition table

3)
file
buildroot/output/build/linux-5.15.18/.config
contains
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_SYSFS_SYSCALL=y
CONFIG_SYSFS=y

4) 
# uname -a
Linux buildroot 5.15.18 #1 SMP Fri Jan 6 19:29:11 KST 2023 i686 GNU/Linux
Comment 1 Peter Korsgaard 2023-01-06 15:04:53 UTC
> Why I can't use lsblk?

Because you didn't enable it? lsblk comes from util-linux, so you need to enable BR2_PACKAGE_UTIL_LINUX_BINARIES to include it.

lsusb is offered by busybox, which is the reason why you have it "automatically".