[Solved] problems!!

Having issues with your DietPi installation, or, found a bug? Post it here.
Kymru
Posts: 30
Joined: Wed Jan 25, 2017 6:40 pm

[Solved] problems!!

Post by Kymru »

last update, i updated my C2 first and my C1 a few minutes later, something happened during my C1 update, think my (next? i really should read through it before posting next time) internet went down or something, took longer than expected, eventually it finished and asked me to reboot, at the time i didnt really take any notice, but after i rebooted instead getting the time, dietpi version and my IP address, i got this

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@DPiC1:


wasnt til i tried to see what temp my C1 was running at (its a bit warm in the UK at the moment) that i noticed the command cpu wasnt working

root@DPiC1:~# cpu
-bash: cpu: command not found


root@DPiC1:~# dietpi-config
-bash: dietpi-config: command not found


root@DPiC1:~# dietpi-software
-bash: dietpi-software: command not found


i can update and upgrade fine, but so far i cant get cpu working or dietpi-update, dietpi-config doesnt work either

so my question is, is it a start fresh with a new system or is there a fix?

thanks
Last edited by Kymru on Thu Jul 05, 2018 11:53 pm, edited 1 time in total.
jato1569
Posts: 3
Joined: Wed Jul 04, 2018 6:16 am

Re: problems!!

Post by jato1569 »

I am having the same identical problem on two different devices.
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: problems!!

Post by MichaIng »

@jato1569 @Kymru
Hmm, most likely dietpi-ramdisk.service did not load successfully.

Please post output of the following:

Code: Select all

systemctl status dietpi-ramdisk
cat /var/tmp/dietpi/logs/dietpi-ramdisk.log
ls -al /DietPi
If ramdisk was loaded and DietPi files are in place as expected, then the login script must have been failed, which loads the login banner and dietpi-* command aliases:

Code: Select all

cat /etc/bash.bashrc
ls -al /etc/bashrc.d
cat /etc/bashrc.d/dietpi-login.sh
Also try to manually source it:

Code: Select all

. /etc/bashrc.d/dietpi-login.sh
Kymru
Posts: 30
Joined: Wed Jan 25, 2017 6:40 pm

Re: problems!!

Post by Kymru »

Code: Select all

systemctl status dietpi-ramdisk
root@DPiC1:~# systemctl status dietpi-ramdisk
â— dietpi-ramdisk.service - DietPi-RAMdisk
Loaded: loaded (/etc/systemd/system/dietpi-ramdisk.service; enabled)
Active: active (exited) since Fri 2018-07-06 16:10:38 BST; 1min 19s ago
Process: 710 ExecStart=/bin/bash -c /boot/dietpi/dietpi-ramdisk 0 &>> /var/tmp/dietpi/logs/dietpi-ramdisk.log (code=exited, status=0/SUCCESS)
Process: 684 ExecStartPre=/bin/mkdir -p /var/tmp/dietpi/logs (code=exited, status=0/SUCCESS)

Jul 06 16:10:38 DPiC1 systemd[1]: Started DietPi-RAMdisk.

Code: Select all

cut /var/tmp/dietpi/logs/dietpi-ramdisk.log
root@DPiC1:~# cut /var/tmp/dietpi/logs/dietpi-ramdisk.log
cut: you must specify a list of bytes, characters, or fields
Try 'cut --help' for more information.

Code: Select all

ls -al /DietPi
root@DPiC1:~# ls -al /DietPi
total 28
drwxrwxrwt 3 root root 140 Jul 6 16:10 .
drwxr-xr-x 21 root root 4096 Jan 18 20:07 ..
-rwxr-xr-x 1 root root 1822 Jul 6 16:10 boot.ini
-rwxr-xr-x 1 root root 2066 Jul 6 16:10 config.txt
drwxr-xr-x 5 root root 920 Jul 6 16:10 dietpi
-rwxr-xr-x 1 root root 10232 Jul 6 16:10 dietpi.txt
-rwxr-xr-x 1 root root 2 Jul 6 16:10 .ramdisk
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: problems!!

Post by MichaIng »

@Kymru
Whoospie, the command is cat, not cut, sorry, I corrected it above.

But okay the output of shows that ramdisk was loaded successfully. Could you paste the results of the other suggested commands and try to source dietpi-login.sh manually?

Code: Select all

. /etc/bashrc.d/dietpi-login.sh
Kymru
Posts: 30
Joined: Wed Jan 25, 2017 6:40 pm

Re: problems!!

Post by Kymru »

oh ok, some better results now

Code: Select all

root@DPiC1:~# cat /var/tmp/dietpi/logs/dietpi-ramdisk.log
Thu 18 Jan 20:07:04 GMT 2018 | DietPi-Ramdisk: Starting
Thu 18 Jan 20:07:04 GMT 2018 | DietPi-Ramdisk: Completed
Fri 11 May 13:40:37 BST 2018 | DietPi-Ramdisk: Stopping
Fri 11 May 13:40:37 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 13:40:40 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 13:40:40 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 13:43:32 BST 2018 | DietPi-Ramdisk: Stopping
Fri 11 May 13:43:33 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 13:43:42 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 13:43:42 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 13:57:32 BST 2018 | DietPi-Ramdisk: Stopping
Fri 11 May 13:57:33 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 13:57:35 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 13:57:35 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 13:57:35 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 13:57:35 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 13:57:35 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 13:57:35 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 13:57:35 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 13:57:35 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 14:31:14 BST 2018 | DietPi-Ramdisk: Stopping
Fri 11 May 14:31:14 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 14:31:17 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 14:31:17 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 14:54:17 BST 2018 | DietPi-Ramdisk: Stopping
Fri 11 May 14:54:17 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 14:54:20 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 14:54:20 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 15:41:19 BST 2018 | DietPi-Ramdisk: Stopping
Fri 11 May 15:41:19 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 15:41:23 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 15:41:23 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 15:43:54 BST 2018 | DietPi-Ramdisk: Stopping
Fri 11 May 15:43:54 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 15:43:58 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 15:43:59 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 22:01:12 BST 2018 | DietPi-Ramdisk: Stopping
Fri 11 May 22:01:12 BST 2018 | DietPi-Ramdisk: Completed
Fri 11 May 22:01:17 BST 2018 | DietPi-Ramdisk: Starting
Fri 11 May 22:01:17 BST 2018 | DietPi-Ramdisk: Completed
Sun 13 May 16:17:04 BST 2018 | DietPi-Ramdisk: Starting
Sun 13 May 16:17:04 BST 2018 | DietPi-Ramdisk: Completed
Mon 14 May 01:49:42 BST 2018 | DietPi-Ramdisk: Stopping
Mon 14 May 01:49:42 BST 2018 | DietPi-Ramdisk: Completed
Mon 14 May 01:49:44 BST 2018 | DietPi-Ramdisk: Starting
Mon 14 May 01:49:45 BST 2018 | DietPi-Ramdisk: Completed
Mon 14 May 02:11:08 BST 2018 | DietPi-Ramdisk: Stopping
Mon 14 May 02:11:09 BST 2018 | DietPi-Ramdisk: Completed
Mon 14 May 02:11:11 BST 2018 | DietPi-Ramdisk: Starting
Mon 14 May 02:11:12 BST 2018 | DietPi-Ramdisk: Completed
Mon 14 May 02:16:09 BST 2018 | DietPi-Ramdisk: Stopping
Mon 14 May 02:16:10 BST 2018 | DietPi-Ramdisk: Completed
Mon 14 May 02:16:35 BST 2018 | DietPi-Ramdisk: Starting
Mon 14 May 02:16:36 BST 2018 | DietPi-Ramdisk: Completed
Mon 14 May 02:29:04 BST 2018 | DietPi-Ramdisk: Stopping
Mon 14 May 02:29:04 BST 2018 | DietPi-Ramdisk: Completed
Mon 14 May 02:29:12 BST 2018 | DietPi-Ramdisk: Starting
Mon 14 May 02:29:13 BST 2018 | DietPi-Ramdisk: Completed
Tue 15 May 19:39:39 BST 2018 | DietPi-Ramdisk: Stopping
Tue 15 May 19:39:40 BST 2018 | DietPi-Ramdisk: Completed
Tue 15 May 19:39:47 BST 2018 | DietPi-Ramdisk: Starting
Tue 15 May 19:39:48 BST 2018 | DietPi-Ramdisk: Completed
Tue 15 May 19:53:09 BST 2018 | DietPi-Ramdisk: Stopping
Tue 15 May 19:53:09 BST 2018 | DietPi-Ramdisk: Completed
Tue 15 May 19:53:17 BST 2018 | DietPi-Ramdisk: Starting
Tue 15 May 19:53:18 BST 2018 | DietPi-Ramdisk: Completed
Tue 15 May 19:57:01 BST 2018 | DietPi-Ramdisk: Stopping
Tue 15 May 19:57:02 BST 2018 | DietPi-Ramdisk: Completed
Tue 15 May 19:57:10 BST 2018 | DietPi-Ramdisk: Starting
Tue 15 May 19:57:10 BST 2018 | DietPi-Ramdisk: Completed
Thu 31 May 20:30:39 BST 2018 | DietPi-Ramdisk: Stopping
Thu 31 May 20:30:40 BST 2018 | DietPi-Ramdisk: Completed
Thu 31 May 20:30:47 BST 2018 | DietPi-Ramdisk: Starting
Thu 31 May 20:30:48 BST 2018 | DietPi-Ramdisk: Completed
Tue 19 Jun 11:53:38 BST 2018 | DietPi-Ramdisk: Stopping
Tue 19 Jun 11:53:38 BST 2018 | DietPi-Ramdisk: Completed
Tue 19 Jun 11:53:45 BST 2018 | DietPi-Ramdisk: Starting
Tue 19 Jun 11:53:46 BST 2018 | DietPi-Ramdisk: Completed
Tue 19 Jun 12:48:32 BST 2018 | DietPi-Ramdisk: Stopping
Tue 19 Jun 12:48:33 BST 2018 | DietPi-Ramdisk: Completed
Tue 19 Jun 12:48:40 BST 2018 | DietPi-Ramdisk: Starting
Tue 19 Jun 12:48:41 BST 2018 | DietPi-Ramdisk: Completed
Tue 19 Jun 22:24:25 BST 2018 | DietPi-Ramdisk: Stopping
Tue 19 Jun 22:24:26 BST 2018 | DietPi-Ramdisk: Completed
Tue 19 Jun 22:24:42 BST 2018 | DietPi-Ramdisk: Starting
Tue 19 Jun 22:24:42 BST 2018 | DietPi-Ramdisk: Completed
Sun 24 Jun 04:23:57 BST 2018 | DietPi-Ramdisk: Stopping
Sun 24 Jun 04:23:58 BST 2018 | DietPi-Ramdisk: Completed
Sun 24 Jun 04:24:05 BST 2018 | DietPi-Ramdisk: Starting
Sun 24 Jun 04:24:06 BST 2018 | DietPi-Ramdisk: Completed
Wed 27 Jun 11:17:07 BST 2018 | DietPi-Ramdisk: Starting
Wed 27 Jun 11:17:08 BST 2018 | DietPi-Ramdisk: Completed
Wed 27 Jun 16:58:38 BST 2018 | DietPi-Ramdisk: Stopping
Wed 27 Jun 16:58:38 BST 2018 | DietPi-Ramdisk: Completed
Wed 27 Jun 16:58:47 BST 2018 | DietPi-Ramdisk: Starting
Wed 27 Jun 16:58:47 BST 2018 | DietPi-Ramdisk: Completed
Fri  6 Jul 16:10:29 BST 2018 | DietPi-Ramdisk: Stopping
Fri  6 Jul 16:10:30 BST 2018 | DietPi-Ramdisk: Completed
Fri  6 Jul 16:10:37 BST 2018 | DietPi-Ramdisk: Starting
Fri  6 Jul 16:10:38 BST 2018 | DietPi-Ramdisk: Completed
Sun  8 Jul 18:36:12 BST 2018 | DietPi-Ramdisk: Stopping
Sun  8 Jul 18:36:13 BST 2018 | DietPi-Ramdisk: Completed
Sun  8 Jul 18:36:20 BST 2018 | DietPi-Ramdisk: Starting
Sun  8 Jul 18:36:21 BST 2018 | DietPi-Ramdisk: Completed
Tue 10 Jul 00:21:03 BST 2018 | DietPi-Ramdisk: Stopping
Tue 10 Jul 00:21:03 BST 2018 | DietPi-Ramdisk: Completed
Tue 10 Jul 00:21:11 BST 2018 | DietPi-Ramdisk: Starting
Tue 10 Jul 00:21:12 BST 2018 | DietPi-Ramdisk: Completed
Tue 10 Jul 00:21:11 BST 2018 | DietPi-Ramdisk: Starting
Tue 10 Jul 00:21:12 BST 2018 | DietPi-Ramdisk: Completed

Code: Select all

root@DPiC1:~# cat /etc/bash.bashrc
# System-wide .bashrc file for interactive bash(1) shells.

# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
# If this is an xterm set the title to user@host:dir
#case "$TERM" in
#xterm*|rxvt*)
#    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
#    ;;
#*)
#    ;;
#esac

# enable bash completion in interactive shells
#if ! shopt -oq posix; then
#  if [ -f /usr/share/bash-completion/bash_completion ]; then
#    . /usr/share/bash-completion/bash_completion
#  elif [ -f /etc/bash_completion ]; then
#    . /etc/bash_completion
#  fi
#fi

# if the command-not-found package is installed, use it
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
        function command_not_found_handle {
                # check because c-n-f could've been removed in the meantime
                if [ -x /usr/lib/command-not-found ]; then
                   /usr/lib/command-not-found -- "$1"
                   return $?
                elif [ -x /usr/share/command-not-found/command-not-found ]; then
                   /usr/share/command-not-found/command-not-found -- "$1"
                   return $?
                else
                   printf "%s: command not found\n" "$1" >&2
                   return 127
                fi
        }
fi
export $(cat /etc/default/locale | grep LANG=)
for i in /etc/bashrc.d/*.sh; do [ -r "$i" ] && . $i; done

Code: Select all

root@DPiC1:~# ls -al /etc/bashrc.d
total 8
drwxr-xr-x  2 root root 4096 Jun 19 11:53 .
drwxr-xr-x 75 root root 4096 Jun 26 21:30 ..
lrwxrwxrwx  1 root root   33 Jun 19 11:53 dietpi-bash_completion.sh -> /etc/profile.d/bash_completion.sh

Code: Select all

root@DPiC1:~# cat /etc/bashrc.d/dietpi-login.sh
cat: /etc/bashrc.d/dietpi-login.sh: No such file or directory

Code: Select all

root@DPiC1:~# . /etc/bashrc.d/dietpi-login.sh
-bash: /etc/bashrc.d/dietpi-login.sh: No such file or directory
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: problems!!

Post by MichaIng »

Hmm, there are files missing within /etc/bashrc.d, most importantly the DietPi login script to allow dietpi-* commands.

Ramdisk on the other hand seems to work fine. Please do the following:

Code: Select all

wget https://github.com/Fourdee/DietPi/archive/master.zip -O /tmp/update.zip
unzip /tmp/update.zip
rm update.zip
cp -Rf /tmp/DietPi-master/rootfs/. /
sync
rm -R /tmp/DietPi-master
chmod -R +x /DietPi /etc/cron.*/dietpi /var/lib/dietpi/services
systemctl daemon-reload
This should recover DietPi global scripts and commands.

Logout and login again to load those to new terminal session. Then run dietpi-update -1 to run update, including the last update that seemed to fail (-1).

After update is finished, hopefully successful without connectivity loss ;) please apply an important patch that solves an issue with current v6.11:

Code: Select all

wget https://raw.githubusercontent.com/Fourdee/DietPi/0f18aa4dc0af8ab910a0173dce8849d5b53c30b0/dietpi/func/dietpi-globals -O /DietPi/dietpi/func/dietpi-globals
Reference: https://github.com/Fourdee/DietPi/issues/1923

Then reboot :).
Kymru
Posts: 30
Joined: Wed Jan 25, 2017 6:40 pm

Re: problems!!

Post by Kymru »

@MichaIng thank you, that worked a treat, back to normal and updated
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: problems!!

Post by MichaIng »

@Kymru
Great, thanks for feedback :)!
MichaelTew
Posts: 13
Joined: Mon Jun 04, 2018 2:21 am
Location: Virgin Islands
Contact:

Solved problems

Post by MichaelTew »

Good to hear it worked out well You can DEFINITELY tell that theres no PWM on the TCC clutch now, cant you?

Mike
Post Reply