Read the statement by Michael Teeuw here.
Everything was going so well
-
@sdetweil so I ran e2fsck -f -v /dev/mmcblk0p2
got a warning about SEVERE filesystem damage.
went yes and got ]e2fsck : permission denied while trying to open /dev/mmcblk0p2
you must have r/w access to the filesystem or be root.How do I get around this?
-
@JMac I am sure Sam is probably still sleeping, but you can try
sudo e2fsck -f -v /dev/mmcblk0p2. This should run as root user. -
@mumblebaj when I run that in terminal I get,
e2fsck 1.46.2 (28-Feb-2021)
/dev/mmcblk0p2 is mounted.
e2fsck: cannot continue, aborting.Any thoughts, is that image/setup a goner?
-
@JMac You could try
systemctl stop udevand then try running it again. My knowledge of these linux things are not that great. Orservice udev stopmight work. I am leaning towards the card being a goner thought. -
@mumblebaj It would be way easier if I could recover the previous setup but I’m starting to feel like it might be worth starting the entire MM install again, but for me that’s the least interesting parts of Pi builds.
The files are still available on the old SD card so the card itself isn’t completely kaput.
edit to add I ran the systemctl stop udev command.
put in the password of the MM to allow this.
re ran sudo e2fsck -f -v /dev/mmcblk0p2
and get the same e2fcsk: cannot continue, aborting error. -
@JMac You can use the scripts from Sam to install MM. You can find them here. Always do a backup of your install with one of Sam’s script as this would save tears in the end. I have been there before and the backup and restore process saved me a few times.
Scripts can be located here:
https://github.com/sdetweil/MagicMirror_scripts -
@JMac you cant whack on a file system if its mounted for access,do
df -k
will show u the devices and where they are mounted then sudo umount /dev/… what you were using
df -k should show it gone
then the fsck… commands should work w sudo -
@JMac if u can get the config, custom
css and and listing of the modules ( ls command) we can build the backup/restore files -
@sdetweil sorry to be dense how do I know what I’m unmounting?
am I unmounting /dev/mmcblk0p1?? it says thats mounted on /boot.edit to add,
after re running sudo fdisk -l it would appear the old memory card (with my previous MM setup on) is on Disk /dev/sdathats classed as Disk Model: storage device (as it’s mounted in the usb drive atm) does this seem correct? is this the one which needs unmounting?
-
@JMac well mounted means accessible by the filesystem
so it’s /dev/sda
the usb installed sd cardso
sudo unmount /dev/sda
and then run fsck on that -
so I run the command sudo umount /dev/sda
and get
umount: /dev/sda: not mounted.so should now go,
e2fsck -f -v /dev/sda
not the original
e2fsck -f -v mmcblk0p2?
-
@JMac correct… you had to find the disk name
-
@sdetweil when i run e2fsck…
I get
e2fsck: permission denied while trying to open /dev/sda
you must have r/w access to the filesystem or be root. -
@JMac yes, you must use sudo on both commands unmount and fsck
sorry I was unclear
normal users should not be able to mess with hardware, so one must act as root
-
@sdetweil I run sudo umount…
and get
umount:… not mounted,then run
sudo e2fsck -f -v /dev/sda
and get
e2fsck 1.46.2 (28-feb-2021)
/dev/sda is in use
efsck: connot continue, aborting. -
@JMac hm… wonder what is using it?
can you open the disks app on the pi from the dedktop menu
-
@sdetweil on the home screen I have 2 drive icons under the wastebasket.
one is boot
the other is rootfsi then have the option to eject these in the file manager
-
@JMac there should be that drive on /dev/sda too
-
@sdetweil I’m a little confused (I’d imagine thats pretty clear at this point).
i run sudo fdisk -1
and get
Disk /dev/ram0 through to Disk /dev/ram15
the list then has
Disk/dev/mmcblk0: 7.4GiB (my thinking is this is the current/new sd card)Device
/dev/mmcblk0p1
/dev/mmcblk0p2Disk /dev/sda:59.69 GiB (I again assume this is the old SD with my original MM setup)
Device
/dev/sda1
/dev/sda/2end of the list.
does any of that make sense/ is any of it what I’m looking for? I’ve obviously taken out several lines under each of those headers just for space and time typing.
-
@JMac yes sda has two partitions boot and rootfs
but you need to run e2fsck on /dev/sda2
e2fsck mean extended version 2, file system check
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login