RPI2 - Failed to start LSB

Hi
I use a raspberry pi 2 with a 3TB HDD USB.
After RPI installed the software, the reboot (DietPi-Boot) does not work because of

[FAILED] Failed to start LSB: Autogenerate and use a swap file.
See ‘systemctl status dphys-swapfile.service’ for details

I also tried two different SD and PSU but always the same issue

Can you help me?
Thanks
Happy new year

Francesco

Hi Francesco,

Please try recreating the swapfile:

/DietPi/dietpi/func/dietpi-set_dphys-swapfile 100 /var/swap

Then reboot system.

If problems persist after reboot, we’ll need some more information to try and debug this.
Please paste results of:

systemctl status dphys-swapfile.service -l
systemctl status dietpi-boot -l

Happy new year to you too :smiley:

Hi Fourdee

thanks for your quick reply

Using a terminal (Putty), I recreated the swapfile as well as you suggest and it works!!

Is it a bug that you can fix in the next rev?

Thanks again

Francesco

Hello, didn’t want to create another thread for this. I tried the first solution

/DietPi/dietpi/func/dietpi-set_dphys-swapfile 100 /var/swap

but it didn’t work I guess, I waited for even up to 10 mins and it didn’t do anything.

Then I tried the second solution, here are the results:

systemctl status dphys-swapfile.service -l



dphys-swapfile.service - LSB: Autogenerate and use a swap file
Loaded: loaded (/etc/init.d/dphys-swapfile)
Active: failed (Result: timeout) since Tue 2017-01-03 16:52:58 UTC; 2min 22s ago
Process: 436 ExecStart=/etc/init.d/dphys-swapfile start (code=killed, signal=TERM)

Jan 03 16:38:27 DietPi dphys-swapfile[436]: Starting dphys-swapfile swapfile setup …
Jan 03 16:52:58 DietPi systemd[1]: dphys-swapfile.service start operation timed out. Terminating.
Jan 03 16:52:58 DietPi systemd[1]: Failed to start LSB: Autogenerate and use a swap file.
Jan 03 16:52:58 DietPi systemd[1]: Unit dphys-swapfile.service entered failed state.


systemctl status dietpi-boot -l



● dietpi-boot.service - DietPi-Boot
Loaded: loaded (/etc/systemd/system/dietpi-boot.service; enabled)
Active: activating (start) since Tue 2017-01-03 16:38:28 UTC; 18min ago
Main PID: 494 (boot)
CGroup: /system.slice/dietpi-boot.service
├─494 /bin/bash /DietPi/dietpi/boot
├─501 /bin/bash /DietPi/dietpi/dietpi-obtain_hw_model
├─502 /bin/bash /DietPi/dietpi/dietpi-obtain_hw_model
├─503 df
├─504 grep -m1 /$
└─505 awk {print $1}

Jan 03 16:38:28 DietPi ntpd[500]: ntpd 4.2.6p5@1.2349-o Mon Jul 25 22:35:28 UTC 2016 (1)
Jan 03 16:38:28 DietPi ntpd[500]: logging to file /var/log/ntpd.log

Please help? :smiley:

Just wondering if the swapfile is located on a external drive that doesn’t exist anymore, that may cause the hang during the move of swapfile.

We can check this, please paste results of the follow command:

cat /etc/dphys-swapfile

We should also check if your using a USB drive, and its working correctly, again please paste results:

cat /etc/fstab | grep usb
df -h
readlink -f /mnt/dietpi_userdata

I was creating the swap file on an external HDD that was plugged in the Pi. I decided to create it on the SD card and it worked. I followed the BitTorrent + Kodi tutorial, but it doesn’t boot directly into Kodi, but in Console. How should I proceed to have it boot into Kodi, then also install RetroPie and have it as an option inside Kodi?

PS: I don’t think this should be asked here, but when I asked Kodi to search for TV Shows within my external HDD, it only showed a couple of them, not all.

Hi
I don’t know if I have to open another tread because I have similar issues of dndwanted about kodi boot on my RPI.

I installed ProFTP, Torrent, Kodi and MiniDLNA.
I find following issues:

  1. If I configure DietPi to auto start Kodi, during the installation process on the first run, everything works fine but Kodi does not run automatically after reboot and I have to use startkodi by ssh.
  2. If I manually configure dietpi-launcher to Autostart Kodi (1) or console Automatic Login (7), after the installation routine has finished, both auto start do not work and I find the following:
    MiniDlna: ok
    Trasmission: stop working because of “Error: Unable to save resume file: No space left on device”. This message appears in Transmission Web Interface.
    Kodi: when I manually try to run startkodi, Kodi does not start because of

"
Could not init logging classes. Permission errors on "/.kodi (/root/.kodi/temp)
ERROR: Unable to create application. Existing
Could not init logging classes. Permission errors on "/.kodi (/root/.kodi/temp)
ERROR: Unable to create application. Existing
Could not init logging classes. Permission errors on "/.kodi (/root/.kodi/temp)
ERROR: Unable to create application. Existing
/usr/bin/kodi --standalone has exited uncleanly 3 times in the last 2 seconds.
Something is probabily wrong
"

Any suggestion?
Thanks

Francesco