11 Replies Latest reply on Aug 9, 2019 3:15 AM by clem57

    Pi Desktop - Strange Behavior on First Reboot

    sjmarty

      I have a 3B+ and the Pi Desktop case.

       

      After installing the application package, I shutdown the Pi and then upon powering it back up, it starts to do a disk check.  I've ran through these steps several times with a fresh Raspbian image each time and without fail, I always get this disk check when powering back up for the first time after installing the package.  I've tried both the "official" v1.1.0 and the "unofficial" v1.1.7 packages and get the same results.

       

      Is this expected behavior?

        • Re: Pi Desktop - Strange Behavior on First Reboot
          John Beetem

          Here's the usual cause:

           

          Before you power down, be sure you use a shutdown command either from the command line or the GUI.  If you just turn power off, buffered file updates won't be written to Flash and/or disk and the file system will be corrupted.

          1 of 1 people found this helpful
          • Re: Pi Desktop - Strange Behavior on First Reboot
            colporteur

            G'Day,

            It is not an anomaly I have seen in my travels through installs. On average I do an install once a week. Last week I did the install four times on different versions of SD cards and Pi's and never once did I get the routine to check disk.

             

            What process are you using to load the SD card?

            What Raspian O/S version are you using?

            Just a thought, follow the O/S install process on a different SD card.

             

            Sean

            • Re: Pi Desktop - Strange Behavior on First Reboot
              jomoenginer

              Please post what commands you are using to install the packages and what you are running or doing to shutdown the Pi?

               

              Also, have a look at the output of 'dmesg' to see if there are any messages that would give an indication of an issue.

                • Re: Pi Desktop - Strange Behavior on First Reboot
                  sjmarty

                  Before installing the desktop application package, reboots and/or shutdowns do not trigger the disk check.  This only happens the first reboot after I install the Pi desktop package.

                   

                  I am installing the package with the command...

                   

                  sudo dpkg -i pidesktop-base.deb

                   

                  I have performed the shutdown via the GUI (Pi | Shutodown | Shutdown) and via the command line with...

                   

                  sudo shutdown and/or sudo reboot

                   

                  Any means of shutting down after installing the package result in the disk check.

                   

                  I think I may have found what's causing the disk check but I don't know why it's happening...

                   

                  When the Pi boots up the first time after installing the desktop package, the date appears to have been reset to 2016-11-03 @ 13:16:43 EDT.  This is from the system log after the first reboot...

                   

                  Nov 03 13:19:28 raspberrypi systemd[1]: Started Show Plymouth Boot Screen.

                  Nov 03 13:19:28 raspberrypi systemd[1]: Started Forward Password Requests to Plymouth Directory Watch.

                  Nov 03 13:19:28 raspberrypi systemd[1]: Reached target Paths.

                  .

                  .

                  Nov 03 13:19:28 raspberrypi kernel: bcm2835_alsa bcm2835_alsa: card created with 8 channels

                  Nov 03 13:19:28 raspberrypi systemd-timesyncd[241]: System clock time unset or jumped backwards, restoring from recorded timestamp: Thu 2019-02-28 19:10:11 EST

                  Feb 28 19:10:11 raspberrypi systemd[1]: Time has been changed

                  Feb 28 19:10:11 raspberrypi systemd[1]: Started Network Time Synchronization.

                  Feb 28 19:10:11 raspberrypi systemd[1]: Reached target System Time Synchronized.

                  Feb 28 19:10:11 raspberrypi systemd[1]: Startup finished in 3.727s (kernel) + 2min 46.642s (userspace) = 2min 50.369s.

                  Feb 28 19:10:12 raspberrypi kernel: brcmfmac: F1 signature read @0x18000000=0x15264345

                  .

                  .

                  Feb 28 19:10:12 raspberrypi systemd[1]: Started Load/Save RF Kill Switch Status.

                  Feb 28 19:10:12 raspberrypi kernel: input: Logitech K400 Plus as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.2/0003:046D:C52B.0003/0003:046D:404D.0004/input/input0

                  Feb 28 19:10:12 raspberrypi kernel: logitech-hidpp-device 0003:046D:404D.0004: input,hidraw1: USB HID v1.11 Keyboard [Logitech K400 Plus] on usb-3f980000.usb-1.1.3:1

                  Feb 28 19:10:12 raspberrypi systemd[1]: Starting File System Check on /dev/disk/by-partuuid/9e2ad8bb-01...

                  Feb 28 19:10:12 raspberrypi systemd-udevd[274]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.

                  Feb 28 19:10:12 raspberrypi systemd-fsck[328]: fsck.fat 4.1 (2017-01-24)

                  Feb 28 19:10:12 raspberrypi systemd-fsck[328]: /dev/sda1: 181 files, 44776/88440 clusters

                  Feb 28 19:10:12 raspberrypi systemd[1]: Started File System Check on /dev/disk/by-partuuid/9e2ad8bb-01.

                  Feb 28 19:10:12 raspberrypi systemd[1]: Mounting /boot...

                  Feb 28 19:10:12 raspberrypi systemd[1]: Mounted /boot.

                  Feb 28 19:13:27 raspberrypi systemd[1]: Time has been changed

                  Feb 28 19:13:27 raspberrypi systemd-udevd[260]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.

                  Feb 28 19:13:30 raspberrypi kernel: logitech-hidpp-device 0003:046D:404D.0004: HID++ 4.1 device connected.

                  Feb 28 19:13:30 raspberrypi systemd[1]: Listening on Syslog Socket.

                   

                  Any clue why installing this package would reset the system clock and is this causing the disk check?

                    • Re: Pi Desktop - Strange Behavior on First Reboot
                      colporteur

                      G'Day,

                      I am willing to run your scenario if I can get a few more details.

                       

                      What is the name of the Raspbian base operating system you starting with?

                      Confirm if you complete a software update/upgrade before attempting this install?

                      I can then run you pkg install and see if the problem exists.

                       

                      Sean

                      1 of 1 people found this helpful
                      • Re: Pi Desktop - Strange Behavior on First Reboot
                        jomoenginer

                        I see the same thing with a Raspberry Pi A+ running the latest Raspbian image:

                         cat /etc/os-release 
                        PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
                        NAME="Raspbian GNU/Linux"
                        VERSION_ID="9"
                        VERSION="9 (stretch)"
                        ID=raspbian
                        ID_LIKE=debian
                        HOME_URL="http://www.raspbian.org/"
                        SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
                        BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
                        
                        

                         

                        Message in /var/log/syslog during power on.

                        Mar  1 08:24:01 jomoaplus systemd[1]: Found device /dev/disk/by-partuuid/03b8a6fc-01.
                        Mar  1 08:24:01 jomoaplus systemd[1]: Starting File System Check on /dev/disk/by-partuuid/03b8a6fc-01...
                        Mar  1 08:24:01 jomoaplus systemd-fsck[210]: fsck.fat 4.1 (2017-01-24)
                        Mar  1 08:24:01 jomoaplus systemd-fsck[210]: /dev/mmcblk0p1: 183 files, 44781/88440 clusters
                        Mar  1 08:24:01 jomoaplus systemd[1]: Started File System Check on /dev/disk/by-partuuid/03b8a6fc-01.
                        Mar  1 08:24:01 jomoaplus systemd[1]: Mounting /boot...
                        Mar  1 08:24:01 jomoaplus systemd[1]: Mounted /boot.
                        
                        

                         

                        This is what is seen if I reboot after a few minutes

                        Mar  1 08:49:29 jomoaplus systemd[1]: Found device /dev/disk/by-partuuid/03b8a6fc-01.
                        Mar  1 08:49:29 jomoaplus systemd[1]: Starting File System Check on /dev/disk/by-partuuid/03b8a6fc-01...
                        Mar  1 08:49:29 jomoaplus mtp-probe: checking bus 1, device 2: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1"
                        Mar  1 08:49:29 jomoaplus mtp-probe: bus: 1, device: 2 was not an MTP device
                        Mar  1 08:49:29 jomoaplus systemd[1]: Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
                        Mar  1 08:49:29 jomoaplus systemd-fsck[198]: fsck.fat 4.1 (2017-01-24)
                        Mar  1 08:49:29 jomoaplus systemd-fsck[198]: /dev/mmcblk0p1: 183 files, 44781/88440 clusters
                        Mar  1 08:49:29 jomoaplus systemd[1]: Started File System Check on /dev/disk/by-partuuid/03b8a6fc-01.
                        Mar  1 08:49:29 jomoaplus systemd[1]: Mounting /boot...
                        Mar  1 08:49:29 jomoaplus systemd[1]: Mounted /boot.
                        Mar  1 08:49:29 jomoaplus systemd[1]: Reached target Local File Systems.
                        

                         

                         

                        Something seems to be causing this to be triggered although it does not seem to find an issue.  It might be just that the the filesystem was just checked for any issues and a full fsck was not performed.

                        Perhaps it is from the setting in /boot/cmdline.txt.

                        dmesg |grep fsck
                        [    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=1360 bcm2708_fb.fbheight=768 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 root=PARTUUID=03b8a6fc-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash
                        [    2.225162] systemd[1]: Listening on fsck to fsckd communication Socket
                        

                         

                         cat /boot/cmdline.txt |grep fsck
                         dwc_otg.lpm_enable=0 root=PARTUUID=03b8a6fc-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash
                        pi@jomoaplus:~ $ 
                        
                        
                        • Re: Pi Desktop - Strange Behavior on First Reboot
                          clem57

                          I believe the way around this is to check if the NTP service is being invoked at startup. Since the Pi does not have a RTC, it uses NTP instead. If you do not have internet the service cannot get a time off the internet.

                           

                          Clem