SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In the next Slint installer in 'auto' mode I plan to format the root partitions with a f2fs file system for these drives types in addition to USB sticks:
eMMC drives (flash drives soldered to the motherboard with typically a 32G or 64G capacity found in cheap laptops)
SD cards connected through an USB adapter (because not all machines can boot off an SD card inserted directly in an SD slot of the machine)
To minimize the need of user input I need to gather as much information as available about drives attached to or plugged in the system at time of installation, using the lsblk command.
I own neither eMMC nor USB adapter for SD cards, so you could help to find how to detect these configurations posting the output of this command:
The computer is a mini-pc, model: MinisForum Z83-F.
The Slackware is installed in a 64GB Sandisk Ultra SD-card, which contains two partitions: the first is an UEFI ESP of 400MB and the second is a 59GB partition with F2FS filesystem and it hosts the system. The SD-card in its adapter slot is not recognized directly by the Slackware, even the BIOS and Windows 10 see it correctly, that's why I put it in a no-name USB 3.0 SD-card adapter, where gives speeds around 80MB write and 100MB/s read. The USB 3.0 adapter with its SD-card is recognized as: /dev/sda
The eMMC have 64GB and contains the Windows 10 Pro shipped with the computer, and it is recognized as: /dev/mmcblk0
You can ignore the devices "/dev/zramX" as they are obviously ZRAM devices used for /tmp and swap.
As a side note, I would like to mention that F2FS is not compatible with LILO, and how my "Linux on SD-card" is intended to work with both UEFI with no CSM and classic BIOS, I'we reused the UEFI ESP partition as kernel and initrd loaded by LILO, and also put there the boot map, with this config option in /etc/lilo.conf :
Code:
map = /boot/efi/boot.map
Finally, I discovered that a good SD-card put in a USB 3.0 adapter will beat hands down even a good USB 3.0 flash drive, as durability, read speed and write speed. How many USB 3.0 flash drives writes consistently with 80MB/s ?
Last edited by ZhaoLin1457; 06-27-2020 at 06:10 AM.
First, a reminder of the fields names meanings, from "lsblk --help":
RM removable device
ROTA rotational device [1]
HOTPLUG removable or hotplug device (usb, pcmcia, ...) [2]
TRAN device transport type
DISC-GRAN discard granularity [3]
TYPE device type [4]
SUBSYSTEMS de-duplicated chain of subsystems [5]
From your answers, my tentative findings are as follows:
SD cards inserted directly the machine and eMMC drives are named /dev/mmcblk<device number> and members of subsystems mmc and mmc_host, with TRAN empty, ROTA=0 RM=0, discard
SD cards connected through an USB reader aka USB adapter named /dev/sd<device letter>, are members of the subsystems scsi and usb (but for Labinnah?) have tran=USB, ROTA=1 and RM=1, no discard
So it looks like the SD card be somehow "hidden" behind the USB reader
Nothing obvious distinguishes an eMMC from a SD card directly inserted in the machine.
Nothing obvious distinguishes an SD card in an USB reader from an USB stick (tested by me)
It looks like I can't avoid to ask a user "which the kind of device it is" to distinguish an eMMC from a SD card (that I plan to only accept as target drive for installation if connected through an USB reader)
Will I advise users not to install an an USB stick will depend on tests I will make using an f2fs vs an ext4 file system for the root partition.
If you made performance tests ext4 vs f2fs with an eMMC, please report your findings.
[1] I am puzzled as USB stick have ROTA=1. It looks like this field come from /sys/devices/*/queue/rotational
[2] I am puzzled that eMMC have HOTPLUG=1
[3] This answers the question: does the device supports discards (no if 0 else yes). This could be used to distinguish hard disks from SSD, but I plan to use ext4 for SSD anyway.
[4] Part for partition is considered as a device type as disk.
[5] It seems that a subsystem here means a bus listed in "ls /sys/bus" cf. this document, as for udev.
Answers are still welcome, including comments on these assumptions and tentative conclusions.
Last edited by Didier Spaier; 07-02-2020 at 03:35 AM.
Reason: "as for udev" added.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.