[arm-allstar] all changes to system lost on reboot

David McGough kb4fxc at inttek.net
Sat Mar 4 02:00:15 EST 2023



Hi,

The most likely issue causing this is corruption of the SD card 
filesystem---HamVoIP uses the Linux "ext4" filesystem for primary storage.  
Once you're sure you've got any important files backed up, it's possible 
to perform a filesystem check on an SD card, attempting to repair any 
damage.  This check can't be performed while the node is running. The 
simplest way to accomplish the check is to use a different Linux system 
and a USB SD card reader/writer.

Or, alternatively, boot your node RPi with a "stock" (unconfigured)
HamVoIP firmware image.  Then, plug the errant SD card into this system 
using a USB SD card reader/writer.

Once the SD card is plugged into the Linux system via the USB card 
adapter, it'll (hopefully!) show up as the storage device: /dev/sda
You can check this by listing the contents of the /dev/disk/by-id folder, 
for example:

....Here is this folder with NO USB SD card reader attached:

[root at RPi4B-dev ~]# ls -lisa /dev/disk/by-id
total 0
 1447 0 drwxr-xr-x 2 root root 100 Feb 22  2016 .
 1446 0 drwxr-xr-x 5 root root 100 Feb 22  2016 ..
 1448 0 lrwxrwxrwx 1 root root  13 Feb 22  2016 mmc-SB16G_0x85071a05 -> ../../mmcblk0
14538 0 lrwxrwxrwx 1 root root  15 Feb 22  2016 mmc-SB16G_0x85071a05-part1 -> ../../mmcblk0p1
14525 0 lrwxrwxrwx 1 root root  15 Feb 22  2016 mmc-SB16G_0x85071a05-part2 -> ../../mmcblk0p2

....And, here it is again, after plugging the USB reader w/SD card in:

[root at RPi4B-dev ~]# ls -lisa /dev/disk/by-id
total 0
   656 0 drwxr-xr-x 2 root root 160 Mar  4 01:53 .
   655 0 drwxr-xr-x 5 root root 100 Feb 22  2016 ..
   657 0 lrwxrwxrwx 1 root root  13 Feb 22  2016 mmc-SB16G_0xeb13d897 -> ../../mmcblk0
  1778 0 lrwxrwxrwx 1 root root  15 Feb 22  2016 mmc-SB16G_0xeb13d897-part1 -> ../../mmcblk0p1
   767 0 lrwxrwxrwx 1 root root  15 Feb 22  2016 mmc-SB16G_0xeb13d897-part2 -> ../../mmcblk0p2
297848 0 lrwxrwxrwx 1 root root   9 Mar  4 01:53 usb-Mass_Storage_Device_121220160204-0:0 -> ../../sda
297861 0 lrwxrwxrwx 1 root root  10 Mar  4 01:53 usb-Mass_Storage_Device_121220160204-0:0-part1 -> ../../sda1
296494 0 lrwxrwxrwx 1 root root  10 Mar  4 01:53 usb-Mass_Storage_Device_121220160204-0:0-part2 -> ../../sda2


....And, the sda device (with 2 partitions: sda1 and sda2) is now visible.  
To perform the filesystem check, run this command.  Note that any errors 
should be automatically corrected:

[root at RPi4B-dev ~]# fsck.ext4 -fy /dev/sda2
e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda2: 92694/243360 files (0.1% non-contiguous), 582884/972182 blocks


....Finally, unplug the USB SD card reader/writer and try out the 
"repaired" SD card.


73, David K4FXC



On Wed, 1 Mar 2023, LaRoy McCann via ARM-allstar wrote:

> Yeah, that is my plan.

On Wed, Mar 1, 2023 at 7:48 PM Patrick Perdue via ARM-allstar <
arm-allstar at hamvoip.org> wrote:

> I saw this on a system once. Shortly thereafter, the MicroSD card became
> unusable. I'd say back that stuff up and transfer it to a new card just
> to be safe.
>
>
> On 3/1/2023 5:37 PM, LaRoy McCann via ARM-allstar wrote:
> > This is a very strange situation.  I have a system that has been running
> > for years.  I recently made some changes to rpt.conf and also created ssh
> > keys to another system.  Upon reboot of the system all my changes are
> gone
> > and the file date for rpt.conf is back to the date it was before making
> any
> > changes (june 8, 2022).  All my ssh key files are also gone.  I created a
> > new file in /etc/asterisk and upon reboot it is gone.
> >
> > I don't see how this is happening, but I know it is technically possible.
> >
> > The flash card can't be write protected or the system would not run or I
> > would not be able to write files to the system.  I know there are some
> > tmpfs file systems, but / is not one of them.  I even issued the sync
> > command 3 times just to make sure cache was flushed to the flash drive.
> >
> > Has anyone ever seen such a thing as this?
> >
> > I am going to redo this system from scratch but I am one that would like
> to
> > know WHY?
> >
> > 73's
> >
> > LaRoy McCann / K5TW
> > _______________________________________________
> >
> > ARM-allstar mailing list
> > ARM-allstar at hamvoip.org
> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >
> > Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>
_______________________________________________

ARM-allstar mailing list
ARM-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar

Visit the BBB and RPi2/3/4 web page - http://hamvoip.org



More information about the ARM-allstar mailing list