Linux - Embedded & Single-board computerThis 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
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.
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.
Last edited by floppy_stuttgart; 11-26-2022 at 07:09 AM.
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?
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.
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).
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.
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....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.