3 noob questions Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
forevergreen
Posts: 20
Joined: Tue Feb 02, 2021 9:01 am

3 noob questions

Post by forevergreen »

Hello everyone. I changed from RP OS to DietPi . I have 3 questions.

1-Where is the setting to enable DietPi system to auto update itself?

2-When I setup my raspberry pi, I used to login via ssh by using pi@(ip address) . Now on DietPi there is "root@.." or "dietpi@..", which one should I use to login? and how can i change it to create like the old one "pi" ?

3-On RP OS when I login I had a home directory that I can create files in and I can list it by using the "ls" command. When I type "ls" on DietPi nothing happens!? Is there a home directory for the user?
User avatar
trendy
Posts: 292
Joined: Tue Feb 25, 2020 2:54 pm

Re: 3 noob questions

Post by trendy »

Hello there,
1. I am not aware of any automatic update, which would not be a very good idea anyway. Upon login you are getting a notification if there are available updates and how to upgrade.
2. For unprivileged user, login with dietpi. Use sudo when you need to do something with elevated privileges. You can create a new user with `adduser` command
3. Sure there is, /home/dietpi , but it is empty by default, hence `ls` doesn't return anything. Try with ls -la to see the hidden files as well.
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: 3 noob questions

Post by Joulinar »

Hi,

just to avoid a misunderstanding right from the beginning. DietPi is not an own OS, it's a set of scripts on top of a base image. In your case, base image is Raspberry OS. Means you are running an extrem slim/diet version of Raspberry OS with some scripting on top. Thinks are working on native Raspberry OS, should work nearly same on DietPi.

Back to your question:

There are basically 2 parts to keep your system updated. Parameters can be found at /boot/dietpi.txt
  1. apt package updated
    with DietPi v6.34.3 we introduced a feature to automatically check and update apt packages. This will update all packages that are installed/manged by apt. By default, availability of apt updates will be checked only and user get a notification on login screen.

    Code: Select all

    # Daily check for APT package updates: 0=disable | 1=check only | 2=check and upgrade automatically
    # - Upgrade logs can be found at: /var/tmp/dietpi/logs/dietpi-update_apt.log
    CONFIG_CHECK_APT_UPDATES=1
  2. DietPi scrip updated
    By default, DietPi will check once a day for the availability of DietPi script updates and user get a notification on login screen.

    Code: Select all

    # Daily check for DietPi updates: 0=disable | 1=enable
    # - Checks are done by downloading a file of only 7 bytes.
    CONFIG_CHECK_DIETPI_UPDATES=1
rest was perfectly explained by @trendy already
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
trendy
Posts: 292
Joined: Tue Feb 25, 2020 2:54 pm

Re: 3 noob questions

Post by trendy »

Thanks for the clarification of the automatic updates @Joulinar !
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: 3 noob questions

Post by Joulinar »

basically it's the DietPi version of unattended-upgrades but more lightweight. It will looks like this on login screen. Next to the DietPi version, you will have the information about apt packages updates being available

Code: Select all

─────────────────────────────────────────────────────
 DietPi v6.34.3 : 13 APT updates available
 ─────────────────────────────────────────────────────
 - Device model : RPi 4 Model B (armv7l)
 - Uptime : up 1 week, 6 days, 14 hours, 39 minutes
 - CPU temp : 39'C : 102'F (Cool runnings)
 - LAN IP : 192.168.0.11 (eth0)
 - Info Text : !!! PRODUCTION SYSTEM !!!
 ─────────────────────────────────────────────────────
using apt list --upgradable will display packages being available
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
trendy
Posts: 292
Joined: Tue Feb 25, 2020 2:54 pm

Re: 3 noob questions

Post by trendy »

I have seen the message informing me about the new packages available, I didn't know that it can be configured to automatically update them too. :)
forevergreen
Posts: 20
Joined: Tue Feb 02, 2021 9:01 am

Re: 3 noob questions

Post by forevergreen »

@trendy, thanks very much that was helpful
Joulinar wrote: Tue Feb 02, 2021 10:21 am Hi,

just to avoid a misunderstanding right from the beginning. DietPi is not an own OS, it's a set of scripts on top of a base image. In your case, base image is Raspberry OS. Means you are running an extrem slim/diet version of Raspberry OS with some scripting on top. Thinks are working on native Raspberry OS, should work nearly same on DietPi.

Back to your question:

There are basically 2 parts to keep your system updated. Parameters can be found at /boot/dietpi.txt
  1. apt package updated
    with DietPi v6.34.3 we introduced a feature to automatically check and update apt packages. This will update all packages that are installed/manged by apt. By default, availability of apt updates will be checked only and user get a notification on login screen.

    Code: Select all

    # Daily check for APT package updates: 0=disable | 1=check only | 2=check and upgrade automatically
    # - Upgrade logs can be found at: /var/tmp/dietpi/logs/dietpi-update_apt.log
    CONFIG_CHECK_APT_UPDATES=1
  2. DietPi scrip updated
    By default, DietPi will check once a day for the availability of DietPi script updates and user get a notification on login screen.

    Code: Select all

    # Daily check for DietPi updates: 0=disable | 1=enable
    # - Checks are done by downloading a file of only 7 bytes.
    CONFIG_CHECK_DIETPI_UPDATES=1
rest was perfectly explained by @trendy already
so is it automatically updating everything now? I want it to auto update on its own without me managing it.
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: 3 noob questions

Post by Joulinar »

as explained above, there are 2 areas that would need to be updated. First one would be apt packages. This one could set to have it automatically updated. The other one would be DietPi scripts. For this, a user interaction would be needed to start the update process.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
forevergreen
Posts: 20
Joined: Tue Feb 02, 2021 9:01 am

Re: 3 noob questions

Post by forevergreen »

is it possible to implement a feature that auto updates everything. I kind of want it to manage itself without me interfering with it.
thanks for your time
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: 3 noob questions

Post by Joulinar »

back in time, there was a decision by the original developer not to implement automatic updates for DietPi scripts. viewtopic.php?p=7107#p7107

I don't think this opinion changed. But we can ask current developer @MichaIng
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply