Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Junior Member
    Join Date
    Aug 2018
    Posts
    19
    Hi,

    One unexpected thing: I thought that the wget would save the hdparm on the disk. However, after reboot, I could not directly use the hdparm command. I had to redownload it.

    How does this happens ? Is there a way to make the existence of the hdparm command "resilient to reboot" ?

    JMF

  2. #12
    Senior Member
    Join Date
    Jan 2010
    Location
    Hertfordshire
    Posts
    6,246
    Quote Originally Posted by JMF11 View Post
    Hi,

    One unexpected thing: I thought that the wget would save the hdparm on the disk. However, after reboot, I could not directly use the hdparm command. I had to redownload it.

    How does this happens ? Is there a way to make the existence of the hdparm command "resilient to reboot" ?

    JMF
    I think this is discussed in the posts directly before your first post.

    Sent from my SM-G900F using Tapatalk

  3. #13
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    2,178
    hi JMF11,

    Arh... you have discovered one of the main features of TinyCore/piCore. It is RAM based.

    When you boot piCorePlayer, effectively a brand new Linux system is built from downloaded extensions stored on your SD card. This gives us a very reliable system, fast and it hardly uses the SD card after it is booted. This is great for static content.

    For dynamic content, such as configuration files, the backup feature is used to store all the config files on the SD card and are restored after the system has rebooted. Your home directory and sub directories are part of the backup system.

    So if you put the file in your home directory and do a backup it will be restored.

    The simple way to do a backup is through the [Main Page] on web interface or if you have ssh in, $pcp bu

    https://www.picoreplayer.org/how_to_..._via_ssh.shtml
    https://www.picoreplayer.org/pcp_cli.shtml

    BTW: Once a program gets added to an extension all this is invisible to the user.

    regards
    Greg

  4. #14
    Junior Member
    Join Date
    Aug 2018
    Posts
    19
    Thanks Greg,

    Clear now :-)

    JMF

  5. #15
    Junior Member
    Join Date
    Feb 2019
    Posts
    1

    script

    Quote Originally Posted by paul- View Post
    The easiest way right is to make a little script, then call that script via the User Commands at the bottom of the tweaks page.

    I noticed you referenced /dev/sdb. If you have more than one USB drive, it may change drive letters at the next reboot.
    Hello everyone.

    I managed to let the HDD, a Seagate Expansion Portable 2TB, spindown with the hdpram commands entered via ssh. So far so good, unfortunately my linux skills are not good enough to write that "little script". So I just got errors as result. Is there anyone out there, who knows how to write it properly?

    Best regards

    Dirk

  6. #16
    Member
    Join Date
    Sep 2018
    Location
    France
    Posts
    73
    Hello,

    I reactivate this old subject ...

    It's been a long time since I tried, unsuccessfully, to put my external hard drive (Western Digital My Passport Ultra 2TB) to sleep when I was not working on my Raspberry Pi with piCorePlayer. (The hdparm command does not work with my hard disk and the setting made with the Western Digital Windows utility is ignored when the disk is plugged into the Raspberry Pi.)

    Today, little personal victory with hd-idle, tool that I could not install until now. I am not Linux expert!

    In case other people are interested, this is how I proceeded:

    • I downloaded a .deb at https://sourceforge.net/p/hd-idle/fe...1.05_armhf.deb
    • In this .deb, I recovered with 7zip the binary hd-idle in \data.tar\.\usr\sbin\
    • I copied hd-idle in /home/tc
    • I executed the command: chmod 755 /home/tc/hd-idle
    • I made a backup: pcp bu
    • I added a user command in the piCorePlayer interface ("Tweaks" tab, "User commands" section) to have the hard drive go to sleep after 20 minutes of inactivity: /home/tc/hd-idle -i 0 -a sda -i 1200


    It all seems to be working since last night. Hope this continues ...

    More information here:


    Maybe this is an opportunity for improvement for the future version of piCorePlayers with a dedicated section for hd-idle and/or hdparm?

  7. #17
    Member Bas Horneman's Avatar
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    70
    Thanks a lot Franck. I just followed your plan. And it works like a charm!!!
    Life moves pretty fast. If you don't stop and look around once in a while, you could miss it. - Ferris Bueller

  8. #18
    Member
    Join Date
    Sep 2018
    Location
    France
    Posts
    73
    Quote Originally Posted by Bas Horneman View Post
    Thanks a lot Franck. I just followed your plan. And it works like a charm!!!
    Thanks for this info. Glad to hear that my post helped someone.

  9. #19
    Junior Member
    Join Date
    Jan 2021
    Posts
    2

    Works! Thanks!

    Thanks for these tips! I never would have thought to dig into the .deb file for the binary. That did the trick.

  10. #20
    Junior Member
    Join Date
    Jan 2021
    Posts
    2

    More info re: Franck

    Additional info that might help people in the future here:

    • If you can use hdparm instead, then you should. It's simpler.
    • On piCore linux, ssh to your piCorePlayer and type tce. This means 'tiny core extension'. Search for hdparm and you can install it from there. There's one made specifically for piCore linux.
    • See the htpcguides.com link (earlier in this thread) for more info on getting that rolling.


    My HDD didn't support hdparm, so here was my hd-idle process.
    • ssh into your piCorePlayer.
    • you can download the .deb file directly to your pCP using wget. Just type wget [space] [URL to .deb file from Franck's post]
    • .deb files are compressed using ar. Use: ar -xv hd-idle_1.05_armhf.deb
    • You now have a .tar.xz file to be further decompressed using: xz -d data.tar.xz
    • Finally, you have data.tar. Decompress this using: tar x -v -f data.tar
    • Now you can copy the binary to your home directory: cp /home/tc/usr/sbin/hd-idle /home/tc/
    • The rest of the steps below are the same. Don't forget the backup step, or none of this will persist on reboot.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •