×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

Boot partition

2 months 3 days ago
Aurneth
Senior Boarder
Senior Boarder
Posts: 55
More
Topic Author
Boot partition #51491
Every now and then, my Astroberry RPi3B+ crashes or its power is cut while running or somesuch.

And inevitably, the boot partition, which is a Windows Fat32 or vfat partition, ends up with a "dirty bit", and the Pi won't boot.

So I have to shut it back off, pull the MicroSD card out, insert it into another computer and repair the partition with fsck:

~$ fsck /dev/sdf1
(sometimes it's on /dev/mmcblk* if the computer is a laptop with an integral SD card reader)

It finds there's a dirty bit, asks me if I want to remove it, and once removed and reinserted into the Pi, it boots normally.

But this is something of a nuissance, realistically.

Is there a reason the boot partition is a vfat partition? It just doesn't seem terribly robust for something that might well be used in the field where power problems can be an issue.


Fwiw, my card is a 64 GB Samsung EVO Select U3 MicroSDXC. In addition to the boot and root partitions created from the Astroberry image, I've added another vfat partition for photo storage (vfat so I can access it on 'doze machines if needs be) and an ext partition that holds several gigabytes worth of FITS files for astrometric plate solving.

Please Log in or Create an account to join the conversation.

2 months 1 day ago
Kaczorek
Moderator
Moderator
Posts: 896
Karma: 6
More
Boot partition #51549
You won't be able to do anything with vfat partition. It is the only one supported by raspberry boot loader. I would rather focus on determining a root case for reboots. Unreliable PSU?

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM

Please Log in or Create an account to join the conversation.

2 months 1 day ago 2 months 1 day ago by Aurneth.
Aurneth
Senior Boarder
Senior Boarder
Posts: 55
More
Topic Author
Boot partition #51558
There's no root cause... it could be a cable snagging, the Pi falling off the mount when the velcro let go, an actual power outage or interruption (at our family's cottage this happens a fair bit - the power just goes off for a few seconds), etc - just anything random that can cause an interruption in power supply. During one especially cold night (<-25°) the Pi even got too cold to keep running and sort of slow-crashed as I lost access to it (I had to attach foam insulation to it to prevent it from happening again).

It's just that once it has happened it is a pain to recover from.

But your post indicated that it was a Raspberry Pi issue more generally, so I searched on that. I found plenty of others who had had issues of this nature. Here's someone who had the same issue and someone else who posted a script to deal with it:
raspberrypi.stackexchange.com/questions/...usb-stick-or-sd-card


From that I slightly rewrote it and came up with the following (it adds a repair for a second vfat partition as I have a second one on the disk). I've tested it and it seems to work so feel free to grab it and add it to the Astroberry images.

Warning: Spoiler! [ Click to expand ]



I don't know if all those 'sudo' calls are actually necessary for a boot script though... probably not?
The following user(s) said Thank You TallFurryMan

Please Log in or Create an account to join the conversation.

2 months 1 day ago
Kaczorek
Moderator
Moderator
Posts: 896
Karma: 6
More
Boot partition #51560
Thanks for directions. If you cannot avoid hard shutdown due to random power losses it is the way to go
Similar approach is already enabled for root file system of Astroberry Server (see /boot/cmdline.txt), but it might be good idea to enable it for /boot partition too.

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM

Please Log in or Create an account to join the conversation.

2 months 1 day ago
Aurneth
Senior Boarder
Senior Boarder
Posts: 55
More
Topic Author
Boot partition #51563
So I'm not sure this actually is working... least of all because the device names on my Pi are of the mmc variety.

Further testing and tweaking is required.

Please Log in or Create an account to join the conversation.

2 months 1 day ago
Kaczorek
Moderator
Moderator
Posts: 896
Karma: 6
More
Boot partition #51565
Just change sda1 to mmcblk0p1 (and sda2 to mmcblk0p2 respectively) and you will be fine

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM

Please Log in or Create an account to join the conversation.

2 months 1 day ago
Aurneth
Senior Boarder
Senior Boarder
Posts: 55
More
Topic Author
Boot partition #51567
It's weird, it's now rebooting fine without the script even when the power is turned of. Of course it never does that at night!

I hate when I can't replicate problems!

The main difference is that I don't have the mount plugged it, but I do have one of the cameras plugged in.

I thought maybe it was because I was just switching the power off with the power supply cable's switch rather than pulling the power supply out, but it worked after just pulling the cable as well.

Still more testing required...

Please Log in or Create an account to join the conversation.

Moderators: Kaczorek
Time to create page: 0.195 seconds