Unable to mount SD card

Started by Brettvan, September 29, 2019, 16:36:49 PM

Previous topic - Next topic

Brettvan

Hi

I am trying to boot my Linux MX on my SD card using an old IBM Lenovo ThinkPad t410.

I problem is that when I load up plop boot manager it fails to mount the SD card. It looks like the SD card has a EXT 4 partition and should be mountable but fails. How do I work around this so I can boot SD card? Is there a way to do this within the shell and boot it in a roundabout way?

Thanks Brett

Elmar

Hello,

are you sure that you talk about the Plop Boot Manager and not about PlopKexec? The Plop boot manager has no shell.

Best regards
Elmar

Brettvan

Hi Elmar,

Thanks for the reply.

I am using the plopkexec bootmanager to try and boot the SD card.  Based on another thread, it looks like it's possible.

https://forum.plop.at/index.php/topic,1892.0.html

I am just having troubles with understanding how to do the custom setup. like adding the bootup files to the /boot directory?  is that on the SD card or on the plopexec image?  Is this a custom image i have to compile?  Thanks,

here is the error message in the booting log:
Can not mount /dev/mmcblk0
...
Can not mount /dev/mmcblk0p1

Elmar

You don't have to compile a custom image.

Is '/boot' on an own partition?
What files are in '/boot'?

Brettvan

Hi Elmar

I was able to get it working today by creating a PlopKexec.cfg file in the /boot partition of the SD card. I changed all the attributes to match my linux to boot.

Inside the that config file is the following:
TIMEOUT 10
DEFAULT LinuxMX

LABEL LinuxMX
   LINUX ./vmlinuz-4.19.0-5-amd64
   APPEND boot=/dev/mmcblk0p2 rw
   APPEND root=/dev/mapper/rootfs rw
   INITRD ./initrd.img-4.19.0-5-amd64


This SD card is encrypted with a LUKS partition.  Good to know that it boots despite the extra complication :).  This worked on my work computer so in theory it should work with my t410.  I won't know until i get home to test.

Thanks.

aclef

Glad to see I'm not the only one running linux on SD cards :D

PS: Running Linux on SD card with EXT4 may not be a good idea, because wear leveling mechanism in SD cards are usually weak(like local dynamic wear leveling), and journaling filesystem can kill USB drives(without sophisticated SSD controller) relatively fast, even faster with SD card.

I'd recommend using COW filesystems like BTRFS(if you want compression but with more intricacies), or log-structures FS like F2FS/NILFS2.

PS2: Do not turn on discard mount option on a SD card if 1)you are going to use BTRFS on SD card and 2)The SD card reader is connected to your computer via PCI-e. This combination will cause data loss regardless of  card brand. (I don't know yet why)
My mount option for SD card with BTRFS is: noatime, compress=zlib, commit=0,ssd_spread, autodefrag, nodiscard. Which has been tested on multiple cards and works flawlessly.

Brettvan

i'll check it out. 

Yes, SD cards rock in comparison to a usb 2.0.