Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

6 votes
4 answers
6912 views
Unable to access/(auto)-mount SD card on Fedora 28
I am trying to access SD cards on Fedora 28, but do not have any success. System info is as follows: $ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4....
I am trying to access SD cards on Fedora 28, but do not have any success. System info is as follows: $ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: Fedora Description: Fedora release 28 (Twenty Eight) Release: 28 Codename: TwentyEight I was not able to access different SD cards using two different card readers. Despite of being accessible on both macOS and Windows, none of them is shown in the Nautilus file browser, the desktop or elsewhere obvious. The card readers are recognized by the system as per lsusb output: $ lsusb -v # some other USB devices Bus 001 Device 005: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x058f Alcor Micro Corp. idProduct 0x6362 Flash Card Reader/Writer bcdDevice 1.29 iManufacturer 1 iProduct 2 iSerial 3 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 250mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 # some other USB devices Bus 001 Device 006: ID 0dda:2027 Integrated Circuit Solution, Inc. USB 2.0 Card Reader Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0dda Integrated Circuit Solution, Inc. idProduct 0x2027 USB 2.0 Card Reader bcdDevice 1.6e iManufacturer 1 iProduct 2 iSerial 3 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 4 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 # some other USB devices I then had a look at the udev events while plugging a card in and out: $ udevadm monitor monitor will print the received events for: UDEV - the event which udev sends out after rule processing KERNEL - the kernel uevent KERNEL[701.434565] change /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/host4/target4:0:0/4:0:0:2/block/sde (block) UDEV [714.263816] change /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/host4/target4:0:0/4:0:0:2/block/sde (block) KERNEL[748.477184] change /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/host4/target4:0:0/4:0:0:2/block/sde (block) UDEV [761.338940] change /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/host4/target4:0:0/4:0:0:2/block/sde (block) In addition, I had a look at the kernel messages: $ dmesg [ 603.846840] usb-storage 1-3:1.0: USB Mass Storage device detected [ 603.847749] scsi host4: usb-storage 1-3:1.0 [ 605.703531] scsi 4:0:0:0: Direct-Access Generic CF 1.6E PQ: 0 ANSI: 0 CCS [ 605.704982] scsi 4:0:0:1: Direct-Access Generic MS 1.6E PQ: 0 ANSI: 0 CCS [ 606.509034] scsi 4:0:0:2: Direct-Access Generic MMC/SD 1.6E PQ: 0 ANSI: 0 CCS [ 606.510387] scsi 4:0:0:3: Direct-Access Generic SM 1.6E PQ: 0 ANSI: 0 CCS [ 606.511519] sd 4:0:0:0: Attached scsi generic sg4 type 0 [ 606.511943] sd 4:0:0:1: Attached scsi generic sg5 type 0 [ 606.512177] sd 4:0:0:2: Attached scsi generic sg6 type 0 [ 606.512408] sd 4:0:0:3: Attached scsi generic sg7 type 0 [ 608.924586] sd 4:0:0:1: [sdd] Attached SCSI removable disk [ 629.830776] sd 4:0:0:2: [sde] Attached SCSI removable disk [ 633.048754] sd 4:0:0:3: [sdf] Attached SCSI removable disk [ 639.490479] sd 4:0:0:0: [sdc] Attached SCSI removable disk Both the output of dmesg and udevadm monitor are telling that the card should be shown as sde. However, fdisk -l does not list sde. Besides that, trying to mount the device manually, raises an error: $ mount -t auto /dev/sde /mnt/ mount: /mnt: no medium found on /dev/sde. I am not sure, whether the needed driver module is loaded properly, since there is no mmc0-like entry in the dmesg output (as I am used to know from Debian-based systems). lsmod does not list the mmc0 kernel module either: $ lsmod | grep mm rtl8192c_common 61440 1 rtl8192cu rtlwifi 98304 3 rtl8192c_common,rtl_usb,rtl8192cu The only mmc-like modules which seems to be available but are not loaded are mmc_block and mmc_core: $ modprobe mm # listing suggestions using tab auto-completion mma7660 mmc_block mmc_core mms114 How could I solve this problem or at least narrow it down?
albert (191 rep)
Jul 16, 2018, 07:57 PM • Last activity: Aug 3, 2025, 09:48 AM
1 votes
2 answers
52 views
Does badblock "fix" blocks on an SD card?
I have an old 16GB SD card that started giving I/O errors, known it's gone bad, I dumped all the content to an image file to see what I could restore, and the Disk manager alerted me that 16.1MB were unreadable and replaced with zero. To do some post-mortem autopsy, I ran `badblocks -n /dev/sdx` (re...
I have an old 16GB SD card that started giving I/O errors, known it's gone bad, I dumped all the content to an image file to see what I could restore, and the Disk manager alerted me that 16.1MB were unreadable and replaced with zero. To do some post-mortem autopsy, I ran badblocks -n /dev/sdx (read only analysis). After ~18 hours, it reported 309 blocks as bad. To do some other testing, I erased just the partition table (it was two partitions, FAT32 + ext4) and ran badblocks -w /dev/sdx (read/write analysis). To my surprise, this time it took <6 hours and reported no bad blocks. I ran the read only analysis once again and also reported very quickly no bad sector. How is that possible? I was under the impression that badblocks checks for _physical_ blocks damage, and that in a flash device, if a block is reported as "bad", it's because the flash chip already ran out of space space to replace damaged blocks, but since removing the partition seemingly fixed the issues, it may look like they were some software corruption. After running badblocks these 3 times, I created a new partition table and a new partition, and filling it with data from /dev/zero reported no I/O error whatsoever. From what I can see, these are the possible explanations: * badblocks checks for FS bad blocks and my FS was corrupted, not the SD card flash itself * badblocks somewhat marked these blocks that are now automatically ignored by the hardware controller and/or the FS * the SD card noticed the bad memory area while badblocks was finding them and now replaced them with fresh ones. If so, why didn't it do when I got I/O errors from reading the files? Which one is the more likely?
Mauro F. (133 rep)
Jul 24, 2025, 10:40 AM • Last activity: Jul 24, 2025, 11:51 AM
0 votes
1 answers
82 views
13 GB out of 32 hidden on sd card
I have connected and mounted in Linux a 32GB micro-sd card that was installed on an old "android 6" tablet of mine du and baobab show only ~17GB allocated: $ du -sm /media/emmegi/6605-1EF6/ 16250 /media/emmegi/6605-1EF6/ $ the total number of folders and files in it are reported here: $ find . -type...
I have connected and mounted in Linux a 32GB micro-sd card that was installed on an old "android 6" tablet of mine du and baobab show only ~17GB allocated: $ du -sm /media/emmegi/6605-1EF6/ 16250 /media/emmegi/6605-1EF6/ $ the total number of folders and files in it are reported here: $ find . -type d | wc -l 121 $ find . -type f | wc -l 417 $ while df is reporting these info: $ df -hT /dev/sda1 Filesystem Type Size Used Avail Use% Mounted on /dev/sda1 vfat 30G 29G 898M 98% /media/emmegi/6605-1EF6 the device seems fine from lsblk: $ sudo lsblk 2>&1 | grep sda sda 8:0 1 29,3G 0 disk └─sda1 8:1 1 29,3G 0 part /media/emmegi/6605-1EF6 but, as it was reported by several android apps, also on linux with df I can see that the sd is 99% used: $ sudo fdisk -l /dev/sda Disk /dev/sda: 29,28 GiB, 31440502784 bytes, 61407232 sectors Disk model: Storage Device Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 61407231 61405184 29,3G 7 HPFS/NTFS/exFAT So it seems there is some ~13 GB difference that I cannot explain (how they are hidden?) I need to find (and possibly clean) them but without formatting the sd card ---- (adding new info to the original post) I was forgetting to check the filesystem (I preferred in **read-only** mode for the time being) - and some interesting clue is being reported: $ sudo fsck -nv /dev/sda1 fsck from util-linux 2.39.3 e2fsck 1.47.0 (5-Feb-2023) fsck.ext2: No such file or directory while trying to open /dev/sda1 Possibly non-existent device? $ sudo fsck -nv /dev/sda1 fsck from util-linux 2.39.3 fsck.fat 4.2 (2021-01-31) Checking we can access the last sector of the filesystem There are differences between boot sector and its backup. This is mostly harmless. Differences: (offset:original/backup) 65:01/00 Not automatically fixing this. Boot sector contents: System ID "android " Media byte 0xf0 (5.25" or 3.5" HD floppy) 512 bytes per logical sector 32768 bytes per cluster 52 reserved sectors First FAT starts at byte 26624 (sector 52) 2 FATs, 32 bit entries 3836928 bytes per FAT (= 7494 sectors) Root directory start at cluster 2 (arbitrary size) Data area starts at byte 7700480 (sector 15040) 959221 data clusters (31431753728 bytes) 16 sectors/track, 4 heads 0 hidden sectors 61405184 sectors total Checking for unused clusters. Reclaimed 433812 unused clusters (14215151616 bytes). Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. Checking free cluster summary. Free cluster summary wrong (5410 vs. really 439222) Auto-correcting. Leaving filesystem unchanged. /dev/sda1: 537 files, 519999/959221 clusters $ the interesting entry is: **Reclaimed 433812 unused clusters (14215151616 bytes).** Now I am going to save a backup of all its content, and then my next test is to plug this microSD in a more-recent android device. If nothing changes, I will run fsck in *real mode* and see if, after relocating the SD in the original tablet, the lost space is actually recovered
sigmud (184 rep)
Jul 4, 2025, 02:42 AM • Last activity: Jul 5, 2025, 12:48 PM
1 votes
1 answers
3554 views
Raspberry 4 stuck in initramfs
im new on this site so i hope im not making myself look super stupid (beside the fact that my english isnt that best) I got myself a Raspberry Pi 4B with an 64GB SDCard of Sandisk Ultra. Installed on it is an Ubuntu server 20.04 ARM Version. It usually runs 24/7 in my local network for research and...
im new on this site so i hope im not making myself look super stupid (beside the fact that my english isnt that best) I got myself a Raspberry Pi 4B with an 64GB SDCard of Sandisk Ultra. Installed on it is an Ubuntu server 20.04 ARM Version. It usually runs 24/7 in my local network for research and bit of education. What happen: After installing an Update with "Sudo apt update", "sudo apt upgrade" and finishing it with "reboot", i got stuck into initramfs. **The only message shown is:**
ext4
Thu Jan 1 00:00:06 UTC 1970
writable:recovering journal
writable: superblock need_recovery flas is clear, but journal has data.
writable: Run journal anyway

writable: UNEXPECRED INCONSISTENCY; RUN fsck MANUALLY.
          (i.e., without -a or -p options) 
fsck exited with status code 4
The root filesystem on /dev/mmcblk0p2 requieres a manual fsck


BusyBox v1.30.1 (Ubuntu 1:1.30.1-6ubuntu2) built in shell (ahs)
Enter 'help'for a list of built-in commands.


(initramfs)_
**I did what it says to me and tried to run it manually with the command:**
(initramfs) fsck /dev/mmcblk0p2
fsck from util-linux 2.36.1
e2fsck 1.45.7 (28-Jan-2021)
writable: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway? yes
fsck.ext4: unable to set superblock flags on writable

writable: ********** WARNING: Filesystem still has errors **********

(initramfs) _
After some research i found out it were problably the sd card soo i tried to reeinstall the ubuntu server on it again. But the sd card doesnt get wiped. not wiped in windows neither Linux. The files inside are set into read only, but trying to wipe it with sudo on an other device doesnt affect it in anyway. Trying to delete anything or make it writable on the initramfs gives me a "Permission Denied". because all my data is already save i would like to wipe it. But im still curios why this happens because i had it twice. in the first time it got fixed easy by just reeinstalling. And this is the second time. I hope some of u got any idea to fix it. I googled my way down and up, but didnt find anything.
sefikkaan (11 rep)
Sep 1, 2021, 08:46 PM • Last activity: Jul 3, 2025, 05:04 AM
2 votes
1 answers
386 views
“Bad magic number in super-block” after a dd of Mobian (Debian) image
# General overview I try to install the [Mobian](https://mobian-project.org/) OS&#160;on my Pinephone thought the [`dd`’s method](https://wiki.debian.org/InstallingDebianOn/PINE64/PinePhone#Method_3:_dd) as described in the official Debian documentation. Basically, I have to make a `dd` from an imag...
# General overview I try to install the [Mobian](https://mobian-project.org/) OS on my Pinephone thought the [dd’s method](https://wiki.debian.org/InstallingDebianOn/PINE64/PinePhone#Method_3:_dd) as described in the official Debian documentation. Basically, I have to make a dd from an image to a partition in the SD card. # The problem But at each try, the partition is corrupted and unusable. # The process ### What I did As I said, I just follow the dd’s method of the documentation. So : 1. I formatted a partition located in /dev/sdb1 in my SD card with:
# mkfs.ext4 -F -O 64bit -L 'system' '/dev/sdb1'
mke2fs 1.47.0 (5-Feb-2023)
/dev/sdb1 contains a ext4 file system labelled 'system'
        last mounted on Wed Jun 25 18:44:21 2025
Creating filesystem with 28703488 4k blocks and 7176192 inodes
Filesystem UUID: e7df3b8b-a2fa-4cce-a833-5fd86456cad8
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done
Writing inode tables: done
Creating journal (131072 blocks): done
Writing superblocks and filesystem accounting information: done
2. Then, I get the image and unpack it:
$ wget https://images.mobian.org/pinephone/mobian-pinephone-phosh-12.0.img.gz 
$ unp mobian-pinephone-phosh-12.0.img.gz
3. So, I copied the image to the partition /dev/sdb1:
# dd bs=64k if=mobian-pinephone-phosh-12.0.img of=/dev/sdb1 status=progress 
5989138432 octets (6,0 GB, 5,6 GiB) copiés, 265 s, 22,6 MB/s
91552+1 enregistrements lus
91552+1 enregistrements écrits
6000000000 octets (6,0 GB, 5,6 GiB) copiés, 265,823 s, 22,6 MB/s
### What I got At this point, when the process reach it end, the partition appear as defective. 1. I check /dev/sdb1 with fsk.ext4 :
# fsck.ext4 /dev/sdb1
e2fsck 1.47.0 (5-Feb-2023)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdb1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 
 or
    e2fsck -b 32768 

Found a gpt partition table in /dev/sdb1
2. I inspected what happened with dmesg but found nothing special:
# dmesg -T
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] 244285440 512-byte logical blocks: (125 GB/116 GiB)
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] Write Protect is off
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] Mode Sense: 03 00 00 00
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] No Caching mode page found
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[mer. 25 juin 18:44:02 2025]  sdb: sdb1
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[mer. 25 juin 18:44:02 2025] EXT4-fs (sdb1): recovery complete
[mer. 25 juin 18:44:02 2025] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Quota mode: none.
[mer. 25 juin 18:44:18 2025] EXT4-fs (sdb1): unmounting filesystem.
[mer. 25 juin 18:44:18 2025]  sdb: sdb1
[mer. 25 juin 18:44:18 2025] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Quota mode: none.
[mer. 25 juin 18:44:43 2025] EXT4-fs (sdb1): unmounting filesystem.
However, I tried the same process from another computer and get something more verbose with dmesg (in the this case mmcblk0 is the relevant partition):
[mar. juin 24 20:11:57 2025]  mmcblk0: p1 
[mar. juin 24 20:11:57 2025]  mmcblk0: p1 
[mar. juin 24 20:11:57 2025]  mmcblk0: p1 
[mar. juin 24 20:11:58 2025]  mmcblk0: p1 
[mar. juin 24 20:13:31 2025] mmc0: card 0001 removed
[mar. juin 24 20:13:33 2025] mmc0: cannot verify signal voltage switch
[mar. juin 24 20:13:33 2025] mmc0: new ultra high speed SDR104 SDXC card at address 0001
[mar. juin 24 20:13:33 2025] mmcblk0: mmc0:0001 SD128 116 GiB 
[mar. juin 24 20:13:33 2025]  mmcblk0: p1 
[mar. juin 24 20:13:38 2025] audit: type=1400 audit(1750788819.286:29): apparmor="DENIED" operation="open" profile="/usr/bin/evince-thumbnailer" name="/tmp/tumbler-X31LB82.png" pid=13008 comm="evince-thumbnai" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000
[mar. juin 24 20:13:39 2025] audit: type=1400 audit(1750788819.666:30): apparmor="DENIED" operation="open" profile="/usr/bin/evince-thumbnailer" name="/tmp/tumbler-XD3SP82.png" pid=13013 comm="evince-thumbnai" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000
[mar. juin 24 20:15:29 2025] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Quota mode: none.
[mar. juin 24 20:16:22 2025] JBD2: Spotted dirty metadata buffer (dev = mmcblk0p5, blocknr = 1). There's a risk of filesystem corruption in case of system crash.
[mar. juin 24 20:16:26 2025] EXT4-fs error (device mmcblk0p5): ext4_map_blocks:607: inode #8: block 15237146: comm jbd2/mmcblk0p5-: lblock 26 mapped to illegal pblock 15237146 (length 1)
[mar. juin 24 20:16:26 2025] jbd2_journal_bmap: journal block not found at offset 26 on mmcblk0p5-8
[mar. juin 24 20:16:26 2025] Aborting journal on device mmcblk0p5-8.
[mar. juin 24 20:16:26 2025] EXT4-fs error (device mmcblk0p5): ext4_journal_check_start:83: comm ext4lazyinit: Detected aborted journal
[mar. juin 24 20:16:27 2025] EXT4-fs (mmcblk0p5): Remounting filesystem read-only
[mar. juin 24 20:23:19 2025] EXT4-fs (mmcblk0p5): unmounting filesystem.
[mar. juin 24 20:23:42 2025]  mmcblk0: p1 
[mar. juin 24 20:23:42 2025]  mmcblk0: p1 
[mar. juin 24 20:23:42 2025]  mmcblk0: p1 
[mar. juin 24 20:23:43 2025]  mmcblk0:
[mar. juin 24 20:23:43 2025]  mmcblk0:
[mar. juin 24 20:23:43 2025]  mmcblk0: p1
[mar. juin 24 20:23:43 2025]  mmcblk0: p1
# The question Obviously, I just ask what happened, why it doesn’t work? And how to fix it and install Mobian on this SD card?
fauve (1529 rep)
Jun 25, 2025, 05:44 PM • Last activity: Jun 26, 2025, 03:04 AM
1 votes
1 answers
2029 views
How to Connect Internet in Zedboard using Linux via SDCard
I am working on Zedboard Zynq 7020. I have booted the Linux via SD card through Zedboard. The linux display can be shown onto the monitor via VGA cable. But I cannot connect that linux to internet. Linux is not detecting any wireless network as well. I plugged the one end of LAN cable into Zedboard...
I am working on Zedboard Zynq 7020. I have booted the Linux via SD card through Zedboard. The linux display can be shown onto the monitor via VGA cable. But I cannot connect that linux to internet. Linux is not detecting any wireless network as well. I plugged the one end of LAN cable into Zedboard and other into PC. I tried to write ifconfig into the terminal of linux and I get this message : root@localhost:˜# ifconfig eth1 Link encap:Ethernet HWaddr 00:11:22:33:44:55 inet6 addr: fe80::211:22ff:fe33:4455/64 Scope:Link Here I cannot see this sort of thing: "inet addr:10.1.1.164 Bcast:10.1.1.255 Mask:255.255.255.0" As it is essential for detecting the ip address of PC. Please guide and suggest me the solution. Thanks
Nabeel (11 rep)
May 14, 2014, 06:56 PM • Last activity: Jun 21, 2025, 09:00 PM
6 votes
1 answers
4138 views
Make an SD card to boot the distribution image created with Yocto
I have managed to build images for my own compiled Linux kernel source code using Yocto. Yocto has produced image files according to: http://www.crashcourse.ca/wiki/index.php/Yocto_Project_Quick_Start Example from above link: $ ls -F core-image-minimal-beagleboard-20121120113536.rootfs.jffs2 core-im...
I have managed to build images for my own compiled Linux kernel source code using Yocto. Yocto has produced image files according to: http://www.crashcourse.ca/wiki/index.php/Yocto_Project_Quick_Start Example from above link: $ ls -F core-image-minimal-beagleboard-20121120113536.rootfs.jffs2 core-image-minimal-beagleboard-20121120113536.rootfs.tar.bz2 core-image-minimal-beagleboard.jffs2@ core-image-minimal-beagleboard.tar.bz2@ MLO-beagleboard@ MLO-beagleboard-1.5.0+git1+9f94c6577e3a018b6b75cbe39f32bb331871f915-r0* modules-3.4.11-yocto-standard-r4.3-beagleboard.tgz README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt u-boot-beagleboard.bin@ u-boot-beagleboard-v2011.06+git6+b1af6f532e0d348b153d5c148369229d24af361a-r3.bin* u-boot.bin@ uImage@ uImage-3.4.11+git1+a201268353c030d9fafe00f2041976f7437d9386_1+449f7f520350700858f21a555 4b81cc8ad23267d-r4.3-beagleboard-20121120113536.bin uImage-beagleboard.bin@ x-load-beagleboard-1.5.0+git1+9f94c6577e3a018b6b75cbe39f32bb331871f915-r0.bin.ift* x-load-beagleboard.bin.ift@ $ How do I use these Images to produce an SD card that can boot the Linux dist Yocto has produced? Partioning etc? How do I use my Yocto images?
JohnyTex (215 rep)
Sep 1, 2014, 01:38 PM • Last activity: Jun 16, 2025, 10:05 AM
3 votes
1 answers
5025 views
Repairing or Recovering files from a Corrupted F2FS partition?
I have a f2fs partition with missing Superblock. I made a disk image so I would not destroy the original partition trying to fix. sd-repair# fsck.f2fs sd128.img Info: Segments per section = 1 Info: Sections per zone = 1 Info: sector size = 512 Info: total sectors = 249737216 (121942 MB) Can't find a...
I have a f2fs partition with missing Superblock. I made a disk image so I would not destroy the original partition trying to fix. sd-repair# fsck.f2fs sd128.img Info: Segments per section = 1 Info: Sections per zone = 1 Info: sector size = 512 Info: total sectors = 249737216 (121942 MB) Can't find a valid F2FS superblock at 0x0 Can't find a valid F2FS superblock at 0x1 Testdisk doesn't support F2FS. I don't know if there is a way to rewrite the superblocks, I would like to recover my files or repair the filesystem. Here is hex of what I believe is F2FS superblock, from a good partition 10 20 F5 F2 01 00 07 00 09 00 00 00 03 00 00 00 0C 00 00 00 09 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 E1 0F 00 00 FF 0F 00 00 02 00 00 00 02 00 00 00 12 00 00 00 08 00 00 00 E1 0F 00 00 00 02 00 00 00 02 00 00 00 06 00 00 00 0A 00 00 00 2E 00 00 00 3E 00 00 03 00 00 00 01 00 00 00 02 00 00 00 31 8B E4 FB 13 D1 42 26 A5 07 EA 8A B6 70 A9 45 Here is the hex I found on bad partiton 10 20 F5 F2 01 00 07 00 09 00 00 00 03 00 00 00 0C 00 00 00 09 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 46 DC 01 00 00 00 00 31 ED 00 00 22 EE 00 00 02 00 00 00 06 00 00 00 72 00 00 00 77 00 00 00 31 ED 00 00 00 02 00 00 00 02 00 00 00 06 00 00 00 12 00 00 00 F6 00 00 00 E4 01 00 03 00 00 00 01 00 00 00 02 00 00 00 16 CD C2 62 53 10 46 17 A5 B7 41 C6 8E AA 33 D5 73 00 64 00 2D 00 65 00 78 00 74 00 The superblock seems ok, differences are because of 1 is 128 GB part and other is 8 GB part. I don't know how to tell if the superblock is in the right location on bad partition. There offset don't match, from what I can tell. But I'm not that good with hex editors so I don't know how to compare there offsets. Update: the offset for the superblock was wrong it was at 0x600 or 3 sector. I removed the first 512 bytes from the disk image. Now fsck.f2fs shows sd-repair# fsck.f2fs -f trim_sd.img Info: Force to fix corruption Info: Segments per section = 1 Info: Sections per zone = 1 Info: sector size = 512 Info: total sectors = 249704447 (121925 MB) Info: MKFS version "Linux version 3.4.0-CM-g87d27dd (Adam@TheKeurig) (gcc version 4.9 20150123 (prerelease) (GCC) ) #6 SMP PREEMPT Sat Dec 17 21:28:57 CET 2016" Info: FSCK version from "Linux version 4.9.0-3-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2 (2017-06-12)" to "Linux version 4.9.0-3-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2 (2017-06-12)" Info: superblock features = 0 : Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000 Info: total FS sectors = 249704448 (121926 MB) [f2fs_crc_valid: 477] CRC validation failed: cal_crc = 4076150800, blk_crc = 0 buff_size = 0x0 [f2fs_crc_valid: 477] CRC validation failed: cal_crc = 4076150800, blk_crc = 0 buff_size = 0x0 [f2fs_do_mount:1945] Can't find valid checkpoint From what I can tell the partition has shifted, It might be on issue with partition table. All the data seems to be intact. Is is using ms-dos partition table.
Jcfunk (101 rep)
Jun 17, 2017, 01:30 AM • Last activity: Jun 1, 2025, 03:04 AM
5 votes
1 answers
21469 views
ext2fs_open2: Bad magic number in super-block
I'm trying to resize a Linux partition, but after tweaking a lot with this disk I don't know If I have totally corrupted it. Device Boot Start End Sectors Size Id Type /dev/sdd1 * 64 5913631 5913568 2.8G 17 Hidden HPFS/NTFS /dev/sdd2 5913632 5915039 1408 704K 1 FAT12 /dev/sdd3 5915040 17578125 11663...
I'm trying to resize a Linux partition, but after tweaking a lot with this disk I don't know If I have totally corrupted it. Device Boot Start End Sectors Size Id Type /dev/sdd1 * 64 5913631 5913568 2.8G 17 Hidden HPFS/NTFS /dev/sdd2 5913632 5915039 1408 704K 1 FAT12 /dev/sdd3 5915040 17578125 11663086 5.6G 83 Linux /dev/sdd4 17578126 28320312 10742187 5.1G 83 Linux Using dd deleting partitions and creating new ones I get Device Boot Start End Sectors Size Id Type /dev/sdd1 * 64 5913631 5913568 2.8G 17 Hidden HPFS/NTFS /dev/sdd2 5913632 5915039 1408 704K 1 FAT12 /dev/sdd3 5915040 40000000 34084961 16.3G 83 Linux /dev/sdd4 40000001 62521343 22521343 10.8G 83 Linux Then following some tutorial I do $ e2fsck -f /dev/sdd1 $ e2fsck 1.43.7 (16-Oct-2017) $ ext2fs_open2: Bad magic number in super-block $ e2fsck: Superblock invalid, trying backup blocks... $ e2fsck: Bad magic number in super-block while trying to open /dev/sdd1 The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 or e2fsck -b 32768 /dev/sdd1 contains a iso9660 file system labelled 'Kali Live' (And so on for the rest of the next 3 partitions) Trying to resize makes the same effect: $ resize2fs /dev/sdd3 resize2fs 1.43.7 (16-Oct-2017) resize2fs: Bad magic number in super-block while trying to open /dev/sdd3 Couldn't find valid filesystem superblock. I've followed a tutorial in internet but is not working, titled: HOWTO: Repair a broken Ext4 Superblock in Ubuntu . $ mke2fs -n /dev/sdd4 $ e2fsck -b block_number /dev/sdd4 $ e2fsck 1.43.7 (16-Oct-2017) e2fsck: Bad magic number in super-block while trying to open /dev/sdd4 The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 or e2fsck -b 32768 So I definitely run out of ideas of what to do. Is it totally wasted or shall I just reinstall everything from the scratch?
Manuela Perez Pimentel (51 rep)
Jul 17, 2018, 02:10 PM • Last activity: May 13, 2025, 06:06 PM
2 votes
1 answers
6200 views
Cannot see my SD card in parted
When I plug in my card reader, it shows up at `/def/sdf`, and when I insert this SD card I also see `/dev/sdf1`, but `parted` won't show the disk. It doesn't have any information I need, I just want to use the card. Why doesn't it show up in `parted`? EDIT (more details): I'm on Ubuntu 14.04 sudo pa...
When I plug in my card reader, it shows up at /def/sdf, and when I insert this SD card I also see /dev/sdf1, but parted won't show the disk. It doesn't have any information I need, I just want to use the card. Why doesn't it show up in parted? EDIT (more details):
  • I'm on Ubuntu 14.04
  • sudo parted -l will not list my SD card
  • After plugging the SD reader: $ ls /dev/sd* /dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdf1 $ sudo file -s /dev/sdf /dev/sdf: writable, no read permission $ sudo fdisk /dev/sdf fdisk: unable to open /dev/sdf: No medium found
Uri London (93 rep)
Nov 17, 2014, 03:04 PM • Last activity: May 13, 2025, 04:05 AM
1 votes
1 answers
49 views
Rsync on a 2 micro sd card unit combined as an luks encrypted LVM, on top fscrypt: Fscrypt seems to lock from time to time, how to avoid?
Hope anyone has a hint, if fscrypt which serves for me as a replacement for the error prone ecyryptfs for my backed up home folder (which is in a different PV group, luks encrypted,ecryptfs home folder): ``` +-----------------------------------+ +-----------------------------------+ | Source: Home |...
Hope anyone has a hint, if fscrypt which serves for me as a replacement for the error prone ecyryptfs for my backed up home folder (which is in a different PV group, luks encrypted,ecryptfs home folder):
+-----------------------------------+        +-----------------------------------+
   |          Source: Home             |        |         Destination: Backup       |
   |     (eCryptfs on Home Partition)  |        |     (fscrypt on Backup Partition) |
   +-----------------------------------+        +-----------------------------------+
                \|/               |                   ^         \|/
                 |                |___________________|          |
                 |              (rsync from Home to Backup)      | 
                 v                                               v
   +-----------------------------------+        +-----------------------------------+
   |   eCryptfs Layer (Home Folder)    |        | fscrypt Layer (BackupHome)        |
   +-----------------------------------+        +-----------------------------------+
   |       Home Partition              |        |       BackupHome Partition        |
   +-----------------------------------+        +-----------------------------------+   
   |   LVM Volume (Home)               |        |   LVM Volume (BackupHome)         |
   +-----------------------------------+        +-----------------------------------+ 
   |   LVM: PV Group (Main SSD)        |        |   LVM: PV Group (USB Stick)       |
   +-----------------------------------+        +-----------------------------------+   
   |   LUKS Encrypted (Main SSD)       |        |   LUKS Encrypted (µSD Slot 1)     |
   +-----------------------------------+        +-----------------------------------+ 
   |   Physical Layer (Main SSD)       |        |   LUKS Encrypted (µSD Slot 2)     |
   +-----------------------------------+        +-----------------------------------+
                 \|/                            |           Physical Layer          |
                  |                             +-----------------------------------+
                  |                                             \|/
   +-----------------------------------+        +-----------------------------------+
   | Physical Layer (4 TB SSD)         |        |   Physical Layer (USB Stick)      |
   | Dual Boot Windows/Linux (LVM)     |        |   Combined 2 x 1.5TB µSD with     |
   | LUKS LVM in part.6, part.5 /boot  |        |                                   |
   | (root, home, swap)in 3.1TB Volume |        |   LVM into 2.8TB Volume           |
   +-----------------------------------+        +-----------------------------------+
Now I want to backup my data with the following command:
rsync -avvh --inplace --size-only --info=progress2 /home/userXXX/  /backupHome/userXXX/
I got from time to time randomly different error messages like these (side info below the log):
[..]
testdaten/shrinkMpegxxDB.log
          9,02G   0%  117,23MB/s    0:01:13 (xfr#915, to-chk=655/497427)
testdaten/yyy.zzz/
testdaten/scripts/
rsync: [receiver] open "/backupHome/userXXX/testdaten/shrinkMpegxxDB.log" failed: Required key not available (126)
          9,02G   0%  117,23MB/s    0:01:13 (xfr#915, to-chk=0/497427)  

sent 9,04G bytes  received 42,04K bytes  121,37M bytes/sec
total size is 1,75T  speedup is 194,06
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]


[..]

rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/menus" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/xxxx/.config/mpv" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nautilus" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nemo" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nomacs" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/procps" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/pulse" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/qimgv" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/remmina" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/simple-scan" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/systemd" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/teamviewer" failed: Required key not available (126)

[..]

        103,23M   0%    2,26MB/s    0:00:43 (xfr#1034, ir-chk=1028/476659)
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 4096 bytes, did not move
[sender] expand file_list pointer array to 16384 bytes, did not move
[sender] expand file_list pointer array to 32768 bytes, did move
        103,23M   0%    2,24MB/s    0:00:44 (xfr#1034, ir-chk=2841/479500)
[..]
total: matches=0  hash_hits=0  false_alarms=0 data=103226155

sent 124,32M bytes  received 46,81M bytes  3,20M bytes/sec
total size is 1,75T  speedup is 10.254,91
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
The complete backup was 1,8 TB. With the first "chunk" of transmitted data, each time interrupted by an error, was 747 GB. File access was forbidden. I tried it with bash commands but failed in the same way, so it was related to fscrypt. Each Time I delocked the home again and again (after each cancellation), It works on. Because the USB Stick got very hot I cooled it down with some cooling ice from the fridge:
fscrypt unlock /backupHome/userXXX
So what is your ideas? My suggestions for the error cause: - device went too hot (after cooling down and again delocking it was transferring 1TB in one "chunk") - did I accidentally make a mistake in delocking the fscrypted backupHome folder? - Is the LUKS/LVM/2µSD config bind together in an µSD expansion usb Module problematic? I hope anyone can help here! [EDIT] According to @SteffenUlrich and my own assumptions it might point strongly to HW issue due to - SD maybe does not comply well with ext4fs, mainly and only supports FAT/FAT32/exFat - overheating the system (because cooling down helped loading at least a chunk of 1TB data flawlessly. (but it was not proven for me, because I couldn't properly assess the other sources of error So the journal from that day for dm-7 device shows some hints:
# journalctl -k | grep -Ei "excryptfs|error"
Oct 17 19:15:16 HP-ENVY-Laptop-13-aq1176ng kernel: pcieport 0000:00:1c.4: DPC: error containment capabilities: Int Msg #0, RPExt+ PoisonedTLP+ SwTrigger+ RP PIO Log 4, DL_ActiveErr+
Oct 17 19:15:16 HP-ENVY-Laptop-13-aq1176ng kernel: pcieport 0000:00:1d.4: DPC: error containment capabilities: Int Msg #0, RPExt+ PoisonedTLP+ SwTrigger+ RP PIO Log 4, DL_ActiveErr+
Oct 17 19:15:16 HP-ENVY-Laptop-13-aq1176ng kernel: RAS: Correctable Errors collector initialized.
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: hp_wmi: query 0x4c returned error 0x6
Feb 20 00:05:36 HP-ENVY-Laptop-13-aq1176ng kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_TZ.ETMD], AE_NOT_FOUND (20230628/psargs-332)
Feb 20 00:05:36 HP-ENVY-Laptop-13-aq1176ng kernel: ACPI Error: Aborting method \_SB.IETM._OSC due to previous error (AE_NOT_FOUND) (20230628/psparse-529)
Feb 20 09:41:07 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 0, async page read
Feb 20 09:41:07 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 0, async page read
Feb 20 09:41:07 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 0, async page read

[.. many more ..]

Feb 20 09:41:52 HP-ENVY-Laptop-13-aq1176ng kernel: buffer_io_error: 6 callbacks suppressed

[.. many more ..]

Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 8192, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 8192, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 16384, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 16384, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on 

[.. many more ..]

Feb 23 14:43:21 HP-ENVY-Laptop-13-aq1176ng kernel:  filemap_fdatawait_range_keep_errors+0x12/0x50
Feb 23 16:19:36 HP-ENVY-Laptop-13-aq1176ng kernel:  filemap_fdatawait_range_keep_errors+0x12/0x50
Feb 23 20:43:48 HP-ENVY-Laptop-13-aq1176ng kernel:  filemap_fdatawait_range_keep_errors+0x12/0x50
Feb 25 04:04:24 HP-ENVY-Laptop-13-aq1176ng kernel: ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-4]
Feb 25 04:04:24 HP-ENVY-Laptop-13-aq1176ng kernel: ecryptfs_read_folio: Error decrypting page; rc = [-4]
ecryptfs_read_folio: Error decrypting page; rc = [-4]

[.. man more ..]
pedda (81 rep)
Feb 24, 2025, 01:45 PM • Last activity: Mar 6, 2025, 10:50 PM
10 votes
1 answers
1349 views
How can I find a list of card readers that supports blkdiscard
The common answer on the Internet is to read the spec (they never mention it) or know the chipset (hard to know before buying) before buying. Where can I find a list of SD card readers which supports this feature and allows the use of `blkdiscard`? If the device can't work with blkdiscard, which is...
The common answer on the Internet is to read the spec (they never mention it) or know the chipset (hard to know before buying) before buying. Where can I find a list of SD card readers which supports this feature and allows the use of blkdiscard? If the device can't work with blkdiscard, which is true for all my USB based card-reader (20 of them), then you get the following: # blkdiscard /dev/sdb blkdiscard: /dev/sdb: BLKDISCARD ioctl failed: Operation not supported blkdiscard works with TRIM. As far as I can see to support TRIM via USB bridge the USB bridge chip MUST support SCSI / ATA Translation(SAT)'s ATA PASS THROUGH command in order to pass the TRIM command to the disk, so this is effectively asking which USB based card reader supports ATA PASS THROUGH.
Tankman六四 (1037 rep)
May 19, 2018, 02:27 PM • Last activity: Feb 22, 2025, 01:16 AM
4 votes
1 answers
439 views
SD card detection on Dell XPS 13
Linux Mint won't automatically detect a micro SD card inserted into the XPS 13's built-in reader, nor will it detect the card's removal. Running `lspci` causes insertions/removals to be detected. Whether or not the card is inserted and detected, `lspci` outputs: ``` 00:00.0 Host bridge: Intel Corpor...
Linux Mint won't automatically detect a micro SD card inserted into the XPS 13's built-in reader, nor will it detect the card's removal. Running lspci causes insertions/removals to be detected. Whether or not the card is inserted and detected, lspci outputs:
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point LPC Controller/eSPI Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
3a:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
3b:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
3c:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
dmesg output upon successfully recognizing the card's insertion then removal:
[1449759.714673] mmc0: new ultra high speed SDR104 SDXC card at address aaaa
[1449759.715311] mmcblk0: mmc0:aaaa SL64G 59.5 GiB 
[1452627.668392] mmc0: card aaaa removed
When the SD card is detected it has some strange attributes: looking in /sys/block/mmcblk0, removable is 0 and events_poll_msecs is -1.
Drake (41 rep)
Feb 19, 2021, 10:55 PM • Last activity: Feb 8, 2025, 01:26 AM
3 votes
2 answers
20656 views
Locating the /dev entry to make partitions on an SD card
I am trying to create partition of SD card, for this I am following this [tutorial][1]. When I type the command ll /dev/mmcblk* I got this ls: cannot access /dev/mmcblk*: No such file or directory So, I check the list of items in /dev by typing this command ls /dev/ I got a big list of items but the...
I am trying to create partition of SD card, for this I am following this tutorial . When I type the command ll /dev/mmcblk* I got this ls: cannot access /dev/mmcblk*: No such file or directory So, I check the list of items in /dev by typing this command ls /dev/ I got a big list of items but there is nothing like mmcblk0 or mmcblk1. The list I am getting is this autofs dvdrw loop4 psaux ram6 sdb tty10 tty24 tty38 tty51 tty8 ttyS2 ttyS5 vcs6 block ecryptfs loop5 ptmx ram7 sdb1 tty11 tty25 tty39 tty52 tty9 ttyS20 ttyS6 vcs7 bsg fb0 loop6 pts ram8 sg0 tty12 tty26 tty4 tty53 ttyprintk ttyS21 ttyS7 vcsa btrfs-control fd loop7 ram0 ram9 sg1 tty13 tty27 tty40 tty54 ttyS0 ttyS22 ttyS8 vcsa1 bus full loop-control ram1 random sg2 tty14 tty28 tty41 tty55 ttyS1 ttyS23 ttyS9 vcsa2 cdrom fuse mapper ram10 rfkill shm tty15 tty29 tty42 tty56 ttyS10 ttyS24 uhid vcsa3 cdrw hidraw0 mcelog ram11 rtc snapshot tty16 tty3 tty43 tty57 ttyS11 ttyS25 uinput vcsa4 char hpet mei ram12 rtc0 snd tty17 tty30 tty44 tty58 ttyS12 ttyS26 urandom vcsa5 console input mem ram13 sda sr0 tty18 tty31 tty45 tty59 ttyS13 ttyS27 v4l vcsa6 core kmsg net ram14 sda1 stderr tty19 tty32 tty46 tty6 ttyS14 ttyS28 vcs vcsa7 cpu log network_latency ram15 sda2 stdin tty2 tty33 tty47 tty60 ttyS15 ttyS29 vcs1 vga_arbiter cpu_dma_latency loop0 network_throughput ram2 sda3 stdout tty20 tty34 tty48 tty61 ttyS16 ttyS3 vcs2 vhost-net disk loop1 null ram3 sda4 tty tty21 tty35 tty49 tty62 ttyS17 ttyS30 vcs3 video0 dri loop2 port ram4 sda5 tty0 tty22 tty36 tty5 tty63 ttyS18 ttyS31 vcs4 zero dvd loop3 ppp ram5 sda6 tty1 tty23 tty37 tty50 tty7 ttyS19 ttyS4 vcs5 I have followed this tutorial before but I do not any idea what's wrong this time. So,please tell how to get mmcblk list.
tabish (510 rep)
Jun 25, 2014, 01:12 PM • Last activity: Jan 20, 2025, 11:37 PM
7 votes
1 answers
17753 views
Formatting an SD card with mkfs hangs indefinitely
I am trying to format an SD card following [this](https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2#installation) guide. I am able to successfully create the partition table, but attempting to format the Linux partition with `mkfs` yields the following output: mke2fs 1.42.9 (4-Feb-201...
I am trying to format an SD card following [this](https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2#installation) guide. I am able to successfully create the partition table, but attempting to format the Linux partition with mkfs yields the following output: mke2fs 1.42.9 (4-Feb-2014) Discarding device blocks: 4096/1900544 where it appears to hang indefinitely. I have left the process running for a while but nothing changes. If I eject the SD card then mkfs writes the expected output to the terminal: mke2fs 1.42.9 (4-Feb-2014) Discarding device blocks: failed - Input/output error Warning: could not erase sector 2: Attempt to write block to filesystem resulted in short write warning: 512 blocks unused. Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 476064 inodes, 1900544 blocks 95026 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1946157056 58 block groups 32768 blocks per group, 32768 fragments per group 8208 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Allocating group tables: done Warning: could not read block 0: Attempt to read block from filesystem resulted in short read Warning: could not erase sector 0: Attempt to write block to filesystem resulted in short write Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: 0/58 Warning, had trouble writing out superblocks. Why is mkfs reporting that we are "discarding" blocks and what might be causing the hangup? --------------- **EDIT** I am able to successfully create two partitions -- one at 100MB and the other 7.3GB. I then can format, and mount, the 100MB partition as FAT32 -- it's the ext4 7.3GB partition that is having this trouble. dmesg is flooded with: [ 9350.097112] mmc0: Got data interrupt 0x02000000 even though no data operation was in progress. [ 9360.122946] mmc0: Timeout waiting for hardware interrupt. [ 9360.125083] mmc_erase: erase error -110, status 0x0 [ 9360.125086] end_request: I/O error, dev mmcblk0, sector 3096576 **EDIT 2** It appears the problem manifests when I am attempting to format as ext4. If I format the 7.3GB partition as FAT32, as an example, the operation succeeds. **EDIT 2** To interestingly conclude the above, I inserted the SD card into a BeagleBone and formatted it in the exact same way I was on Mint and everything worked flawlessly. I removed the SD card, reinserted it into my main machine and finished copying over the data to the newly created and formatted partitions.
sherrellbc (2601 rep)
Jan 11, 2016, 05:47 PM • Last activity: Jan 19, 2025, 01:21 AM
0 votes
1 answers
273 views
How do I copy the image from SD card to the emmc using linux commands?
I am trying to flash a custom image from my SD card (mmcblk0) onto the emmc (mmcblk1) of my BeagleBone. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 14.9G 0 disk ├─mmcblk0p1 179:1 0 96M 0 part ├─mmcblk0p2 179:2 0 3.5G 0 part / └─mmcblk0p3 179:3 0 9.8M 0 part mmcblk1 179:8 0 3.6G 0 disk mm...
I am trying to flash a custom image from my SD card (mmcblk0) onto the emmc (mmcblk1) of my BeagleBone. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 14.9G 0 disk ├─mmcblk0p1 179:1 0 96M 0 part ├─mmcblk0p2 179:2 0 3.5G 0 part / └─mmcblk0p3 179:3 0 9.8M 0 part mmcblk1 179:8 0 3.6G 0 disk mmcblk1boot0 179:16 0 2M 1 disk mmcblk1boot1 179:24 0 2M 1 disk I try to run this command but it says there is no space left on my emmc - sudo dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=4M status=progress 3825205248 bytes (3.8 GB, 3.6 GiB) copied, 306 s, 12.5 MB/s dd: error writing '/dev/mmcblk1': No space left on device 913+0 records in 912+0 records out 3825205248 bytes (3.8 GB, 3.6 GiB) copied, 306.278 s, 12.5 MB/s But the image I want to copy is less than 3.6GB in total - df -h Filesystem Size Used Avail Use% Mounted on udev 10M 0 10M 0% /dev tmpfs 100M 4.2M 96M 5% /run /dev/mmcblk0p2 3.4G 2.8G 454M 87% / tmpfs 249M 0 249M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 249M 0 249M 0% /sys/fs/cgroup /dev/mmcblk0p1 96M 31M 66M 32% /boot/uboot /dev/mmcblk0p3 9.8M 18K 9.8M 1% /usb_drive My SD card size is almost 15GB and I guess that is the reason it says there is no space left on the device. It is trying to copy the whole of 15GB. I also tried to individually copy just the mmcblk0p2 to my mmcblk1, removed the SD card and tried to boot from the emmc using the command - sudo dd if=/dev/mmcblk0p2 of=/dev/mmcblk1 bs=4M status=progress But it does not work. The User LEDs do not turn on at all. How do I get the image to boot from the emmc? Thank you.
blazingcannon (101 rep)
Jan 7, 2025, 09:05 PM • Last activity: Jan 8, 2025, 03:32 AM
-2 votes
2 answers
94 views
Add label to hard disk or flash drive that is on disk and will show on all systems it is connected to
Kind of similar to [this question][1], but not quite the same. I want to know how I can *reliably* add a *persistent label* to a disk, *especially* a **USB flash drive** or **[Micro]SD card**, that is ***on the disk itself***, such that when I move the disk to *another system*, it can be easily iden...
Kind of similar to this question , but not quite the same. I want to know how I can *reliably* add a *persistent label* to a disk, *especially* a **USB flash drive** or **[Micro]SD card**, that is ***on the disk itself***, such that when I move the disk to *another system*, it can be easily identified with the *same label* - that is, ***the label is on the disk*** and enables the disk to 'self-identify' to any system to which it is subsequently connected to. I am doing this on Windows, and it is apparent that some SD card/USB flash drive manufacturers do not even embed/encode a serial number, let alone a drive label. I know I can 'rename' a 'volume' in Windows Explorer by right-clicking the drive or selecting it and pressing F2, but this technically isn't a physical disk label, it is a volume label, and the associated volume serial number appears to be assigned by Windows and would be lost if the drive is reformatted. Anyone know of a reliable way of applying persistent labels to physical hard drives/removable disks that does not involve the use of a configuration file on the host system to map a label upon connecting the disk to the host system? (Before you joke about printing a sticky label and sticking it to the outside of the physical disk, yes, I can do that, but when I have more than one drive/card plugged into the system I need a way of easily identifying which logical disk in Windows maps to which physical drive).
skeetastax (159 rep)
Dec 21, 2024, 05:09 AM • Last activity: Dec 24, 2024, 12:14 AM
2 votes
3 answers
1110 views
File order on FAT/FAT32/VFAT file systems
I have several audio devices (car radio, portable radio, MP3 player) that take SD cards and USB sticks with a FAT file system on it. Because these devices have limited intelligence they do not sort filenames on the FAT FS by name but merely play them in the order in which they have been copied to th...
I have several audio devices (car radio, portable radio, MP3 player) that take SD cards and USB sticks with a FAT file system on it. Because these devices have limited intelligence they do not sort filenames on the FAT FS by name but merely play them in the order in which they have been copied to the SD card. In MS DOS and MS Windows this was not a problem; using a simple utility that sorted files alphabetically and then copied them across in that order did the trick. However, on Linux the files copied from the ext4 file system do not end up on the FAT FS in the same order as in which they were read and copied across, presumably because there is a buffering mechanism in the way which improves efficiency but does not worry too much about the physical order in which the files end up on the target device. I have also tried to use Windows in a Virtual Box VM but still the files end up being written in a different order than the one they were read from the Linux file system. Is there a way (short of copying them across manually one by one and waiting for all write buffers to be flushed) to ensure that files end up on the FAT SD target in the order in which they were read from the ext4 file system?
Frank van Wensveen (123 rep)
Feb 18, 2020, 10:29 AM • Last activity: Dec 21, 2024, 03:06 PM
11 votes
2 answers
2507 views
USB mmcblk support (realtek or others)
Can a USB card-reader ever appear as /dev/mmcblk0 and support the MMC ioctl commands? I see there are some kernel driver modules such as: rtsx_usb_sdmmc.ko (rtsx-usb-sdmmc) rtsx_usb.ko (rtsx-usb) Can these make a realtek card reader, attached to the USB bus appear as a real MMC device? I notice that...
Can a USB card-reader ever appear as /dev/mmcblk0 and support the MMC ioctl commands? I see there are some kernel driver modules such as: rtsx_usb_sdmmc.ko (rtsx-usb-sdmmc) rtsx_usb.ko (rtsx-usb) Can these make a realtek card reader, attached to the USB bus appear as a real MMC device? I notice that all the USB card readers I have access to appear as /dev/sdX. which appear to be an emulated SCSI device. These emulated SCSI devices do not support all the MMC operations (ioctl). Are there certain USB-attached card-readers (chips) that appear as a /dev/mmcblkX instead of /dev/sdX? This would allow the card to support blkdiscard, trim or fstrim.
Gregor (1429 rep)
Dec 15, 2018, 08:33 PM • Last activity: Nov 14, 2024, 11:13 AM
1 votes
1 answers
194 views
/etc/fstab mounting with auto buffer flushing
My `/etc/fstab` line for the SD I'm willing to mount looks like: ``` /dev/mmcblk1 /media/sd_card vfat user,rw,umask=000,sync 0 2 ``` With this line I'm able to mount the SD, but everytime I want to unplug the SD I have to execute `blockdev --flushbufs /dev/mmcblk1` if I want to make the written chan...
My /etc/fstab line for the SD I'm willing to mount looks like:
/dev/mmcblk1    /media/sd_card  vfat    user,rw,umask=000,sync  0 2
With this line I'm able to mount the SD, but everytime I want to unplug the SD I have to execute blockdev --flushbufs /dev/mmcblk1 if I want to make the written changes take effect. What means, that if I dont execute the blockdev-command all the written changes are lost after unplugging the SD. The weird thing is, that I all the time I was using this line, I thought everything is working fine... So what am I doing wrong? ---------- I'm working on the jetson tx2 with Ubuntu 16.04 running on it.
JulianW (143 rep)
Aug 22, 2019, 11:08 AM • Last activity: Oct 19, 2024, 09:55 AM
Showing page 1 of 20 total questions