Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 21 Aug 2014, 14:09
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
alphaOS [closed]
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 32 of 47 [697 Posts]   Goto page: Previous 1, 2, 3, ..., 30, 31, 32, 33, 34, ..., 45, 46, 47 Next
Author Message
mcewanw

Joined: 16 Aug 2007
Posts: 2296
Location: New Zealand

PostPosted: Sat 01 Jun 2013, 01:32    Post subject: Re: hwclock issue  

http://www.murga-linux.com/puppy/viewtopic.php?p=699663#699663
ndrancs wrote:
hi all,
i try to set the system time.
The following are some steps that I have done:
- Add a few lines of words in /etc/init.d/hwclock


The manual page for hwclock (/sbin/hwclock) advises:

Quote:

The System Time is the time that matters. The Hardware Clock's basic purpose in a Linux system is to keep time when Linux is not running. You initialize the System Time to the time from the Hardware Clock when Linux starts up, and then never use the Hardware Clock again.


As ndrancs has discovered the provided alphaOS defaults result in automatically altering the computer's Hardware Clock at shutdown since /etc/init.d/hwclock automatically executes /sbin/hwclock stop at that time. That is fine (and good) if the system clock has been correctly set up prior to shutdown, but I understand that that doesn't happen in alphaOS unless set up to do so via, as mentioned by simargl, an appropriate rdate command whilst connected to the Internet, which is problematic.

Standard Puppies, such as Puppy Slacko automatically initialise the system clock at boot time to the hardware clock in script rc.country, which is called by /etc/rc.d/rc.sysinit during boot. Something similar can be done in alphaOS as follows:

First, near the top of /etc/rc.d/rc.sysinit I have the following change to that which alphaOS provides by default:

Code:

# Modified for alphaOS: http://sourceforge.net/projects/alphaos

. /etc/init.d/hwclock start    # In alphaOS this line was originally . /etc/rc.conf


(Please note the space between the dot and the /etc... above)

Second, I changed /etc/init.d/hwclock to the following:

Code:

#!/bin/sh
#
# Written for alphaOS: http://sourceforge.net/projects/alphaos
# Author: archpup@gmail.com
#
# Distributed under the Creative Commons Attribution ShareAlike 3.0 Unported License.
# http://creativecommons.org/licenses/by-sa/3.0/

. /etc/rc.conf

case $HARDWARECLOCK in
   UTC) HWCLOCK_PARAMS="--utc";;
   localtime) HWCLOCK_PARAMS="--localtime";;
   *) HWCLOCK_PARAMS="";;
esac

case "$1" in
   start)
      hwclock --hctosys $HWCLOCK_PARAMS  # This initialises system clock
      ;;
   stop)
#      hwclock --adjust $HWCLOCK_PARAMS
      hwclock --systohc $HWCLOCK_PARAMS
      ;;
esac


And third, since I am currently living in New Zealand, I also changed the symbolic link /etc/localtime:

Code:

ln -s /usr/share/zoneinfo/Pacific/Auckland /etc/localtime


The computer hardware clock is no longer messed up with the above arrangement.

EDIT: I have commented out the hwclock --adjust line for the moment, because something still seems to be amiss and I suspect that... Will fix once I have time but currently busy eating ... :-)
EDIT2: Nope. Something remains faulty with the above. The rc.sysinit line for /etc/init.d/hwclock start doesn't seem to be doing the job (the line /etc/init.d/hwclock does indeed work if entered manually in a console later per ndrancs original post). Not sure what the problem is and run out of time this evening to look into this further sorry.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Last edited by mcewanw on Sun 02 Jun 2013, 22:39; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
simargl

Joined: 11 Feb 2013
Posts: 572

PostPosted: Sat 01 Jun 2013, 02:08    Post subject:  

Kurttt wrote:
But with the minimal system...how can i save puppy 2fs??What should I install??


Something like this for 200MB save file, or is it actually save partition
Code:
dd if=/dev/zero of=/mnt/home/alphasave.2fs bs=1k count=200000
mke2fs -q -m 0 -F /mnt/home/alphasave.2fs
Back to top
View user's profile Send private message Visit poster's website 
simargl

Joined: 11 Feb 2013
Posts: 572

PostPosted: Sat 01 Jun 2013, 02:15    Post subject:  

mcewanw, thanks I will make that as default. But is it too late if this clock setup runs latter on boot with all other daemons from /etc/rc.conf (alsa, cups...) but first of them, that seems like... cleaner. sfs_load is currently only service file called directly from /etc/rc.d/rc.sysinit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2296
Location: New Zealand

PostPosted: Sat 01 Jun 2013, 04:48    Post subject:  

simargl wrote:
mcewanw, thanks I will make that as default. But is it too late if this clock setup runs latter on boot with all other daemons from /etc/rc.conf (alsa, cups...) but first of them, that seems like... cleaner. sfs_load is currently only service file called directly from /etc/rc.d/rc.sysinit.


I'm not sure if it is too late to exec hwclock script after the daemons are loaded. Unfortunately, as I later discovered and commented, the alteration I suggested above doesn't seem to be working afterall... I'm a bit mystified at the moment, but will look at it again sometime.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2296
Location: New Zealand

PostPosted: Sat 01 Jun 2013, 18:10    Post subject:  

simargl wrote:
I also noticed that ntfs partition is mounted read-only with command mount, and edited two scripts: one used for mounting by spacefm and second makepfile.sh for making save file to use command ntfs-3g if filesystem type is ntfs.

I have alphaOS files on /dev/sda6 that is ext4 partition, and if I click on ntfs partition in spacefm, now it is mounted read write. If alpha os is frugally installed on ntfs partition and on boot mounts it read- only then init script needs fixing, I didn't test that.


My alphaOS and save file are on an ntfs partition and I am certainly having trouble with the save file not reliably saving on shutdown. I've been trying to modify rc.sysinit to get hwclock --hctosys working to my satisfaction but I'm finding that if I try modifying rc.sysinit more than a couple of times it doesn't save the newer changes - it does save at first, but not thereafter! Very strange since clearly writes are working very briefly to ntfs... I haven't looked into why and thought my machine had a hardware fault or something, since it did months ago, or alternatively I wondered if this old machine didn't like the newish kernel - all is working fine in my other installed Puppy Slacko.

EDIT: As for the hwclock matter, I can't get it to work directly via rc.sysinit. Putting the line

Code:

/etc/init.d/hwclock start

to start of /root/.start instead seemed to work, though as I say above I am having trouble testing things because of my ntfs pupsave problem. I preferred system clock to be set as early as possible so preferred doing so in rc.sysinit if possible, though maybe later is better.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
ndrancs


Joined: 02 Apr 2013
Posts: 40

PostPosted: Sat 01 Jun 2013, 20:20    Post subject: hwclock issue continue  

Hi mcewanw
I've checked the rc.sysinit script from the root-fs of fatdog64, and hwclock is on the line nearly the top. before busybox mount command.
Code:
############ minimum necessary setup #################
# set system clock
hwclock --hctosys --localtime
# mount devpts, /tmp and /dev/shm and swap (if any)
[ ! -L /etc/mtab ] && { rm -rf /etc/mtab; ln -s /proc/mounts /etc/mtab; }
busybox mount -a    # as configured in /etc/fstab
busybox swapon -a   # as configured in /etc/fstab


please try it that way. do not forget to remove hwclock on DAEMON rc.conf. and try to save all the changes to alpha_70.sfs. You just have to unsquashfs and mksquashfs alpha_70.sfs. but do it in the linux partition, can be ext2-4 or other.
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2296
Location: New Zealand

PostPosted: Sun 02 Jun 2013, 00:17    Post subject:  

@ndrancs: The issue isn't getting hwclock --hctosys --localtime to work; that is straightforward enough. Rather, like yourself, I was trying to find the most convenient way to modify the scripts already provided by default in alphaOS. I do not have any hwclock daemon in my rc.conf (I think that is how you were trying to do things earlier). What I haven't found out yet is why the line I tried in rc.sysinit didn't work. Any good alternative will do though. Like I said, putting /etc/init.d/hwclock start at the beginning of the default /root/.start seems to do the job fine (assuming a case start - hwclock line is added to /init.d/hwclock script as in your original attempt).

As far as my pupsave on ntfs partition issue is concerned, I could of course avoid that and use an ext... partition or even loop mounted file with an ext... filesystem written to it. However, I want things to work correctly on ntfs with small changes like this in my pupsave, for the moment, until simargl releases a future version with his preferred official additions to alpha_xx.sfs. Really I was just offering suggestions in case simargl found them useful though I'm certainly interested in using alphaOS in practice since it has some great features (pacman in particular).

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
pinguino

Joined: 07 Apr 2006
Posts: 11

PostPosted: Sun 02 Jun 2013, 10:11    Post subject: localization  

Hi, I'm trying to localize the system but after uncomment proper lines in /etc/locale.gen, I get this error:

Quote:
[root@alphaos ~]# locale-gen
Generating locales...
es_ES.UTF-8...locale alias file `/usr/share/locale/locale.alias' not found: No such file or directory
[root@alphaos ~]#


Thanks
Back to top
View user's profile Send private message 
simargl

Joined: 11 Feb 2013
Posts: 572

PostPosted: Sun 02 Jun 2013, 11:08    Post subject:  

pinguino, download missing file from https://bitbucket.org/simargl/arch-base/src/85d15d00bb8dc20c5367de8c0ef3daaa3b5b886d/rootfs/usr/share/locale?at=default

Folder /usr/share/locale from base module is removed with build script and also file locale.alias that was in it, but extra.sfs has all language support. Graphical programs should work with Spanish, but console based like pacman won't, although you can always add missing locales manually.
Back to top
View user's profile Send private message Visit poster's website 
futwerk

Joined: 07 May 2011
Posts: 261

PostPosted: Sun 02 Jun 2013, 15:29    Post subject:  

a few new backgrounds.
alphami11.jpg
 Description   http://www.mediafire.com/folder/7v1msw26s6chb/spuppy
 Filesize   6.56 KB
 Viewed   658 Time(s)

alphami11.jpg

alphami11,5.jpg
 Description   http://www.mediafire.com/folder/7v1msw26s6chb/spuppy
 Filesize   9.39 KB
 Viewed   670 Time(s)

alphami11,5.jpg

alphami11,1f.jpg
 Description   http://www.mediafire.com/folder/7v1msw26s6chb/spuppy
 Filesize   7.67 KB
 Viewed   674 Time(s)

alphami11,1f.jpg

Back to top
View user's profile Send private message 
simargl

Joined: 11 Feb 2013
Posts: 572

PostPosted: Sun 02 Jun 2013, 17:08    Post subject:  

Thanks futwerk Very Happy

mcewanw wrote:
... but I'm finding that if I try modifying rc.sysinit more than a couple of times it doesn't save the newer changes - it does save at first, but not thereafter! Very strange since clearly writes are working very briefly to ntfs...

It is because only latest file changes are saved, script that saves session on reboot uses command "cp -u" to reduce number of writes to usb drive, so it will not overwrite newer existing files. Idea was suggested by Marv. Off course this explanation can be true only if you use pupmode 13, save file on usb flash...
Back to top
View user's profile Send private message Visit poster's website 
tony

Joined: 14 Jan 2006
Posts: 316
Location: Montreal.ca

PostPosted: Sun 02 Jun 2013, 19:57    Post subject: Boot using grub.  

Hi,

I would like to boot alpha OS 7.0 as a frugal install using grub.

What would menu.lst look like and how much work would have to be done first?

Regards Tony.
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2296
Location: New Zealand

PostPosted: Sun 02 Jun 2013, 20:47    Post subject: usbsave cp -u PUPMODE 13 issue  

simargl wrote:

mcewanw wrote:
... but I'm finding that if I try modifying rc.sysinit more than a couple of times it doesn't save the newer changes - it does save at first, but not thereafter! Very strange since clearly writes are working very briefly to ntfs...

It is because only latest file changes are saved, script that saves session on reboot uses command "cp -u" to reduce number of writes to usb drive, so it will not overwrite newer existing files. Idea was suggested by Marv. Off course this explanation can be true only if you use pupmode 13, save file on usb flash...


Ah, that seems indeed to be what was causing the problem I was having with saving changes to my pupsave file. I therefore decided to modify my alpha_70.sfs (unsquashfs;mksquashfs), per ndrancs suggestion afterall, in order to at least temporarily remove that particular cp -u "feature"/side-effect.

Also, as a simple work around to the problem of my underlying frugal installation partition being ntfs, I used /tmp directory for the resquashing operation.

Not really a howto - the following reminder is just for my own use/documentation or in case anyone else finds these steps (or similar) useful:


In console from dir where I have the original alpha_70.sfs I executed
Code:

unsquashfs -d /tmp/alphaOS_core/ alpha_70.sfs

Then changed directory to /tmp/alphaOS_core and in there
edited /usr/sbin/usbsave changing the single occurrence of cp -afu to simply cp -af in the relevant PUPMODE = 13 if statement block.

Then resquashed the filesystem using:
Code:

cd /tmp && mksquashfs /tmp/alphaOS_core/ alpha_70.sfs -comp xz

That stores the resquashed alpha_70.sfs in /tmp which I then moved back to my frugal alphaOS installation directory and used on next boot.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2296
Location: New Zealand

PostPosted: Mon 03 Jun 2013, 03:19    Post subject: Re: hwclock issue - near to solution but not quite there...?  

ndrancs wrote:
hi all,
i try to set the system time.
The following are some steps that I have done:
- Add a few lines of words in /etc/init.d/hwclock
...
- Added hwclock on daemons in rc.conf:
Code:

DAEMONS="metalog network messagebus alsa cups Pwireless2 sfs_load hwclock"


so my question is why hwclock does not seem to run at boot?
...

but if the /etc/init.d/hwclock run manually the date was as expected.


I've been looking into the above issue a bit further. In fact, with the addition of hwclock in the DAEMONS line above, hwclock does in fact successfully run at boot. You can see that if you insert the following test lines at the very end of /etc/rc.d/rc.sysinit. Just examine the file /root/testclock after a reboot and you will see that "/etc/init.d/hwclock start" has, at that stage, correctly adjusted the system clock to the desired hardware clock value adjusted to the /etc/localtime zone:

Code:

date > /root/testclock


Unfortunately, that desired system clock localtime value gets lost again somehow when the boot process continues to the login to root stage (e.g. try date command in root bash shell). I examined /etc/profile and made sure TZ was set correctly, but that made no different anyway. Must be an easy one to find though, I just haven't managed as yet! As I said previously inserting "/etc/init.d/hwclock start" as the first line of /root/.start gets the desired system time setting back to that desired, but I find that unsatisfactory.

So how is localised to hardware clock system time getting lost between rc.sysinit daemon running stage and root login to bash is the question requiring an answer? The answer to that will solve the problem I feel.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Last edited by mcewanw on Wed 12 Jun 2013, 03:56; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Scooby

Joined: 03 Mar 2012
Posts: 299

PostPosted: Mon 03 Jun 2013, 14:56    Post subject:  

Scooby wrote:


...

2.
Mouse works with touchpad although gestures like two-finger scroll doesnt
But could easily be fixed with carolinas xorg.conf or the package from aur that handles this.

...


I tried substituting with carolinas xorg.conf but touchpad froze?
I hadnt install xf86-input-synaptics yet, maybe I need this

I thought I saw but couldnt find again somebody that installed flsynclient?
Is this correct? What procedure

Anyone else got mousegestures working in alphaOS?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 32 of 47 [697 Posts]   Goto page: Previous 1, 2, 3, ..., 30, 31, 32, 33, 34, ..., 45, 46, 47 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1209s ][ Queries: 13 (0.0134s) ][ GZIP on ]