Hi,
I am trying to add a user for SSH in my bitbake layers, but I can’t succeed.
The rootfs built on my host machine contains in “/home/” the following :
However, after flashing my fx30 with “swiflash”, there is no “/home/sshuser”.
How could I make it work ?
Best regards,
Sami
jyijyi
April 8, 2024, 10:14am
2
didn’t you can make it work here?
I tried adding “-m” to my “useradd” command, and it looks like it was the missing part. I am a bit surprised, as “/home/sshuser” was present in the built rootfs.tar.bz on my host machine, but it works.
As always, thank you for the quick replies @jyijyi !
I now have a question about disabling factory reset by default. Should I create a new topic ?
Thank you again,
Sami
I thought so, but it seems like I didn’t manage to properly clean the FX30 and the “/home/sshuser” that I had manually created was still there.
When I am first doing a “swiflash -m fx30_catm -r” to clean the FX30, and then flash it with the image built, the “home/sshuser” directory is not present.
jyijyi
April 8, 2024, 12:18pm
4
Does this help to create folder in fs?
Or you can modify init script startlegato to add your command
Legato Linux distribution (Yocto project)
I just tried on WP76 R9, I found that modifying mount_early is not working. Instead I modify /etc/init.d/startlegato.sh, and I can add my command there. case “$1” in start) echo “Legato start sequence 123” echo 123 > /tmp/123.txt You...
Thanks for the quick replies.
I managed to do the example you gave in the other topic and to create a “/test” directory.
However, if I try to install “/home/test”, only “/home/root” is present.
Because of the date shown for “/home/root”, I will try removing “/home” from “fstab” file in “meta-swi-mdm9xxxx/recipes-core/base-files/basefiles” and I will let you know.
Best regards,
Sami
Well, no difference.
I will try adding files in “/home/root” to see if they are still present after flashing the FX30.
The added files are not present once the image is flashed.
jyijyi
April 8, 2024, 5:13pm
8
On my side, if i add some files in /home/root, after flashing yocto.cwe, the files remain there
Btw, you can modify init script startlegato to add your command
Legato Linux distribution (Yocto project)
I just tried on WP76 R9, I found that modifying mount_early is not working. Instead I modify /etc/init.d/startlegato.sh, and I can add my command there. case “$1” in start) echo “Legato start sequence 123” echo 123 > /tmp/123.txt You...
Could you please tell me how you added files to “/home/root” ? I just want to see if I am doing something wrong.
Thank you again.
jyijyi
April 9, 2024, 10:18am
10
i used scp to push file to /home/root
actually the /home/root is in userapp partition, i am not sure if you can add file to it in your yocto.cwe
That is why i suggest to modify initscript startlegato.sh
Ok, thank you for your answer.
Do you know where we could find a list of the different partitions ?
I think that in my case, one of the solution would be to create the home directory of my new user at the following path : “/usr/home/sshuser”
I’ll try to make it work and I will let you know.
jyijyi
April 9, 2024, 12:58pm
12
You can use this command to see the mtd partition
do you mean this?
root@swi-mdm9x28-wp:~# more /proc/mtd
dev: size erasesize name
mtd0: 00280000 00040000 “sbl”
mtd1: 00280000 00040000 “mibib”
mtd2: 00680000 00040000 “backup”
mtd3: 00100000 00040000 “security”
mtd4: 00200000 00040000 “persist”
mtd5: 01180000 00040000 “efs2”
mtd6: 05040000 00040000 “swifota”
mtd7: 00100000 00040000 “tz”
mtd8: 00080000 00040000 “rpm”
mtd9: 02080000 00040000 “modem”
mtd10: 00100000 00040000 “aboot”
mtd11: 00f00000 00040000 “boot”
mtd12: 01e000…