Skip to content

Conversation

@ihatetoregister
Copy link
Contributor

Clarify boot directory and add a warning about newline and file extension

## Setting up wireless networking

You will need to define a `wpa_supplicant.conf` file for your particular wireless network. Put this file in the boot folder, and when the Pi first boots, it will copy that file into the correct location in the Linux root file system and use those settings to start up wireless networking.
You will need to define a `wpa_supplicant.conf` file for your particular wireless network. Put this file in the `/boot` folder, and when the Pi first boots, it will copy that file into the correct location in the Linux root file system and use those settings to start up wireless networking. Depending on the OS and editor you are creating this on, the file could have incorrect newlines or the wrong file extension so make sure you use an editor that accounts for this.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably useful to clarify what the "correct newlines setting" should be? (i.e. Unix line-ending)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bit about file extensions got me wondering about whether Raspberry Pi OS would handle the case where the user had unwittingly created the file as wpa_supplicant.conf.txt, due to Windows hiding the file extension. It seems it does not.

For the ssh file, which may be added to the boot filesystem to enable SSH, it also checks if ssh.txt exists and enables SSH if that file exists too. There's no reason why the wpa_supplicant.conf copy service cannot do the same thing for the wpa_supplicant copy. I shall create a PR to do just that. In the meantime, you can remove the reference to the file extension from this PR. (If my PR gets rejected I wil submit a new PR to make the required addition to this part of the documentation).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that would be much better. I actually had this issue but on Mac, but I still think it is worth a heads up even if the Pi would be kind to correct it. Hope your PR gets through.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that would be much better. I actually had this issue but on Mac, but I still think it is worth a heads up even if the Pi would be kind to correct it. Hope your PR gets through.

How does macOS handle the file extension?

Copy link
Contributor Author

@ihatetoregister ihatetoregister Sep 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like Windows it seems, I modified the file with the built in Texteditor and it appended .txt, and having 'show all extensions' off in the OS hides this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like Windows it seems, I modified the file with the built in Texteditor and it append .txt, and having 'show all extensions' off in the OS hides this.

Good, so RPi-Distro/raspberrypi-net-mods#4 would fix that case as well.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While researching dos2unix, I discovered that OSX uses Unix line endings, so that's not a problem for Mac users. (I'm assuming nobody is still using an older version of macOS). Which is handy since, while dos2unix can convert mac to unix, it can't auto-detect whether the file is DOS or Mac. I'm going to add to RPi-Distro/raspberrypi-net-mods#4 so it adds line break conversion usign dos2unix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is more of a Windows issue.

@burtyb
Copy link

burtyb commented Sep 19, 2020

I'm not sure what calling it "/boot" over "boot" achieves other than adding to the confusion as it won't be "/boot" on the system you're doing the copy on.

@ghost
Copy link

ghost commented Sep 19, 2020

I'm not sure what calling it "/boot" over "boot" achieves other than adding to the confusion as it won't be "/boot" on the system you're doing the copy on.

Good point. It should be called just boot on this page.

@ghost
Copy link

ghost commented Sep 19, 2020

Strange that this page doesn't mention the ssh{,.txt} file. I suspect we have another page somewhere that does. I shall have a nosey.

@lurch
Copy link
Contributor

lurch commented Sep 19, 2020

Strange that this page doesn't mention the ssh{,.txt} file. I suspect we have another page somewhere that does.

https://github.com/raspberrypi/documentation/blob/master/configuration/boot_folder.md and https://github.com/raspberrypi/documentation/blob/master/remote-access/ssh/README.md

@JamesH65 JamesH65 merged commit 875309d into raspberrypi:master Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants