robinndi
Posts: 19
Joined: Wed Jan 29, 2014 3:56 pm

Error writing file: 5 access is denied

Fri Mar 02, 2018 3:18 pm

Get message: Error writing file: 5 access is denied
1. Flip lock switch to other position: Now different error" The request could not be performed because of an I/O device error". Flip back. Now original message.
2. Reboot windows did not fix
3. Try Quick format to Fat32. did not fix
4. Run as Administrator did not fix.
5. Power cycle display (with reader) did not fix
6. Try slow format to Fat32. did not fix
See also.
8. "For anyone still experiencing this open CMD as admin and run these commands:"

Code: Select all

diskpart
list disk
select disk <#> (select the sdcard)
clean
create partition primary
format fs=fat32 quick
assign
This did not fix.

Finally...
9. I did a shut-down to shut PC power completely off. Funnily, then the front-panel PC push button to boot would not work. Finally, I turned off the back panel master power switch for 10 seconds. Then on again. Now boot button works. BIOS gets reloaded. Windows boots. Now plug in the SD card. Now Explorer says I have a J: and a K:. It lists J: as "USB drive" and lists K: as "boot". I don't understand why one SD card generates two entries? So I decided K: was the one I needed. Then I ran Win32DiskManager (with it's short-cut tagged 'Run as Administrator) pointed to the .img and K: and programmed the SD with no errors.
Conclusions:
I am not sure if step 8 helped.
It seems to me that somehow the BIOS was messed up. Soft Windows reboot may/does not(?) rerun all the BIOS stuff. Power off/power on makes sure everything is clean.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10583
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Error writing file: 5 access is denied

Fri Mar 02, 2018 4:57 pm

this isn't a windows problems forum!
split off from a 4 year old (on topic) thread you hijacked, and moved here.

are you talking about WIN10IOT?
If not I will delete this as off topic.

please explain why this question belongs here?, and no just because it fits the title is not a good enough reason!

robinndi
Posts: 19
Joined: Wed Jan 29, 2014 3:56 pm

Re: Error writing file: 5 access is denied

Sat Mar 03, 2018 2:32 pm

because it fits the title is not a good enough reason!
If you search Google for 'Raspbian 5 Access is denied', you end up with that post.

I know it was an old post, and although old, it is still current. It enumerated several things to try when you have problems burning Raspian onto a SD chip.
I worked through the suggestions there, one by one.
None worked.

After an hour of messing around, I found another way to resolve the problem and successfully created a bootable Stretch SD.

I made the effort to add my findings to the ones listed in that old post to help fellow Pi users.

It is usually recommended specifically not to use Raspbian to do such SD programming, you must use Windows or Linux. Pi's are too slow.

I think by removing that post, you are doing a disservice to Pi users who are having problems creating bootable SD's.

And I do not think it was hijacking. The OP listed N things to try. I made it N+1.

I find your comments quite discouraging.

And I do not understand what you are trying to achieve by removing my post.

It is only of interest to Pi users.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4478
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Error writing file: 5 access is denied

Sat Mar 03, 2018 4:14 pm

robinndi wrote:
Sat Mar 03, 2018 2:32 pm
...
It is usually recommended specifically not to use Raspbian to do such SD programming, you must use Windows or Linux. Pi's are too slow.
...
OOC, where & when? Raspbian, since the Jessie release, has included the "SD card copier" software (aka rpiclone) which, effectively, performs an equivalent process. Works well on all current "full-size" Pi's. Some time ago I tested writing a fresh Jessie image on a P3B w/o issues: http://www.cpmspectrepi.uk/raspberry_pi ... lPi3B.html using the standard Linux tools.
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 19600
Joined: Sat Jul 30, 2011 7:41 pm

Re: Error writing file: 5 access is denied

Sat Mar 03, 2018 4:55 pm

robinndi wrote:
Sat Mar 03, 2018 2:32 pm
because it fits the title is not a good enough reason!
If you search Google for 'Raspbian 5 Access is denied', you end up with that post.

I know it was an old post, and although old, it is still current. It enumerated several things to try when you have problems burning Raspian onto a SD chip.
I worked through the suggestions there, one by one.
None worked.

After an hour of messing around, I found another way to resolve the problem and successfully created a bootable Stretch SD.

I made the effort to add my findings to the ones listed in that old post to help fellow Pi users.

It is usually recommended specifically not to use Raspbian to do such SD programming, you must use Windows or Linux. Pi's are too slow.

I think by removing that post, you are doing a disservice to Pi users who are having problems creating bootable SD's.

And I do not think it was hijacking. The OP listed N things to try. I made it N+1.

I find your comments quite discouraging.

And I do not understand what you are trying to achieve by removing my post.

It is only of interest to Pi users.
Problem with your post is that is is very unclear what you are talking about. The title is obscure, the content obscure. Even after reading it again, I have no idea what the problem you have now solved was!!

If you can clarify exactly what problem you encountered, and how you fixed it, that would probably make it much clearer.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

klricks
Posts: 5486
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Error writing file: 5 access is denied

Sat Mar 03, 2018 5:06 pm

I had to read your post several times to figure out what you were trying to do. Since most of your post talks about troubles with Windows booting and BIOS etc ... it was easy to dismiss it as totally unrelated. You never said what you did which produced the error....

It is always better to read and follow the current documentation rather than a 6 year old thread full of wrong (even then) and obsolete information.

- Do not use native Windows format or disk portioning tools and ignore any Windows warnings about unformatted media. Use the recommended format utility: https://www.sdcard.org/downloads/formatter_4/index.html
Formatting is only required when using the NOOBs method of imaging.

- The recommended SD image writing software is Etcher. Unlike Win32diskimager, with Etcher unzipping the image is not required.
With Etcher and Win32diskimager, formatting the SD card is not needed.... Just a waste of time and needless wear and tear on the SD card.

Download the standalone image (not NOOBs)
Start Etcher and select the image location and write image
Done
Unless specified otherwise my response is based on the latest and fully updated Raspbian Stretch w/ Desktop OS.

Heater
Posts: 9247
Joined: Tue Jul 17, 2012 3:02 pm

Re: Error writing file: 5 access is denied

Sat Mar 03, 2018 6:13 pm

robinndi,
It is usually recommended specifically not to use Raspbian to do such SD programming, you must use Windows or Linux. Pi's are too slow.
No. Where is such silly advice given? (No don't tell me, the internet)

Any Pi, since the original, can format SD cards and other media just fine. Just like any other common computer.

Sure it may not be as fast as your PC or Mac but it works fine, and fast enough. Probably faster than the 100MHz Intel 486 I was doing such things with last century.

If any such wrong headed posts have been deleted that is probably a good thing. Saves others from being misguided.

robinndi
Posts: 19
Joined: Wed Jan 29, 2014 3:56 pm

Re: Error writing file: 5 access is denied

Sat Mar 03, 2018 10:58 pm

Reading my post which was a response to a post, I can see it is hard to understand standalone as here. The OP had established some context.

So here is a bit:

I needed to burn Stretch onto a SD.
I don't have a USB SD reader-writer so I was using the one in the side of my W10 display
I don't have any headfull Pis . I use W10, Putty & WinSCP to talk to my Pis. They get hung on a nail somewhere.
And I like my Desktop, fast, 12-core, Tb of storage, 4K display, reliable Internet and on a desk with a comfortable chair.
Your guide here https://www.raspberrypi.org/learning/so ... uickstart/ appears to be using PC dialogs too as I see F:.
So I don't think my setup is that far out.

I was using Win32DiskImager to burn. On first burn it was uneventful.
When I tried to overwrite and burn a fresh copy, Win32DiskImager appeared to write a small amount and then popped a dialog '5 Access is denied'.
Yes, I used the Internet to help. I googled 'Raspberry 5 Access is denied' and got some suggestions on how to proceed.
None of the suggestions helped, but one came very close. He said reboot W10. But that did not help either.
Eventually, I power cycled by W10 machine which is a more thorough boot than soft boot. After Win32DiskImager successfully burned Stretch.

Yes and I was sloppy saying Pi's are too slow. As I recall, the ref said to use a machine with a SSD or fast large hard disk. None of my Pi's have such hardware. Effectively headless, they just have the minimal resources for the job and get loaded with some executable developed and tested on W10. I don't think there would be room for 2 x Stretch on a 8Gb SD. I note your example uses a PC.

I did not try Etcher, I thought it was Linux-only. I thought wrong. But Win32DiskImager is about as simple as you get too, a dialog with two fields, source file and destination device & click go. Yes, I had to unzip too. The slower part for me was checking the SHA256. I had dig to find that W10 has it built in. Perhaps Etcher does that too.

I suspect that exactly the same error is possible with Etcher as with Win32DiskImager as the error was not really coming from Win32DiskImager but from the PC POST and where reboot did not fix it. PC's have a lot of device stuff in the POST.

I think that is worth remembering.

Return to “Off topic discussion”

Who is online

Users browsing this forum: No registered users and 7 guests