LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 05-19-2017, 08:16 AM   #1
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Rep: Reputation: 70
Bare-bones O/S for Raspberry Pi hardware maintenance


Hi all,

I have been using a Pi successfully in an embedded application for the last 4 years and the time is about right to replace the cell in the hardware clock module I've been using with it. The clock has reverted to 1st Jan 2000 so I need to reset it following the battery replacement. Can anyone suggest a suitable image I can download and burn to a 1 or 2Gb SD card which will boot-up and give me access to the hwclock function I need for this purpose? I only need a terminal to work with, not a fancy GUI, so the smaller the image the better, so long as it boots and recognises hwclock.
TIA.
 
Old 05-19-2017, 08:25 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I use Arch on my pi3. What's a GUI ???.
The basic download should do for you.
 
1 members found this post helpful.
Old 05-19-2017, 09:02 AM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
I tend to take a raspbian image, and use it to create a debian armel image (armv4 since armhf is v7+, and I have a B model / armv6) with debootstrap. Although I use the raspbian /boot/ and kernel. It'll take two cards and a reader. But with debootstrap you can have a min system with < 300MB of usage.

You can also use the debootstrap method to install a minimal raspbian, or ubuntu, or pretty much any .deb based distro with the "script" for it.

$ apt-file list debootstrap | grep -i ^debootstrap | grep -i share

Although the last time I did it for raspbian I needed to do some $(ln -s) trickery to make it work. But I like debootstrap installs as you only have what you use, and the latest version of it once the process is done, so no need to do an immediate update equal to or greater than the girth of the install image. Plus if your intent is to run testing or sid, you can go straight to it. Without the full system, then upgrade bandwidth waste. Plus write wear on the media.
 
Old 05-19-2017, 09:19 AM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Although to set the time you could just use date to manually set time. Or ntpdate to sync it with a server one off / adhoc style.

$ date +%s

(to get the current epoch date)

$ sudo date -d @1495203001 +%s

To set the date to that epoch date, the numbers are what epoch was on my system when I did the first one. Plus other ways to set date based on UTC format or other options.

$ sudo ntpdate pool.ntp.org

You might have to do that more than once if latency or packet loss is high. Or the ntp server is under load. Plus it requires an internet connection.
 
Old 05-19-2017, 06:55 PM   #5
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Original Poster
Rep: Reputation: 70
Wink

Quote:
Originally Posted by Shadow_7 View Post
Although to set the time you could just use date to manually set time. Or ntpdate to sync it with a server one off / adhoc style.

$ date +%s

(to get the current epoch date)

$ sudo date -d @1495203001 +%s

To set the date to that epoch date, the numbers are what epoch was on my system when I did the first one. Plus other ways to set date based on UTC format or other options.

$ sudo ntpdate pool.ntp.org

You might have to do that more than once if latency or packet loss is high. Or the ntp server is under load. Plus it requires an internet connection.
Er, yeeesssss. Thanks for all the suggestions, but it all seems like a *lot* of work just to set a clock! I'm going to roll with the Arch idea on this one.
 
Old 05-19-2017, 07:54 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,708

Rep: Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898
So the Pi is running a standalone embedded application but no operating system?

Although you can install one of many distributions I suggest Raspian Jessie lite which is 1.3GB. You will still need to run several commands to actually set the clock.

1. Load the RTC module and possibly run other commands dependent on the actual hardware.
2. Set the system date/time using one of the methods above.
3. Sync the RTC clock to the system clock using the hwclock command.

https://www.raspberrypi.org/downloads/raspbian/

Last edited by michaelk; 05-19-2017 at 08:10 PM.
 
Old 05-19-2017, 10:41 PM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Quote:
Originally Posted by Completely Clueless View Post
Er, yeeesssss. Thanks for all the suggestions, but it all seems like a *lot* of work just to set a clock! I'm going to roll with the Arch idea on this one.
Well if the thing has an internet connection.

$ sudo apt-get install ntp

A bit less effort than installing "Arch".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Bare bones Raspberry Pi PC gets ready to launch LXer Syndicated Linux News 0 12-25-2011 04:20 PM
Compiling a bare bones kernel galapogos Linux - Laptop and Netbook 3 07-18-2008 02:42 AM
Compiling a bare bones kernel galapogos Linux - Kernel 4 07-18-2008 01:02 AM
What do I lose for a bare bones install? mhelliwell Linux - General 3 02-27-2005 07:14 PM
Bare-Bones Install barddzen Linux - Newbie 1 12-16-2002 10:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration