BanksyPup - online banking and Puppy sampler

For talk and support relating specifically to Puppy derivatives
Message
Author
User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Re: Almost perfect ...

#16 Post by greengeek »

Volhout wrote: but I can only use WIFI. Is there a way to create a version that has a set of user parameters filled in (time zone, keyboard, etc.. WIFI...) and then create a new iso.
Hi Volhout, I have found one way to add the wifi connection into the Banksy iso without modifying the actual Banksy sfs itself.

This means that it is possible to create an iso that runs totally live (without savefile), but has the ability to connect to your wifi automatically during boot. (I have not yet figured out how to sort out the language and keyboard layout - but I know they can be already be done by listing them as parameters when the boot prompt is showing so I will get back to those after further testing)

I have tried to write the procedure so that a relative newby can use it so please forgive any duplication of knowledge:


Method to modify Banksy iso for auto connection of Wifi

Here is one method that can be used to set up a modified Banksy iso so that it contains your wifi info to allow automatic starting of the wifi connection when booting RAMonly versions (ie: no savefile).

This procedure creates a basic "zdrv" sfs which contains your wifi info and can easily be grafted into the Banksy iso without touching the main Banksy sfs. (At the moment Banksy uses the same zdrv naming as slacko 5.6 so it will be necessary for the final zdrv to be called 'zdrv_slacko_5.6.sfs'. I may change this name in a future release)

(Be aware that this zdrv will only be applicable on your PC running on your own wifi - it is not portable. If you need portability you need to use the connect wizard on each new machine/site you go to)

Creation of zdrv:

1) Decide whether you want to use the 'singleclick' or 'doubleclick' Banksy variant. Boot your target PC using the RAMonly version of this.
2) Use the 'connect' icon and choose 'sns' and set up your wifi parameters and verify that you can access the internet.
3) Once the connection is definitely running, navigate to /etc and look for the /simple_network_setup directory. This directory contains the specific information about your network setup and wifi parameters. Make a copy of this directory into /root
4) Make a new directory in /root and call it 'squashfs-root' (without the quotes)
5) Open 'squashfs-root' and make a new directory in there called 'etc' (without the quotes)
6) Open 'etc and put the copy of 'simple_network_setup' into it.
7) Now we are ready to create the sfs as follows:
- In the /root directory rightclick the open space and choose 'Window - Terminal Here'
- In the terminal type:
#mksquashfs squashfs-root/. zdrv_slacko_5.6.sfs (pay attention to the slashdot after the squashfs-root)
- This will form the zdrv sfs from the contents of the original directories containing the wifi info. Save this zdrv externally so it can be used later. (email it to yourself if you are unable to mount any drives)

Adding zdrv into the iso:
We will use "Isomaster" to do this. You may prefer to do this step on some other version of puppy rather than on Banksy itself. I always prefer to use a 'live' environment to do this (no savefile):

1) Boot the pup you wish to use for the process (Choose a recent pup like Upup, Slacko etc)
2) Copy the BanksyPup iso into /root
3) Copy the new zdrv into /root
4) Choose 'menu, multimedia, ISOmaster'
5) Doubleclick the Banksy iso that you can see in the upper pane of the isomaster window. This will "expand" the iso contents into the lower pane.
6) Leftclick (once) the new zdrv that you can see in the upper pane, then click the "Add" button and the zdrv will be added into the lower pane.
7) Choose 'File, save as' and save the new iso somewhere externally. Give it a name that clearly identifies it eg: Banksy_RAMonly_plus_zdrv.iso or maybe Banksy_Volhout_HomeWifi.iso
Wait for the progress bar to finish and the OK button to appear, click ok then close ISOmaster

Burn the new iso to CD and try to boot from it.

User avatar
russoodle
Posts: 707
Joined: Fri 12 Sep 2008, 17:36
Location: Down-Under in South Oz

bookmarking banks..

#17 Post by russoodle »

@ cthisbear: i don't know that pre-bookmarking the urls to any financial institution is a good idea...i know it's always easier just to click a link, but it's probably safer to always type in the url.

I'm not a mad hatter, (mad maybe but not a constant wearer of tin-foil hats), but just try to be careful where my bank account's concerned..
[i][color=Green][size=92]The mud-elephant, wading thru the sea, leaves no tracks..[/size][/color][/i]

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

Re: bookmarking banks..

#18 Post by Sylvander »

russoodle wrote:...safer to always type in the url.
I go further...
I use WINE [need it available in Puppy] to run my Windows exe portable "Acerose Password Vault" [I've used it since my Windows days].
I only need to memorize the username and long-password to gain access to the vault, and then...
I copy & paste info from the vault to wherever.
That includes the URL for the banking webpage.
That way the webpage cannot be spoofed.
One time though...
The bank changed the webpage address.
I checked that change very thoroughly before I used it.
Once satisfied I changed the address saved in the vault, and have used that ever since.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Re: Almost perfect ...

#19 Post by greengeek »

Volhout wrote:but I can only use WIFI. Is there a way to create a version that has a set of user parameters filled in (time zone, keyboard, etc.. WIFI...) and then create a new iso.
Hi Volhout, in addition to the previous post about how to burn wifi parameters into the iso I have been looking at an easy way to specify the locale and keyboard layout:

If you are planning to boot from a CD you can use isomaster to edit the isolinux.cfg and add the 'pkeys' parameter to specify a keyboard layout, and the 'plang' parameter to specify the locale/language. As follows:

- Copy the appropriate iso into /root and start Isomaster
- In the upper isomaster pane doubleclick the iso you want to modify.
- In the lower pane leftclick the 'isolinux.cfg' file once, then rightclick it and choose 'edit' (if you get an error look at the isomaster tools/options and make sure the editor is set to geany, not mousepad)
- You will see the file contents and you can add extra parameters to the init line as seen here:

Code: Select all

default puppy
display boot.msg
prompt 1
timeout 50

F1 boot.msg
F2 help.msg
F3 help2.msg

label puppy
kernel vmlinuz
append initrd=initrd.gz pmedia=cd pfix=ram plang=en_NZ.UTF-8 pkeys=dvorak
(This example sets the locale to NZ english with UTF8 and sets the keyboard layout to dvorak).

After modifying and saving the isolinux.cfg file, save the whole iso (file, save as...) and give it a name like Banksy_wifi_enNZ-UTF8_dvorak.iso or whatever to identify the changes. Burn the CD and test boot.

ps: I haven't found a specific list of current locales but if you look in the directory /usr/share/i18n you will see a directory of locales and also "charmaps" (UTF8 etc). I saw a comment from BarryK here stating that it is necessary to specify the full locale:
"Yes, plang must be a full locale, ex: de_DE.UTF-8
I have modified 'init' script to reject an incomplete plang.". I haven't looked into this too closely so can't give full advice. I just tested that the method works with my test of en_NZ.UTF8. Forum member L18L seems to have lots of knowledge in this area so may be worth PMing him for difficult questions about locale.

What locale and keyboard layout would you normally be using? Hopefully this method will get you closer to having the iso fully set up for your local needs.

I now need to find an easy way to set the timezone... (I'm hoping to find a way to specify it in the zdrv as with the wifi parameters but not certain how to make it work yet).
.

tony
Posts: 334
Joined: Sat 14 Jan 2006, 10:52
Location: Montreal.ca

#20 Post by tony »

Hi greengeek,

I have put Banksy pup on a partition in my hard drive which multiboots with grub4dos.

I customised Banksy and then used menu > setup > Remaster puppy live CD.

This will give you access to one other partition on which to build a customised system.

Read the instructions carefully. Tedious but it works.

other tools are unsquashfs and mksquashfs but you have to know where everything goes.

Regards Tony.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#21 Post by RSH »

greengeek wrote:I now need to find an easy way to set the timezone...
This is exactly what I have been working on, a few days ago, to be released in L.A.S.S.I.E. Version 0.0.3. Got it already running and working in L.A.S.S.I.E. 003 Development Version. Just need to set it up for those 10 languages that are installed by default in L.A.S.S.I.E.
L.A.S.S.I.E. 003 Development Version menu.lst wrote:title Lassie Development Version DE Interface (RAM, keine Erweiterungen & Datenmodule) \n Standardsystem zur Programmentwicklung
find --set-root --ignore-floppies /LassieDev/initrd.gz
kernel /LassieDev/vmlinuz lpextsfs=nolpextsfs lpconfigsfs=no lpusersfs=no psubdir=LassieDev pmedia=atahd pfix=ram,fsck plang=de_DE.UTF-8 pkeys=de timezone=Berlin nouveau.noaccel=1
initrd /LassieDev/initrd.gz

title Lassie Development Version FR Interface (RAM, keine Erweiterungen & Datenmodule) \n Standardsystem zur Programmentwicklung
find --set-root --ignore-floppies /LassieDev/initrd.gz
kernel /LassieDev/vmlinuz lpextsfs=nolpextsfs lpconfigsfs=no lpusersfs=no psubdir=LassieDev pmedia=atahd pfix=ram,fsck plang=fr_FR.UTF-8 pkeys=fr timezone=Paris nouveau.noaccel=1
initrd /LassieDev/initrd.gz

title Lassie Development Version EN Interface (RAM, keine Erweiterungen & Datenmodule) \n Standardsystem zur Programmentwicklung
find --set-root --ignore-floppies /LassieDev/initrd.gz
kernel /LassieDev/vmlinuz lpextsfs=nolpextsfs lpconfigsfs=no lpusersfs=no psubdir=LassieDev pmedia=atahd pfix=ram,fsck nouveau.noaccel=1
initrd /LassieDev/initrd.gz
Everything from 'kernel' to 'nouveau.noaccel=1' is a single line!

Code 1:

Code: Select all

# Data for TIMEZONE is in: /usr/share/zoneinfo
if [ "$timezone" ];then
	 for ONETIMEZONE in `echo -n "$timezone" | tr ',' ' '`
	 do
		case $ONETIMEZONE in
			de|DE|Berlin) TIMEZONE="/usr/share/zoneinfo/Europe/Berlin" ;;
			fr|FR|Paris) TIMEZONE="/usr/share/zoneinfo/Europe/Paris" ;;
			tr|TR|Istanbul) TIMEZONE="/usr/share/zoneinfo/Europe/Istanbul" ;;
			*) TIMEZONE="/usr/share/zoneinfo/Europe/London" ;;
		esac
	done
fi
Code 2:

Code: Select all

echo -n "$TIMEZONE" > /pup_new/etc/new_timezone
Code 3 (edited):

Code: Select all

echo "Setting $DISTRO_NAME Timezone..."
read NEWTIMEZONE < /etc/new_timezone
if [ "$NEWTIMEZONE" != "" ]; then
	rm -f "/etc/localtime"
	ln -s -f "$NEWTIMEZONE" "/etc/localtime"
	echo "New Timezone is: `basename $NEWTIMEZONE`"
	HWCLOCKTIME="utc"
	hwclock --hctosys --${HWCLOCKTIME}
	sleep 1
	HWCLOCKTIME="localtime"
	hwclock --hctosys --${HWCLOCKTIME}
fi
Insert Code 1 into the init script in initrd.gz.

Insert it directly above this code:

Code: Select all

#now supporting a boot menu...
RDSH=""
if [ "$pfix" ];then
 for ONEFIX in `echo -n "$pfix" | tr ',' ' '`
 do
  case $ONEFIX in...
...
Should be somewhere around line 540 - 550

Insert Code 2 into the init script in initrd.gz.

Insert it directly above this code:

Code: Select all

#RDSH is a boot param. exit to initial ramdisk shell...
if [ "$RDSH" = "yes" ];then
 echo > /dev/console
 echo "Dropped to initramfs shell. Type 'exec switch' to continue booting Puppy." > /dev/console
 exec /bin/sh >/dev/console 2>&1
fi
Close to the end of the init script.

Insert Code 3 into the xwin script in /usr/bin.

Insert it directly above this code:

Code: Select all

#v2.11 find out if xorg video drvr exists, else use xorg vesa...
if [ -f /usr/bin/Xorg ];then
 if [ -f /etc/X11/xorg.conf ];then
  #find location of video chip drivers...
  SPECVESA="`find /usr/lib /usr/X11R7/lib -noleaf -mount -type f -name vesa_drv.so 2>/dev/null | grep -v 'backup' | grep -m1 'vesa_drv.so'`" #1201031 bug fix.
  if [ "$SPECVESA" ];then...
...
Should be somewhere around line 280.

Some other positions to insert the codes into the scripts may work as well. I did choose it to insert as mentioned, since I have already made some modifications in L.A.S.S.I.E. and also LazY Puppy.

All these modifications made until today are working well.

Have Fun!

RSH
Last edited by RSH on Sun 01 Jun 2014, 17:35, edited 2 times in total.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#22 Post by RSH »

Addition to my post above.

I did forgot to publish a few lines of code, that I'm currently running from a script in /root/Startup - though, it could be included to the code of Code3:

Full Code 3:
echo "Setting $DISTRO_NAME Timezone..."
read NEWTIMEZONE < /etc/new_timezone
if [ "$NEWTIMEZONE" != "" ]; then
rm -f "/etc/localtime"
ln -s -f "$NEWTIMEZONE" "/etc/localtime"
echo "New Timezone is: `basename $NEWTIMEZONE`"
HWCLOCKTIME="utc"
hwclock --hctosys --${HWCLOCKTIME}
sleep 1
HWCLOCKTIME="localtime"
hwclock --hctosys --${HWCLOCKTIME}

fi
Quicksetup GUI shows all settings as expected, but the clock in tray (system time) did not recognize the time. Switching shortly between 'utc' clock and 'localtime' clock "fixes" this.

Code Part in my post above also updated.

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#23 Post by greengeek »

@Tony - thanks for the post. I'm glad to hear that the remaster worked successfully. I use a more manual method because I have never felt adequately in control using the inbuilt remaster routine.

Do the shutdown procedures work ok for you from an HDD install? (I have been mostly targeting CD based usage).

One of the things I am working on is to make it easier for the end user to customize without remastering the main Banksy sfs. I suspect that there will be users who are not as familiar with the full remaster as you are, so I am looking for ways to make Banksy look at a single 'customization' text file during the boot process.

@RSH - Thanks for the boot stanza info. I am still working on identifying how the locales and timezones work. I may choose to use only a smaller subset - I might limit the user to only GMT offset values (eg: timezone=GMT+3 etc) for simplicity.

That is quite a major addition to the initrd.gz that you are adding! :-)

So if I understand it correctly - you are making the initrd.gz capable of accepting the 'timezone' parameter. Do I understand that correctly? If so I think this would be a good addition for future puppies.

I am working on a different method to achieve this - I am planning to let the user create a single text file that contains their customization list (locale and timezone and including wifi SSID information etc) and force puppy to consult that list during the boot process. If I can achieve this it will take away from the end user the need to understand the complexity of the required boot parameters, and remove the need for remastering.

It is a long journey but I can see daylight :wink:

Jasper

#24 Post by Jasper »

Hi greengeek et al,

If your pup is entirely in RAM and you have installed your chosen apps and set your language, time zone, screen resolution, etc try "ram2sfs" (from Ted Dog) included below.

Just download, place the file in any mounted drive/partition
rename it by deleting the last three characters (dot g z)
right click and choose "yes" to make the file executable
do not deliberately run any apps and left click the file.

If it works as expected - how long does it take to produce your remastered main sfs file (which should appear in a temporary folder soonish after the remaster hits 100% - and it can then be moved to a safe location).

The whole process after the left click is totally automated (except for the final movement to a safe location) and there is not even one decision to be made.

One chap with a fast machine and oodles of RAM reported it took 1' 26". It takes about 36' on my ancient machine and then another 45" to make a new closed (or open) DVD using "reburn" or a bit longer to make a closed (or open) CD using ISOmaster.

If it fails because there is a shortage of RAM - there is a workaround, however if you are short of ram (say, less than one or two GB) I suggest that large pets (eg Libre office) are avoided - if only for the initial trial.

@greengeek - did you actually try the dated-save-folder method?
Attachments
ram2sfs.gz
(2.35 KiB) Downloaded 328 times

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#25 Post by RSH »

So if I understand it correctly - you are making the initrd.gz capable of accepting the 'timezone' parameter. Do I understand that correctly?
Yes, absolutely right!

By adding those three parameters: plang=de_DE.UTF-8 pkeys=de timezone=Berlin, L.A.S.S.I.E. 003 D.V. is currently booting directly into German Language, German Keyboard Layout and German (Berlin) Timezone.

I'm using the code exactly as shown in my previous post, plus a small addition. After switching to 'utf' and then back to 'localtime', I move the file /etc/new_timezone and rename it to /etc/new_timezone_file_now_disabled, to avoid repeating it when restarting X, but to keep it, to be able to have a look into it (if something may go wrong later, since this is running now only a few days).

When adding parameters, plang=tr_TR.UTF-8 pkeys=de timezone=Istanbul, L.A.S.S.I.E. 003 D.V. boots directly into Turkish Language and Timezone, by using German Keyboard Layout.

I'm doing this for the 10 Languages installed by default in L.A.S.S.I.E. and it works pretty good so far

- DA, DE, EN, ES, FI, FR, NL, IT, PT and TR

There is currently only one small L.A.S.S.I.E. only based issue by now, which is dependent to the langpacks used. But, easy to solve here...
I am planning to let the user create a single text file that contains their customization list (locale and timezone and including wifi SSID information etc) and force puppy to consult that list during the boot process.
You should definitly have a look into L.A.S.S.I.E. 003, when available...
If I can achieve this it will take away from the end user the need to understand the complexity of the required boot parameters, and remove the need for remastering.
For my private remasters I'm still using the LazY Puppy Remaster Suite, which is now a RoxApp and doesn't need to be included into the OS anymore.

For remasters to be published (like L.A.S.S.I.E.) I do use the LazY Puppy ISO Builder, which is a heavy fork of scOttman's woofy combined with some parts of LazY Puppy Remaster Suite and lots of the experiences achieved while building this Remaster Application (which is still based on the remasterpup2 script from Lucid Puppy).

There hasn't been any Puppy (since 5.2) that could not boot directly into the graphical desktop, after remastering with this LazY Puppy Remaster Suite.
It is a long journey but I can see daylight
Agreed!

I can say this by first hand... :lol:

Good luck,

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#26 Post by greengeek »

Jasper wrote:- did you actually try the dated-save-folder method?
Hi Jasper, yes I did - and many thanks for making me aware of that method. I have never been a multisession user so had no idea how it worked. I managed to get some usable results out of that method, but ran into a couple of snags. Firstly, when I tried to copy the save directory I got messages saying something like "certain special devices can not be copied" and it asked me if I wanted to continue. I said "no" when asked if I wanted to continue but it seemed to have worked - although I was reluctant to have confidence in the results without a better understanding of the error messages.
Secondly, when I use this save directory grafted into the iso it boots fine, but comes up with a 'save' icon on the desktop and seems to be running in pupmode=77. The save icon fails and it ejects the CD if I try to click it, (so it was fulfilling my desire to avoid any "save process" but would still be nice to get rid of the icon and stay out of pupmode 77). The method does work well though - the wifi was good and the timezone and locale remembered the changes I had requested.

I am still working on understanding and refining this method, but I need more time to make sure it functions correctly and i need to come up with a process that works easily enough that I could write a clear tutorial for users.

I also got sidetracked looking at TedDogs "sloppy remaster" which seems relevant here.

During that sidetrack I got sidetracked again focussing on two questions:

1) Why doesnt the initrd allow an sfs to be used as the reservoir for saved information when loading from CD - it allows a "save directory" (as your method shows) but not a "save sfs". I am setting up methods to get around this limitation but it will not be available in Banksy01 - will have to wait for Banksy2.
2) Why does the initrd force zdrv contents to be "underneath and inferior to" the contents of the main puppy sfs. I am working around this in anticipation of Banksy2 in order to find easier ways to customize puppy WITHOUT having to boot on the target machine and capture a savefile or save directory at all.

I will have a closer look at the other info you have posted above and will try to get some meaningful results sometime soon.

Thanks for your help on this - I think it will be very helpful to have a selection of different methods for users to capture their preferred setup or even to preconfigure some parts of it.
.
Last edited by greengeek on Sun 01 Jun 2014, 21:03, edited 1 time in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#27 Post by greengeek »

RSH wrote:Good luck,
RSH
Thanks! I need it :)
There is much that goes on in the background when a puppy boots, so educating myself about those processes and finding ways to work with them takes a l_o_n_g time.

Love the inclusion of timezone as a boot parameter, that is a great step forward for people who want to run without a savefile.

Jasper

#28 Post by Jasper »

Hi greengeek,

On the one hand, both the methods I suggested work perfectly for me - and seem to do exactly what you asked for - so there is nothing at all that "needs" to be refined. Surely, all drive icons ( indeed all desktop icons) are as easily hidden for you, as they are for me, and I see 77 as a pleasant enough integer.

On the other hand, there must be considerable satisfaction in finding personal solutions - sometimes through hours of pain as well as pleasure.

So, I also wish you well; although, it seems unnecessarily complicated to avoid using a standard Multi-session-CD/DVD - as not only can one save, or not save, as and when one wishes, but also (puppy pfix=x) is a "temporary kill as you wish - if you really must" (F2) option to use (without the loss of one jot of security) when booting into banking mode.

My regards

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#29 Post by greengeek »

Jasper wrote:If your pup is entirely in RAM and you have installed your chosen apps and set your language, time zone, screen resolution, etc try "ram2sfs" (from Ted Dog) included below....
If it works as expected - how long does it take to produce your remastered main sfs file (which should appear in a temporary folder soonish after the remaster hits 100% - and it can then be moved to a safe location).
Interesting - the process is very easy, and took 20 munites exactly on my 1G netbook. Surprisingly the sfs it creates is 160MB - about 40MB smaller than my original sfs, so I don't understand where the extra 40MB went. However, it seems to be working properly so this could well be a good method.

I have only used the new sfs on an HDD install so far - I assume a CD burn would run just the same. I will look more closely at this and see how it compares. (the 40MB must have contained something important surely?)
Thanks Jasper and Ted!

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#30 Post by RSH »

greengeek wrote:Love the inclusion of timezone as a boot parameter, that is a great step forward for people who want to run without a savefile.
I'm using it now for a few days and it seems to work perfectly.

Though, now we have three (3) parameters for the user interface to be set up -Language, Keyboard and Timezone- which could be combined to a single parameter, like: pinterface.
L.A.S.S.I.E. 003 Development Version menu.lst new entry wrote:title Lassie Development Version DE Interface (RAM, keine Erweiterungen & Datenmodule) \n Standardsystem zur Programmentwicklung
find --set-root --ignore-floppies /LassieDev/initrd.gz
kernel /LassieDev/vmlinuz lpextsfs=nolpextsfs lpconfigsfs=no lpusersfs=no psubdir=LassieDev pmedia=atahd pfix=ram,fsck pinterface=de nouveau.noaccel=1
initrd /LassieDev/initrd.gz
This single parameter pinterface=de gives me now pkeys=de plang=de_DE.UTF-8 ptimezone=Berlin and boots straight up to full DE Interface.

This is my code at the top of the init script:

Code: Select all

# 2014-06-02 RSH --> Set User Interface (Language, Keyboard and Timezone)
# Currently only for DE available
if [ "$pinterface" ];then
	 #for ONEPINTERFACE in `echo -n "$pinterface" | tr ',' ' '`
	 #do
		case $pinterface in
			de|DE|Berlin|German*|Deutsch*) pkeys=de plang=de_DE.UTF-8 ptimezone=Berlin ;;
			*) pkeys=de plang=de_DE.UTF-8 ptimezone=Berlin ;;
		esac
	#done
fi
greengeek wrote:I am working on a different method to achieve this - I am planning to let the user create a single text file that contains their customization list (locale and timezone and including wifi SSID information etc) and force puppy to consult that list during the boot process.
The user already has something similar to a single text file containing customizations: menu.lst

Note, if one wants to setup e.g. pkeys, plang (and maybe ptimezone) from a different text file, the developer would need to write code to read out that text file and to run processes and actions regarding that text file.

At least the developer would need to double some code from the init script - e.g. to have working functions to set up pkeys, plang etc.

Why not setting this up just by using the boot options?

Also, it seems to be quite nearly impossible (at least it was for me) to read out a simple text file from within the init script - though I've found a solution to get my config file from boot partition into the OS.

I could not find a way to mount my boot partition inside of the init script's code to have access to my config file at this partition. I have tried to mount it to /mnt, /pup_new/mnt, $OLDFILESMNTPT/mnt and lots more - nothing worked.

I've tried it for weeks including lots of kenel panics and reset button pushings until I did com through. All what's needed is: $PUPSFSDEV, which contains the boot partition (here: sdd1). If one knows the puppy's boot partition one can mount it from within /usr/bin/xwin, /etc/rc.d/rc.sysinit or even /etc/rc.d/rc.local.

This code,

Code: Select all

# Boot directory for the config file - RSH
echo -n "$PUPSFSDEV" > /pup_new/etc/new_boot_drive
placed to where I placed this code (from my postings above):

Code: Select all

echo -n "$TIMEZONE" > /pup_new/etc/new_timezone
After puppy has made the performing of a 'switch_root' to the layered filesystem, one has access to file new_boot_drive in /etc and drives can be mounted to /mnt. Then it is easy to read out a simple text file - and the developers torture is starting...

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#31 Post by greengeek »

RSH wrote:Though, now we have three (3) parameters for the user interface to be set up -Language, Keyboard and Timezone- which could be combined to a single parameter, like: pinterface.
I think this is excellent work, and very beneficial for many users. However - using "pinterface" would still have to be in addition to individual plang/pkeys etc as there are many places where the same language and keyboard layout are associated with multiple timezones (Russia, America, Australia etc). "Pinterface" would be very convenient for small countries though :-)
The user already has something similar to a single text file containing customizations: menu.lst
This is true for HDD installs - but not for CD booting. One of my primary aims is to allow a user to "build" a CD into a "closed session" puppy that cannot be overwritten or contaminated. So how to do that without menu.lst? Of course the user can modify isolinux.cfg but that has limitations - namely RSH has not yet rebuilt isolinux to recognise the timezone parameter :-) (I'm happy to wait another week or so for that...).
(EDIT : - Maybe I am confused about this, but I thought isolinux kernel parameters and menu.lst init parameters behaved in different ways and got passed to different code).
If I can, I want to make it even easier than that. I want to see the initrd altered to read from a text file on the CD if possible. That way all a user has to do is learn how to add a textfile into the .iso (which is easier than changing isolinux.cfg, and easier than using mksquashfs to build a new puppy.sfs, zdrv.sfs etc)

However, in the meantime I am focusing on using the zdrv as the "container" of the text file. Also, it will be the "container" for the modified init scripts that are necessary for forcing puppy to look at the text file.

But - you have provided another option in the meantime - the ability to set timezone in the boot parameters is great.- (for HDD installs at least...)

There is another factor too: I want to make it possible for a user to build this puppy CD ready-to-go for a friend living in another city/country. Not so easy if you have to boot then configure then save a snapshot of the running system before building a savefile - it would be better if some basic parameters could be stored as simple text. (obviously not useful for wider configuration of applications etc, but good enough for the "Live Puppy Sampler" concept that I am building - where kbd, lang, timezone and wifi info are all that is required for getting quick access to the "cloud")
Note, if one wants to setup e.g. pkeys, plang (and maybe ptimezone) from a different text file, the developer would need to write code to read out that text file and to run processes and actions regarding that text file
Yes, that will be necessary. But I suspect it is not major - for example puppy feeds default settings to quicksetup and I think it would not be too hard to define those defaults as $VARIABLES and add some code there to define the name / location of a text file where puppy can grab the variables from.

I believe this can be achieved by putting those modified files into a zdrv. Maybe a good place would be a file called /root/Choices/userdefaults. (I have already been using the zdrv in this manner - forcing it to 'override' the main puppy sfs)

So maybe at this stage - I have to ask the user to put the text file into the zdrv. Some people would say this is just as hard as getting them to put it into the main puppy sfs - but I dont think so. I think it is risky (and slow) asking a user to remaster the main puppy sfs (especially if that is just to add one text file), so maybe the zdrv will work for me while I develop the modified init code.

If you can change the isolinux code to accept timezone then maybe I dont have to think about this :-)
(but then I still have the same issue with how to graft the wifi info too - I don't see how that can be so easy via menu.lst or isolinux.cfg)
Also, it seems to be quite nearly impossible (at least it was for me) to read out a simple text file from within the init script - though I've found a solution to get my config file from boot partition into the OS
At this stage I am not much using HDD partitions and mostly looking at CD boot - how to make it easier for the user to build a cd that they can send to a friend on the other side of the world - preconfigured.
I've tried it for weeks including lots of kenel panics and reset button pushings until I did com through. All what's needed is: $PUPSFSDEV, which contains the boot partition (here: sdd1). If one knows the puppy's boot partition one can mount it from within /usr/bin/xwin, /etc/rc.d/rc.sysinit or even /etc/rc.d/rc.local.
I think this will be unsuitable for what I am doing at the moment, simply because I have no idea of the partition configuration of the end user. Didn't BarryK used to do something similar with the Pup001 file in the early days? I don't really understand why the initrd can grab information from a zdrv, but not a simple text file. It is very similar to looking for the main puppy sfs across many partitions - as well as hunting for puppy.sfs and zdrv.sfs and then puppy.2fs why not hunt for "puppyuserdefaults.txt"?
Then it is easy to read out a simple text file - and the developers torture is starting...
Torture is good. It builds strong character 8)

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#32 Post by RSH »

I think this is excellent work, and very beneficial for many users. However - using "pinterface" would still have to be in addition to individual plang/pkeys etc as there are many places where the same language and keyboard layout are associated with multiple timezones (Russia, America, Australia etc).
Yes. It works exactly this way. If pinterface is not used, pkeys, plang and ptimezone are still usable.
This is true for HDD installs - but not for CD booting.
Use Grub4DOS as the boot loader on CD. It will give to the user a boot menu.

http://murga-linux.com/puppy/viewtopic. ... 354#780354
If you can change the isolinux code to accept timezone then maybe I dont have to think about this Smile
(but then I still have the same issue with how to graft the wifi info too - I don't see how that can be so easy via menu.lst or isolinux.cfg)
Can I have a look at these wifi info?
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#33 Post by greengeek »

RSH wrote:Can I have a look at these wifi info?
Once sns has been run and successfully connected to the wifi router it creates the following files in /etc/simple_network_setup. If that directory and those files are included in a zdrv at boot time the connection gets made automatically. My plan was to let the user specify the Mac address, SSID and SSID key and then use a script to build the files from that info if possible. (I need to look closely at what each field in the connections file represents and determine how to modify it for different machine configs)

Probably easier to just add the intact files into the zdrv but I will see what else is possible.
.
Attachments
connections.gz
(172 Bytes) Downloaded 241 times
wpa_supplicant.conf-vodafoneXXXX-00_12_F0_19_E2_44.gz
The filename normally contains colons &quot;:&quot; between the MAC
address couplets but it wouldn't upload like that
(&quot;invalid file name&quot;) so I replaced the colons with underscores.
(220 Bytes) Downloaded 261 times
Last edited by greengeek on Tue 03 Jun 2014, 17:56, edited 1 time in total.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#34 Post by RSH »

Ok.

File wpa_suppliant... ... ... could be build from this:

Code: Select all

#!/bin/bash -a
#------------------------------------------------------------------------------

CTRLINTERFACE="$1"
APSCAN="$2"
SSID="$3"
KEYMGMT="$4"
PSK="$5"

echo 'ctrl_interface='$CTRLINTERFACE'
ap_scan='$APSCAN'

network={
 ssid="'$SSID'"
 key_mgmt='$KEYMGMT'
 psk='$PSK'
}' > /root/wpa_supp
Call the above script from this script:

Code: Select all

#!/bin/bash -a
#------------------------------------------------------------------------------

APPDIR="`dirname "$0"`" # Application Directory
# Next line is a single line
"$APPDIR/NAME-OF-THE-ABOVE-SCRIPT-HERE" "/var/run/wpa_supplicant" "1" "vodafoneXXXX" "WPA-PSK" "8e71b6930f43267f5f6c1c67288d876ffbb6d65c43057621be4a6d46a077c5cc"
which just needs to submit these 5 parameters:

Code: Select all

CTRLINTERFACE="$1"
APSCAN="$2"
SSID="$3"
KEYMGMT="$4"
PSK="$5"
Result is:

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
 ssid="vodafoneXXXX"
 key_mgmt=WPA-PSK
 psk=8e71b6930f43267f5f6c1c67288d876ffbb6d65c43057621be4a6d46a077c5cc
}
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#35 Post by greengeek »

RSH wrote:I did forgot to publish a few lines of code, that I'm currently running from a script in /root/Startup - though, it could be included to the code of Code3:

echo "Setting $DISTRO_NAME Timezone..." etc

Quicksetup GUI shows all settings as expected, but the clock in tray (system time) did not recognize the time. Switching shortly between 'utc' clock and 'localtime' clock "fixes" this.
I had not thought about this. Looks like a good idea.

Also - does your timezone code allow the basic GMT+/- offsets in /usr/share/zoneinfo/Etc? It looks to me as if it does... (I think that is what I would use most)

And thankyou for the wpa_supplicant builder scripts. What does the APPSCAN parameter refer to? Is that something the user must understand?

I am also confused why the key appears as a simple string in one file (I listed it as XXXXXXXXX but its actualy something like EE62BAf236) but in the other file it shows as the long string

Code: Select all

8e71b6930f43267f5f6c1c67288d876ffbb6d65c43057621be4a6d46a077c5cc
The sns wizard seems to build the long string by itself from the shorter string (which is the key that the user sees on the back of the router or re-programmes themselves...)

EDIT : - note to self: Long key gets built from combination of short passphrase and SSID see here

The sns wizard only asks me for 3 pieces of data
- which SSID to choose?
- Which Key-MGMNT method?
- Alphanumeric Key

Do you think it would be an easier method to trigger the sns wizard during boot and pass it the required 3 parameters automatically rather than build the wifi profile files in this way? (I think I can easily telephone my friends to ask "what is your wifi key" - but I doubt they can tell me the long version)

EDIT 2: - now that I think about it, the sns wizard actually gets some extra information from me because I have to first of all click my choice of interface (ethx, wlanx). So I'm wrong about only needing 3 pieces of information.
.

Post Reply