LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Micro SD card 32GB; issue? (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/micro-sd-card-32gb%3B-issue-4175719155/)

floppy_stuttgart 11-26-2022 06:04 AM

Micro SD card 32GB; issue?
 
1 Attachment(s)
Hello,
in order to boot a pi3, I wanted to use a Micro SD I had by hand (had worked on a pi4).
Result so far:
a) I have deleted all data by writing zero on the SD with the dd command (since I had errors with gparted and the recognized sized was only 1.8GB for a fat32)
b) I have then created a msdos partition table with gparted
c) tried to create a single partition with fat32 (8GB recognized)
d) so far done but with an error. see attachment.
Any advice is welcome..
a) throw that micro SD through the window (cost 10eur in online shop) .. or
b) spend more time with it for having working correctly (not sure where it is coming from.. SD adapter, SD card reader, SD card itself,..).
Any idea/comment is welcome.

dmesg log by connecting the SD adapter in an USB card reader:

Code:

[103955.348922] usb 1-5: new high-speed USB device number 19 using xhci_hcd
[103955.502576] usb 1-5: New USB device found, idVendor=050d, idProduct=003a, bcdDevice=97.32
[103955.502583] usb 1-5: New USB device strings: Mfr=3, Product=4, SerialNumber=5
[103955.502587] usb 1-5: Product: USB Reader
[103955.502591] usb 1-5: Manufacturer: BELKIN
[103955.502594] usb 1-5: SerialNumber: 000000002346
[103955.504660] usb-storage 1-5:1.0: USB Mass Storage device detected
[103955.505251] scsi host5: usb-storage 1-5:1.0
[103956.534665] scsi 5:0:0:0: Direct-Access    Generic  STORAGE DEVICE  9732 PQ: 0 ANSI: 0
[103956.789755] scsi 5:0:0:1: Direct-Access    Generic  STORAGE DEVICE  9732 PQ: 0 ANSI: 0
[103956.790648] scsi 5:0:0:2: Direct-Access    Generic  STORAGE DEVICE  9732 PQ: 0 ANSI: 0
[103956.791387] scsi 5:0:0:3: Direct-Access    Generic  STORAGE DEVICE  9732 PQ: 0 ANSI: 0
[103956.792148] scsi 5:0:0:4: Direct-Access    Generic  STORAGE DEVICE  9732 PQ: 0 ANSI: 0
[103956.792806] sd 5:0:0:0: Attached scsi generic sg2 type 0
[103956.793333] scsi 5:0:0:1: Attached scsi generic sg3 type 0
[103956.793852] scsi 5:0:0:2: Attached scsi generic sg4 type 0
[103956.794531] sd 5:0:0:3: Attached scsi generic sg5 type 0
[103956.795047] scsi 5:0:0:4: Attached scsi generic sg6 type 0
[103956.795942] sd 5:0:0:2: [sde] 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB)
[103956.796828] sd 5:0:0:2: [sde] Write Protect is off
[103956.796859] sd 5:0:0:2: [sde] Mode Sense: 03 00 00 00
[103956.797664] sd 5:0:0:2: [sde] No Caching mode page found
[103956.797675] sd 5:0:0:2: [sde] Assuming drive cache: write through
[103956.824123]  sde: sde1 sde2
[103956.837486] sd 5:0:0:1: [sdd] Attached SCSI removable disk
[103956.839310] sd 5:0:0:4: [sdg] Attached SCSI removable disk
[103956.840583] sd 5:0:0:0: [sdc] Attached SCSI removable disk
[103956.842453] sd 5:0:0:3: [sdf] Attached SCSI removable disk
[103956.854987] sd 5:0:0:2: [sde] Attached SCSI removable disk



gparted log:

Code:

========================================
Laufwerk:        /dev/sde
Modell:       
Seriennummer:       
Sektorgröße:        512
Sektoren insgesamt:        16190648
 
Köpfe:        4
Sektoren/Spuren:        32
Zylinder:        126489
 
Partitionstabelle:        msdos
 
Partition        Typ        Anfang        Ende        Markierungen        Partitionsname        Dateisystem        Bezeichnung        Einhängepunkt
/dev/sde1        Primär        2048        16189439                        fat32               

========================================
Dateisystem (fat32) auf /dev/sde1 überprüfen und reparieren  00:00:01    ( FEHLER )
           
/dev/sde1 kalibrieren  00:00:00    ( ERFOLG )
           
Pfad: /dev/sde1 (Partition)
Anfang: 2048
Ende: 16189439
Größe: 16187392 (7.72 GiB)
Dateisystem auf /dev/sde1 auf Fehler überprüfen und (falls möglich) diese beheben  00:00:00    ( ERFOLG )
           
fsck.fat -a -w -v '/dev/sde1'  00:00:00    ( ERFOLG )
           
fsck.fat 4.2 (2021-01-31)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkfs.fat"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
512 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
2064896 bytes per FAT (= 4033 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 4146176 (sector 8098)
516190 data clusters (264289280 bytes)
32 sectors/track, 64 heads
8192 hidden sectors
524288 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sde1: 0 files, 1/516190 clusters
Dateisystem bis zum Auffüllen der Partition vergrößern  00:00:01    ( FEHLER )
           
libparted wird verwendet
libparted-Benachrichtigungen    ( FEHLER )
           
Could not detect file system.


fatmac 11-26-2022 07:27 AM

Maybe try clearing the MBR first, give it a new one, then partition it, & put a filesystem on it.

Looking at its reported size, it looks like an image file was previously written to it, hence it's only reporting 1.8GB.

Example code to clear the MBR.
Code:

sudo dd if=/dev/zero of=/dev/<sdcard> bs=4M

michaelk 11-26-2022 07:30 AM

What distribution were you planning on using?
Have you tried using dd to copy the image to the card yet?

Did you actually format the card with FAT32?

business_kid 11-26-2022 12:12 PM

SDcards have very low writes. It sounds like it's going senile.

I would not bother with extensive writes, but when something beyond a simple fsck comes up, I'd order another. Because even if you get an image on (which you probably won't), how long would you trust it for?

floppy_stuttgart 11-26-2022 03:18 PM

Quote:

Originally Posted by fatmac (Post 6394461)
Maybe try clearing the MBR first, give it a new one, then partition it, & put a filesystem on it.

Looking at its reported size, it looks like an image file was previously written to it, hence it's only reporting 1.8GB.

Example code to clear the MBR.
Code:

sudo dd if=/dev/zero of=/dev/<sdcard> bs=4M

I have done that dd when it was showing 1,8GB.
It was showing more GB after reformatting with gparted (FAT32).
But the card is now not recognized when I included it into an hub.

floppy_stuttgart 11-26-2022 03:20 PM

Quote:

Originally Posted by michaelk (Post 6394462)
What distribution were you planning on using?
Have you tried using dd to copy the image to the card yet?

Did you actually format the card with FAT32?

I was making all commands from Debian 64bits PC.
I want to use raspbian.
I made the dd to copy the image into the card but id did not boot.

floppy_stuttgart 11-26-2022 03:23 PM

Quote:

Originally Posted by business_kid (Post 6394533)
SDcards have very low writes. It sounds like it's going senile.

I would not bother with extensive writes, but when something beyond a simple fsck comes up, I'd order another. Because even if you get an image on (which you probably won't), how long would you trust it for?

You are right. I just ordered 2 new micro SD cards.
Its a pity because the card was used only a few time (however 2-3 years old with <10 probably unsafe shutdown.
So, now, I close that thread and it just confirm my impression since few months, SD cards booting a raspberry pi is an unstable thing (a copy of each install on a backup card should be made every time).

business_kid 11-27-2022 05:27 AM

My RazPi is booting from an SSD. There's a firmware update that allows booting from USB. Even a usb key lasts far longer than sdcards. The expensive sdcards have better write spec, but a 2.5 inch drive runs fine from usb-3.x.

rclark 12-05-2022 05:26 PM

I haven't it tried it yet, but there is an SD card called 'Samsung Pro Endurance' that might be better than run of the mill SD cards. Thinking about popping for a few as there are situations where the location (size/power) precludes using a USB 3.0 external SSD. PI zeros come to mind too that don't have the USB option. Looking around my office I have 4 of my RPI-4s running off of 500GB T5 or T7 SSDs (ie. No SD Card installed, boot from USB SSD). I really like these Samsung SSDs even for general use. NOTE: only the 500GB drives. The 1TB and 2TB draw to much power and the PI will usually become unstable. I do wish the Raspaberry PI people thought about allowing more current into its USB sub-system. Of course if you add a powered USB hub then that problem goes away, but you no longer have a compact system and two power cords to deal with....


All times are GMT -5. The time now is 02:58 PM.