Add files on /boot from Windows?

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
adsb4fun
Posts: 5
Joined: Sat Aug 15, 2020 6:39 pm

Add files on /boot from Windows?

Post by adsb4fun »

Hi!

Have been running DietPi for a few years (also being a Patreon) and first want to say thanks for a great product!

Im exploring the option to be able to add and edit a config file to /boot from Windows, much like dietpi-wifi.txt

The problem is that it seems like /boot partition gets corrupted if i ADD the file from Windows. First i thought something was wrong with my dev. installation but installing a new DietPi from scratch gave the same result. Add a regular .txt file saved from Notepad gives strange errors. Running fsck first with ok result, adding file, not booting at all or gives errors in the dmesg-log.

Is /boot something that should not be touched from Windows, even though its FAT and can be seen? Perhaps adding the file from within Dietpi and only editing it from Windows?
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: Add files on /boot from Windows?

Post by Joulinar »

Hi,

many thanks for your message. I tried to replicate you issue but without successes. I did not encounter any issue creating files on /boot while the SD card is plugged into my Windows system. What I did is following
  1. create a fresh install of DietPi on my SD card (RPi image)
  2. plug SD card back to Windows once finished
  3. create a demo file on /boot
  4. plug SD card into my RPi, boot and perform initial setup
  5. do another reboot and create an additional demo file on /boot
  6. plug SD card back to Windows and create a 3rd demo file
  7. plug SD card into my RPi, system is still booting fine without issues
how did you switch of your SBC? Do you just remove power or do you use commands like poweroff/shutdown?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
adsb4fun
Posts: 5
Joined: Sat Aug 15, 2020 6:39 pm

Re: Add files on /boot from Windows?

Post by adsb4fun »

Thanks for testing my issue!

Its a Rpi4 and i usually go with "shutdown -h now" (old habit from work). But i think poweroff is essentially the same.

Have done some more testing now and it seems to point to old or corrupted SD-cards. Two cards produce different issues, one does not boot at all after having a new file in /boot, one does boot but Dietpi can not read files from /boot and i get corruption-messages in dmesg.

The cards i have used when testing this feature has at least 3-4 years of age, and unknown wear. I have been using them lately for some development for the last 2-3 months, but only working inside the booted Dietpi in /. Not in /boot.

By you verifying it should work it gives me a direction to work with (buying some new cards to start with :D )

Many thanks!
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: Add files on /boot from Windows?

Post by Joulinar »

could be that your cards are dying. But maybe you could check the SD card adaptor or check on a different windows box. You never know.

During my test, I just create a text file with a single line inside. So not really transferred heavy data
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
adsb4fun
Posts: 5
Joined: Sat Aug 15, 2020 6:39 pm

Re: Add files on /boot from Windows?

Post by adsb4fun »

Yes, i will do some other tests around hardware also. Have just ordered a new card reader and some cards. Currently writing the cards with a Icy Box in the 5.25" slot which also perhaps could be the issue. Some tests from my laptop is also good.

Thanks!
Post Reply