New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
advanced options not working on windows 10 #171
Comments
What image were you writing? And did you actually check on the Pi the sshd process was not running? If instead of putting the SD card in the Pi, you put it back in your computer immediately after writing, did it create a file called firstrun.sh on the FAT partition? And if not, is there any difference depending on whether you check the "eject media when finished" box? |
Thanks for the respond! The image is the original Rasberry Pi OS (32-BIT) Release date 2021-01-11 I have just checked and used another sd-card, did everything exactly as before and it did not create a file called firstrun.sh. |
OK. I look in this problem a little further and it seems that imager has a problem with big sd-cards and usb drives. I tried a 16 GB sd-card and with that card imager produced the wanted firstrun.sh file. The first sd-cards i was using were 32 and 128 Gb. next i tried a external 250Gb usb drive but no succes. No firstrun.sh file. |
Checking it does not make a difference? Your drive does keep the same drive letter before and after imaging? |
eject media box check or uncheck does not make any difference My drive letter stays the same. For now it is not a big deal because i dont wrtite OS to sd-cards on a daily base. But hey, setting those options makes the proces of installing OS more handy for me because turning on ssh by default does mean you can install the OS withoud the need of connecting a screen to the RPI. You can setup a RPI completly by remote connection via ssh |
It did was tested on a 64 GB Samsung SD card and 32 GB Toshiba, so size itself should not be a problem. Newer USB drives do may be a problem if they speak UASP protocol instead of the standard USB mass storage protocol. Which is different to your case of the changes we write to disk being lost. |
I have similar problems. I'm getting an "unable to write firstrun.sh" error. I'd include a screenshot but ++X conflicts with Snagit 2021 so I had to disable it. ;) The error occurred with a 32GB SD card but not with 16GB USB stick. |
That's mean that Windows did indicate the FAT partition has been assigned a drive letter (otherwise you get "Operating system did not mount FAT32 partition" instead), but opening the file for writing still failed. After receiving the error, you do am able to see the files on the FAT partition in explorer without having to replug the card or do anything special? |
I can see the FAT32 partition but of course no firstrun.sh file. On my machine it is E: as I have 2 partitions on my HDD (don't ask). But it is also E: for the USB stick. |
Ok. Waits up to 3 seconds checking if config.txt exists on the drive letter before proceeding to write the changes. |
Works as expected. Tested with 32GB SD card from create through boot cycle on Pi 4. Thanks. |
- Check if config.txt exists on drive letter before proceeding to write changes. Wait up to 3 seconds if not. - Force drive letter assignment for portable SSDs and other devices that pretend to be a fixed drive. (Windows only auto-assigns drive letters for removable media). Ref #171
Good to hear. @TeeSee64 can you also give the beta a try? |
@maxnet Thank you !! |
Hi @maxnet, I had the same issue like @CharlesGodwin. Also tried the 1.7beta, but unfortunately it doesn't work for me. Only the error message changed due to your changes. It now displays "Unable to customize. File 'I:\/config.txt' does not exist.". |
Hmm, think we had reports about drive letters not being released, and a new drive letter being assigned to the drive before. Or was the card never available at I: before? Imager does assume the first volume that Windows tells us is associated with the drive is the FAT partition we are after. If you start "diskpart" from a command prompt, and type "list volumes", does it show both I: and J: there? |
Don't think so.
The card, which has already been imaged, displays "Mounted as I:\,J:\"(translated, using German version).
No, it only shows J:\ there. But in explorer it shows both, I:\ and J:\.
That seems to be the problem. |
@maxnet Just a idea... |
We outsource wiping the partition table at start of Imaging to Microsoft's diskpart utility, in the hope that knows how to get every Microsoft service to stop using the drive, and release all locks/drive letters properly. |
Search all mountpoints associated with the target drive for FAT partition that has config.txt Ref: #171
Can you try if this one works better? Should search all mountpoints associated with drive for config.txt instead of just first one. |
@maxnet Even if the auto-mounted drive-letter changes before and after writing the image, I assume the physical disk number won't change? So maybe you could use some of the WMI stuff to correlate drive-letters before and after flashing the image? 🤷 Alternatively, I guess you could use the raw drive size, as it's probably unlikely the user will have two drives with the same exact raw size connected? (and that also won't change before/after flashing) |
We already fetch the list of volumes belonging to that physical drive number after imaging. However in the case of CRGer two volumes are returned (I: and J:) as belonging to that physical drive. |
It may end up a game of wack a mole. maybe code in a dialog box "Which drive is it, please" when all else fails. |
Ahh, I misunderstood, apologies for the noise! 😉 |
Tried it and it works as expected. "firstrun.sh" was created an my FAT partition with all selected configurations. Good work @maxnet, thank you! |
I'm seeing this issue on ubuntu trying to write Raspberry PI OS Lite, it appears like it doesn't wait long enough for the boot partition to mount, before trying to write the firstrun.sh to the partition. Is there a build with a longer delay for ubuntu? Also rather than some arbitrary 3 second wait, what about just testing if you can access the partition in a loop for say 60 seconds before erroring or something? |
Does this one work better? rpi-imager-ubuntu-20210324.zip
For reference: it takes 0.008 second before the FAT partition is mounted on my Ubuntu computer. |
BTW did you use the .deb from the Raspberry Pi website previously, or the snap provided by canonical? As someone else is mentioning the problem only occurs on the snap: https://www.raspberrypi.org/forums/viewtopic.php?f=63&p=1842486 |
why is the Ubuntu rpi-imager being discussed in an issue titled advanced options not working on windows 10 no one will find it |
That's more of a problem with the title, than that it are different problems. Problem in both cases is the same. This should NOT happen on normal Linux systems. |
I guess the issue could be renamed to "advanced options not writing settings to SD card", but it doesn't seem worth it if @maxnet already has a potential fix in hand? 🙂 |
I suspect the issue is already fixed. |
Fixed in 1.6.1 |
I wanted to use the advanced options and enable ssh by default. But after writing the sd-card ssh was not enabled.. So i tried other options and they also did not work.
Iam using imager version v1.6 on a windows 10 computer.
The text was updated successfully, but these errors were encountered: