LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 11-26-2022, 06:04 AM   #1
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,155
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
Micro SD card 32GB; issue?


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.
Attached Thumbnails
Click image for larger version

Name:	Bildschirmfoto vom 2022-11-26 12-54-35.png
Views:	5
Size:	49.4 KB
ID:	39930  

Last edited by floppy_stuttgart; 11-26-2022 at 07:09 AM.
 
Old 11-26-2022, 07:27 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,501

Rep: Reputation: Disabled
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
 
1 members found this post helpful.
Old 11-26-2022, 07:30 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,736

Rep: Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920
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?
 
Old 11-26-2022, 12:12 PM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,356

Rep: Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332
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?
 
1 members found this post helpful.
Old 11-26-2022, 03:18 PM   #5
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,155

Original Poster
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by fatmac View Post
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.
 
Old 11-26-2022, 03:20 PM   #6
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,155

Original Poster
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by michaelk View Post
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.
 
Old 11-26-2022, 03:23 PM   #7
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,155

Original Poster
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by business_kid View Post
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).
 
Old 11-27-2022, 05:27 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,356

Rep: Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332
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.
 
Old 12-05-2022, 05:26 PM   #9
rclark
Member
 
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 487

Rep: Reputation: 180Reputation: 180
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....

Last edited by rclark; 12-05-2022 at 05:37 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Micro-Application Services Require Micro-Network Services LXer Syndicated Linux News 0 11-30-2016 02:21 AM
[SOLVED] Strange behaviour 2Gb SD then 16Gb micro SD in usb All in 1 micro card reader hdp160 Linux - Hardware 4 08-03-2015 06:06 AM
dd: can't copy a 32GB USB 3.0 SanDisk extreme to another 32GB USB 3.0 SanDisk Ultra basskleff Linux - Software 17 11-12-2013 10:58 AM
People who call it M$ or Micro$oft or Micro$loth lowpro2k3 General 48 12-24-2007 12:19 AM
LXer: Imation 4GB Micro Hard Drive: Still Micro on the Outside, More Giga on the Inside LXer Syndicated Linux News 0 12-28-2005 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration