Read the statement by Michael Teeuw here.
i need help w pi imager and ssh, headless, user error
-
i am away from my home office, i have my mac mini and a pi 5, but left the hdmi/micro hdmi adapter at home
i need to test my install script on pi5
use the pi imager, flash sd card w user and enable ssh, use password not key
the pi boots, i can connect to the ssh server but cannot logon
password not valid.i have tried ssh from mac, ubuntu vm, and windows vm
all fail the samein general i have not tried this headless as i have a monitor dedicated to this at home
i also tried with a new rsa key, that fails too
another interesting fact, the pi will not connect to wifi, altho the router is physically next to the pi… my mac, and phone are connected without problems,
the router provider has an app, and you can see NO devices attached (really helpful!!)
another interesting fact, if I open the settings in the imager to flash another
the password fields (user and wifi) are filled with junk text, maybe encrypted… but the values I entered are not visible -
another interesting fact, if I open the settings in the imager to flash another
the password fields (user and wifi) are filled with junk text, maybe encrypted… but the values I entered are not visiblethats normal
which version of pi imager are you using? Latest which is v1.9.0?
And you are using the right user + passwd (I often forget to set the correct user)?
The pi imager writes a file
user-data
into the root dir of the sd-card which has yaml content, you can check the content (e.g. user) and also try to overridepasswd
, maybe it works unencrypted, otherwise you can try to encrypt withhtpasswd
.wifi has own file
network-.con
(yaml too). -
@karsten13 I get imager 1.8.5 on mac, ubuntu, and windows, clicking the link on the images page for the tool
same userid/password I always use for sbc systems to test…
same wifi and password too…there is junk in the files… nothing I can understand…
I am not a system setup guy.
mac cannot access the rootfs partition, only the bootfs
can’t get the sd card attached to the ubuntu VM… gr… -
@karsten13 I can get to the partitions from my chromebook…
there is no user-data, there is a script firstrun.sh which is linked to the cmdline.txt
systemd.run=/boot/firstrun.sh systemd.run_success_action=reboot
but it has not created the user I defined… only pi is in /home
so my guess is the firstrun.sh didn’t
and it never rebootson the sd card, firstrun.sh and cmdline.txt are the only two changed files,
yesterday at noon, which is when the last flash finished -
files should be in same directory as
config.txt
andcmdline.txt
. Maybe the OS deletes them after initial reading? So you may have to look for this files before you insert the sd-card into the pi …example of
user-data
:[mm@pi4-argon efi]$ cat user-data #cloud-config hostname: pi4-argon manage_etc_hosts: true packages: - avahi-daemon apt: conf: | Acquire { Check-Date "false"; }; users: - name: mm groups: users,adm,dialout,audio,netdev,video,plugdev,cdrom,games,input,gpio,spi,i2c,render,sudo shell: /bin/bash lock_passwd: false passwd: $5$wEw... ssh_authorized_keys: - ssh-rsa AAAA... sudo: ALL=(ALL) NOPASSWD:ALL timezone: Europe/Berlin keyboard: model: pc105 layout: "de"
example of
network-.con
:[mm@pi4-argon efi]$ cat network-.con version: 2 wifis: renderer: networkd wlan0: dhcp4: true optional: true access-points: "k13": password: "cbd..."
-
@karsten13 nope, right after flash, those files are not there.
the firstrun and cmdline.txt have todays date, I am showing hidden files (if any) -
well then…
turns out the pi5 I picked to bring with me has the nvme hat on, and boots to the nvme drive, NOT the sd card…doah!!..
after some thinking, I found the right user/pw combo…
never mind…
BUT that explains why the sd card wasn’t used!!
-
and I learned more about pi imager, the stuff it writes seems to depend on the OS, with my examples above I used fedora, now looking at a raspian pi os lite I don’t see the files.
There now is a
userconf.txt
with only user/password … -
@karsten13 I don’t see that at all on bookworm full
-
@sdetweil said
I am not a system setup guy.
Dear Sam,
you may aware of this - than please ignore it…You’ve described that you have put a SD card in your NVME-HAT’ed Pi and your Pi has not booted from SD but from NVME…
You can steer this with the BOOT_ORDER entry in eeprom configuration.
This code is read right to left to determine the boot order and should (in your case) be: 0xf461:1 = Check SD card
6 = Check PCIe NVME
4 = Check USB drive
f = Start againYou can check this:
sudo rpi-eeprom-config
If boot order is not as desired you can edit this with
sudo -E rpi-eeprom-config --edit enter or modify to: BOOT_ORDER=0xf461
(In my configuration this opens the nano editor in which ctrl-O writes the changes to disk and ctrl-X leaves the editor.
eeprom-config then modifies the system and a reboot is neccessary)With this configuration you will lose a tiny bit of time for the SD-card check but it enables you to insert a SD card and boot from there despite the NVME is connected as well.
Regards,
Ralf