Recovering settings from failed SD card

Post Reply
M0LMK
Posts: 7
Joined: Mon Jan 21, 2019 4:02 pm

Recovering settings from failed SD card

Post by M0LMK »

I've had an SD card failure in a repeater and yes, I know, I should have a back up image but I don't. Quite frankly, I'm ashamed! In this case, it won't help much because the repeater has been tweaked over the years. The card failed after attempting an update to the latest release.

The Pi halts with "Kernel panic - not syncing - Attempted to kill init!" but I can put it in a USB -> SD adaptor and mount it on another Pi with no problem. Is there a way I can recover the Pi-Star settings from the mounted card file system so I don't have to start from scratch? I have written a new card with a new pi-star download so I can start with a good card.

Thanks!

Matt
M0LMK
KE7FNS
Pi-Star Team
Posts: 2077
Joined: Wed Apr 17, 2019 11:11 pm

Re: Recovering settings from failed SD card

Post by KE7FNS »

M0LMK wrote: Tue Sep 14, 2021 9:13 am Is there a way I can recover the Pi-Star settings from the mounted card file system so I don't have to start from scratch
Its possible but you are going to have to hunt around and find all of the files individually.

What you need to do is make a backup.zip, and that will give you a list of files you need. Then you need to scan the mounted Linux partition on the SD card for every file and copy it off.

Most of the configuration files are in the /etc folder, but there may be some elsewhere.

Honestly, It would take longer to hunt around and copy files over than it would to just re-enter the information. I use chrome and it caches what I put into the fields in the dashboard so I only have to click a bunch of times to get the settings.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol: and again
AF6VN
Posts: 619
Joined: Fri Jul 20, 2018 1:15 am

Re: Recovering settings from failed SD card

Post by AF6VN »

M0LMK wrote: Tue Sep 14, 2021 9:13 am The Pi halts with "Kernel panic - not syncing - Attempted to kill init!" but I can put it in a USB -> SD adaptor and mount it on another Pi with no problem. Is there a way I can recover the Pi-Star settings from the mounted card file system so I don't have to start from scratch? I have written a new card with a new pi-star download so I can start with a good card.
That doesn't sound like a "failed" SD card. That sounds more like a bad file system and corrupted boot files. See what running fsck on the ext4 partitions of the card reports... And also check the FAT partition (using something -- Windows doesn't know ext4 but may reveal the FAT partition for checking.

You might also try copying contents from the FAT partition of a good image to the "bad" SD card, since many of the R-Pi initial boot is stored in FAT.

--
AF6VN
Dennis L Bieber
KE7FNS
Pi-Star Team
Posts: 2077
Joined: Wed Apr 17, 2019 11:11 pm

Re: Recovering settings from failed SD card

Post by KE7FNS »

AF6VN wrote: Tue Sep 14, 2021 10:02 pm That sounds more like a bad file system and corrupted boot files.
Bad file system, maybe, corrupted boot files, no. The stuff in /boot is used to boot the firmware of various chips on the RPi board, once it loads kernel.img then its Linux, and any kernel messages are within the OS itself, so his issue is beyond the /boot partition once you see any kernel messages on the console.

Image
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol: and again
M0LMK
Posts: 7
Joined: Mon Jan 21, 2019 4:02 pm

Re: Recovering settings from failed SD card

Post by M0LMK »

Thanks for the replies all.

I created a new SD card with a fresh Pi-Star install and then copied over the /etc/mmdvmhost file. That seems to have done most of the work and the repeater is back up and running.

I did try running fsck by putting the bad card into a USB adaptor and plugging in into a Linux box but it reported the ext4 partition as clean with no errors. I used dosfsck to check the FAT32 partition and that also came back with no errors.

Matt
M0LMK
Post Reply