How to remaster for specific country?

Booting, installing, newbie
Post Reply
Message
Author
User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

How to remaster for specific country?

#1 Post by rufwoof »

How do you remaster so that the country by default is set to a specific country/language?

Currently I have pkeys=uk as a boot parameter which sets the keyboard to UK ok. I've also got the timezone correctly pointing to GMT (Europe/London), but after remastering Puppy still asks for Country (default set to US) and after adjusting that it prompts another list from which again en GB English has to be selected. After which X has to be restarted.

I'd like Puppy to automatically be set to start up set to UK settings and avoid the need to adjust and restart X. But I want other settings not to be set (i.e. not remastered for a specific PC/hardware).

TIA

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

hmm might be /etc/keymap you need to add to the remaster but dont quote me...this stuff tends to change so perhaps look in /initrd/pup_rw/etc and see whats set after the first boot..... Having that file USED to mean it was used for setting up xorg without asking for country but that may not still be the case. ...indeed I will be more surprised if it is...

mike

User avatar
cimarron
Posts: 292
Joined: Fri 31 May 2013, 01:57

#3 Post by cimarron »

Time zone is saved in /etc/localtime, which (at least in my pup) is a link to a file in /usr/share/zoneinfo/... (for your region and zone). I think I just copied /etc/localtime to my remaster and then didn't need to select time zone on initial boot after that.

Hmm, now that I think about it, copying symlinks might be tricky... Maybe what I did was open the remastered sfs and put in a new symlink.

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

#4 Post by RSH »

Hi.

I'm using the LazY Puppy LazY Remaster Suite to remaster my Puppies, which is a huge modified version of the remasterpup2 script from Lucid Puppy.

When remastering it grabs automatically the settings for country settings (language), keyboard layout and timezone.

To grab the settings means, it copies the following files:

# This should grab keyboard layout and timezone
/etc/codepage to /tmp/etc/codepage
/etc/keymap to /tmp/etc/keymap
/etc/localtime /tmp/etc/localtime

# For the country settings file /etc/profile needs to be adjusted (do not copy /etc/profile to /tmp/etc/profile !!!) - more below

# This will (or should in newer puppies) disable the personal settings gui after X is started
/etc/personal_settings_popup_disabled to /tmp/etc/personal_settings_popup_disabled
(create the file manually, if it isn't existing - its just an empty file)

# I do copy also these files, though I don't know if its really needed
/etc/hostname to /tmp/etc/hostname
/etc/hosts to /tmp/etc/hosts

File /etc/profile needs to be edited to get the country settings into the new remaster, which I do by a short code snippet (I think I grabbed this from the original remasterpup2 script also).

Here is my complete code section for the remasterpup2 script (or however it is named in your puppy). Load the remaster script into a text editor, search for ON /etc or rm -rf /tmp/etc to find the right place, where to insert this code into the remaster script.

Needs to be placed below this line: rm -rf /tmp/etc

Code: Select all

# file /etc/codepage
if [ "$USECODEPG" = "true" ]; then
	if [ -f /etc/codepage ]; then
		#cp -af /etc/codepage /tmp/etc/
		cp -af /etc/codepage /tmp/etc/codepage
	fi
fi
# file /etc/desktop_icon_theme
if [ "$USEDSKICT" = "true" ]; then
	if [ -f /etc/desktop_icon_theme ]; then
		#cp -af /etc/desktop_icon_theme /tmp/etc/
		cp -af /etc/desktop_icon_theme /tmp/etc/desktop_icon_theme
	fi
fi
# file /etc/hostname
if [ "$USEPCHOSTNM" = "true" ]; then
	if [ -f /etc/hostname ]; then
		#cp -af /etc/hostname /tmp/etc/
		cp -af /etc/hostname /tmp/etc/hostname
	fi
fi
# file /etc/hosts
if [ "$USEPCHOSTS" = "true" ]; then
	if [ -f /etc/hosts ]; then
		#cp -af /etc/hosts /tmp/etc/
		cp -af /etc/hosts /tmp/etc/hosts
	fi
fi
# file /etc/keymap
if [ "$USEPCKEYMAP" = "true" ]; then
	if [ -f /etc/keymap ]; then
		#cp -af /etc/keymap /tmp/etc/
		cp -af /etc/keymap /tmp/etc/keymap
	fi
fi
# file /etc/profile
if [ "$USEPCPROFILE" = "true" ]; then
	if [ -f /etc/profile ]; then
		LANG="`grep '^ *LANG=' /etc/profile | cut -f 2 -d =`" #111010
		SEDSCRIPT="s%^LANG.*%LANG=${LANG}%" #111010
		sed -i -e "$SEDSCRIPT" /tmp/etc/profile #111010
	fi
fi
# file /etc/localtime
if [ "$USEPCLOCTIME" = "true" ]; then
	if [ -f /etc/localtime ]; then
		rm -f  /tmp/etc/localtime
		#cp -af /etc/localtime /tmp/etc/
		cp -af /etc/localtime /tmp/etc/localtime
	fi
fi
# file /etc/PuppyBackgroundPicture
if [ "$USEPCBGPIC" = "true" ]; then
	if [ -f /etc/Puppybackgroundpicture ]; then
		#cp -af /etc/Puppybackgroundpicture /tmp/etc/
		cp -af /etc/Puppybackgroundpicture /tmp/etc/Puppybackgroundpicture
	fi
fi
# file /etc/windowmanager
if [ "$USEPCWINMGR" = "true" ]; then
	if [ -f /etc/windowmanager ]; then
		#cp -af /etc/windowmanager /tmp/etc/
		cp -af /etc/windowmanager /tmp/etc/windowmanager
		cp -af /etc/windowmanager /tmp/etc/windowmanager.openbox
	fi
fi
# file /etc/.numlock_set_on
if [ "$USEPCNUMLOCK" = "true" ]; then
	if [ -f /etc/.numlock_set_on ]; then
		#cp -af /etc/.numlock_set_on /tmp/etc/
		cp -af /etc/.numlock_set_on /tmp/etc/.numlock_set_on
		else
		echo "" > /tmp/etc/.numlock_set_on
	fi
	else
	rm -f /tmp/etc/.numlock_set_on
fi
# file /etc/personal_settings_popup_disabled
if [ "$USEPCPSETTINGS" = "true" ]; then
	if [ -f /etc/personal_settings_popup_disabled ]; then
		cp -af /etc/personal_settings_popup_disabled /tmp/etc/personal_settings_popup_disabled
		else
		echo "" > /tmp/etc/personal_settings_popup_disabled
	fi
	else
	rm -f /tmp/etc/personal_settings_popup_disabled
fi
# file /etc/windowmanager.e17
if [ "$USEPCWME17BOOT" = "true" ]; then
	if [ -f /etc/windowmanager.e17 ]; then
		cp -af /etc/windowmanager.e17 /tmp/etc/windowmanager.e17
		else
		echo "enlightenment_start" > /tmp/etc/windowmanager.e17
	fi
	else
	rm -f /tmp/etc/windowmanager.e17
fi

# updating some rc.d files to remaster easily the English version
cp -af /etc/rc.d/rc.sysinit /tmp/etc/rc.d/rc.sysinit
cp -af /etc/rc.d/rc.shutdown /tmp/etc/rc.d/rc.shutdown
cp -af /etc/rc.d/new-rc.shutdown /tmp/etc/rc.d/new-rc.shutdown
cp -af /etc/rc.d/orig-rc.shutdown /tmp/etc/rc.d/orig-rc.shutdown
cp -af /etc/rc.d/rc.update /tmp/etc/rc.d/rc.update
cp -af /etc/rc.d/locals /tmp/etc/rc.d/

# Reset sfs_load's BOOTCONFIG.save file to original
echo "# This file affects sfs_load only at the 1st boot of a remastered puppy." > /tmp/etc/rc.d/BOOTCONFIG.save
echo "#EXTRASFSLIST=''" >> /tmp/etc/rc.d/BOOTCONFIG.save

# updating completely the LazY Puppy menu files & directories
rm -r /tmp/etc/xdg
cp -af /etc/xdg /tmp/etc/
As you can see on the lines like: if [ "$USECODEPG" = "true" ]; then, I'm checking first if option is set to true before updating the directories and/or files. These options are set by the LazY Remaster Suite's GUI Interface.

Just comment out and/or remove, what isn't needed in your case of use.
[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
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#5 Post by rufwoof »

Keymap and timezone are both OK. I'd previously pointed /etc/localtime to point to London time and setting pkeys=uk boot parameter ensures the keyboard is ok.

I see RSH has just posted as I'm writing this, so I'll stop here and review that posting tomorrow (approaching 1am here).

Thanks.
Attachments
country.png
(74 KiB) Downloaded 817 times

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#6 Post by OscarTalks »

To change your starting country/language setting in a remaster I think you have to edit /etc/profile

Around line 100 you should see
#this line gets edited by chooselocale script...

Below that you need to comment out the en_US line and just have
LANG=en_GB
export LANG

Then at first boot it should all be as you want it for the UK. I did this with mine and it is all OK but it was a while ago so I hope I remembered correctly what I did. This was a manual remaster of the main Puppy .sfs file.
Oscar in England
Image

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Remasterx

#7 Post by shinobar »

Will you test the Remasterx, if you are interested in?
http://shino.pos.to/party/bridge.cgi?pu ... rx-0.7.pet

Do not install but extract the pet and click the executable, if you don't want this in the remasterd cd.

Most code from Barry K., and some from RSH.
The '-b 1024K' option for the mksquashfs makes smaller sfs, thanks to the information from rufwoof.
Attachments
remasterx.png
(7.54 KiB) Downloaded 2465 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#8 Post by rufwoof »

OscarTalks wrote:To change your starting country/language setting in a remaster I think you have to edit /etc/profile

Around line 100 you should see
#this line gets edited by chooselocale script...

Below that you need to comment out the en_US line and just have
LANG=en_GB
export LANG

Then at first boot it should all be as you want it for the UK. I did this with mine and it is all OK but it was a while ago so I hope I remembered correctly what I did. This was a manual remaster of the main Puppy .sfs file.
That was perfect thanks Oscar - just as I wanted it. Now when you boot it still prompts for locale/language etc - but you can just accept the defaults and it drops through without having to restart X (whilst leaving the option to choose other languages/locale if needed).

My LiveCD now starts up relatively quickly (80MB iso), sets locale quickly (as above) and a click on the connect and accepting the simple network settings (few clicks) usually has you connected to the net relatively quickly.

I've also dropped in a quick firewall and sound setup script, which invokes the wizard (loads a database of sound cards etc) i.e. simple and quick. On the CD I've also included some scripts to load flash, firefox (version 29 with a select few add-ons (no script, flash block, zoom)), libre office 4.2.3 (with UK dictionary) and multimedia (Openshot, Blender, Audacity, Mesa, inkscape (full version), xvidcap). There's also a script to load all of those via a single click (LOAD_ALL script).

I've set boot parameters to pfix=ram pmedia=cd pkeys=uk so it boots to ram and those scripts all load into ram, so no HDD even required/touched. The downside of that is you can't create a savefile (otherwise the loaded sfs's get loaded twice).

I use a nvidia based PC and using the inbuild nvidia drivers Openshot works ok (providing mesa is loaded) and will correctly run 3D title rendering (that it uses Blender for) and scrolling titles (that it uses inkscape for). Another PC also does the same (Radeon).

Booting just to do some internet banking (80MB iso) is relatively quick - just needing the firefox load after having booted to the desktop. Loading everything else (LOAD-ALL) is still relatively acceptable speed wise - and the CD drive is free after loading (leaving the PC running purely from RAM only). Installing puppy sfs and the EXTRAS folder to HDD obviously improves speed. I'm seeing CD load speeds comparable to how quickly it takes to dowload the same from googledrive (I have a 50Mb - 75Mb internet connect D/L speed (around 6MB/sec)), so in concept there's not much difference between having EXTRAS local (on CD/DVD) than it is to pull those down from googledrive. Puppy ISO + EXTRA's weighs in at around 390MB total iso size (i.e. EXTRAS is around 300MB which takes around 50 seconds on my internet connection.

ISO also includes a couple of windows iso burning programs (32 bit and 64 bit versions), so in concept if you used the cloud to store your data and files, then given a blank cd and internet connection, relatively quickly you could have downloaded a puppy and be up and running with a full desktop (with comprehensive office and multimedia editing capabilities) relatively quickly - and all running in ram.

This is my (messy - needs a good tidy up) googledrive shared folder where the iso's are stored. s533t.iso is the 80MB desktop iso whilst s533t-OFFICE.iso is the full version (with the additional EXTRA's folder).

Thanks to all who offered help. I'm pretty close to if not at a final version now of a liveCD that does more or less everything I need.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

Re: Remasterx

#9 Post by rufwoof »

shinobar wrote:Will you test the Remasterx, if you are interested in?
http://shino.pos.to/party/bridge.cgi?pu ... rx-0.7.pet

Do not install but extract the pet and click the executable, if you don't want this in the remasterd cd.

Most code from Barry K., and some from RSH.
The '-b 1024K' option for the mksquashfs makes smaller sfs, thanks to the information from rufwoof.
I'll have to give that remaster script a go thanks shinobar.

The -b 1024K mksquashfs option does slow that process down a lot, but given that you build once, use many the extra space (download) savings can be worthwhile. Typically seems to knock around a extra 20MB off a typical iso file size (a Wary iso I tried the other day reduced down from around 160MB to around 130MB). Best way IME is to only drop that -b 1024 parameter in once you're more or less at the final edition.

I've also used the same high compression choice when making sfs's such as Libre (not sure but I think it reduced it down from 180MB to around 140MB).

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#10 Post by rufwoof »

Just discovered that the change in locale to UK (country) in /etc/profile doesn't agree with OpenShot (or rather python).

Python throwing out an error : unsupported locale setting :cry:

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

Re: Remasterx

#11 Post by rufwoof »

shinobar wrote:Will you test the Remasterx, if you are interested in?
http://shino.pos.to/party/bridge.cgi?pu ... rx-0.7.pet

Do not install but extract the pet and click the executable, if you don't want this in the remasterd cd.
I installed the PET, invoked it from the menu (setup), entered some values and ... /dev/sr0 not found.

I did that from a LiveCD (no savefile created) with the CD to be remastered in /dev/sr0 (mounted as /mnt/sr0).

The initial startup defaulted to /dev/sr0 in the 'Original CD' field. Changing that to /mnt/sr0 and it started the remaster OK, I've currently got /tmp/root /tmp/etc and a build directory (puppylivecd build under /mnt/sda4 (chosen working directory in my case). Clicking OK and its remastering ..... (the wait and wait bit with the progression slider slowly increasing i.e. I guess remastering ok).
Attachments
s1.png
(79.81 KiB) Downloaded 975 times
s2.png
(3.36 KiB) Downloaded 911 times

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

#12 Post by RSH »

Mabe trying out my code snippets or the script from shinobar.

I'm using Openshot 1.3.1 in LazY Puppy (Lucid 528-4 based) and also Openshot 1.4.3 in L.A.S.S.I.E. (Precise 571 based). Both are running and working and them presenting to me a DE GUI.

These Openshot SFS Modules are both in LazY Puppy Repostory at smokey01.com/RSH/ - For Openshot 1.3.1 there is a Python 2.6.4 SFS needed (and available). Openshot 1.4.3 comes with Python included.
[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
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

locale

#13 Post by L18L »

rufwoof wrote:Just discovered that the change in locale to UK (country) in /etc/profile doesn't agree with OpenShot (or rather python).

Python throwing out an error : unsupported locale setting :cry:
locale must be set by

Code: Select all

localedef
or use GUI script

Code: Select all

setlocale
View your locales by

Code: Select all

locale -a
When you edit /etc/profile to a supported locale (set by localedef / setlocale / ) there will be no error.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#14 Post by rufwoof »

RSH wrote:Mabe trying out my code snippets or the script from shinobar.
Thanks RSH. I suspect that ShinoBar's script contains the snippet you posted (or a close version of that) from what shinobar said. I haven't actually looked at the code/script yet though.
L18L wrote:locale must be set by localedef
Thanks L18L

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

How to set another language (locale) as default

#15 Post by vicmz »

Taking notes... :lol:

This is fun, I'm learning bit by bit how to set things in a remaster. As a side question, will any issues appear if I make my remaster using an EXT4 formatted 8 GB Flash drive as working space?
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#16 Post by rufwoof »

Remaster Express remastered to completion and worked as expected.

I like the progression slider rather than the /|-\| rolling character based progression indicator. Worked fine under my Slacko 5.3.3 (derivative).

I especially like how it also buries the remastered puppy sfs deeper than the default 2 levels that the reboot Searching.... scan searches (i.e. puts it out of the way from accidentally being unwittingly picked up).

Perhaps an additional option/checkbox to be able to pick the level of compression - normal (faster remaster) or high compression (slower remaster). For large remasters, perhaps 600MB iso type sizes, the high compression choice would be painfully slow, especially if cycling through repeated remasters (if you're anything like me and always seem to forget something). Maybe even a fast remaster (low/no compression) choice as well (for development stage).

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

Re: Remasterx

#17 Post by rufwoof »

shinobar wrote:The '-b 1024K' option for the mksquashfs makes smaller sfs, thanks to the information from rufwoof.
I've also applied that to pizzagood's edit-sfs.pet script and found that it can make a sizeable difference even for relatively small sfs's. For example my flash10 sfs shrinks down from around 5MB to 3.8MB.

I guess even though a 1MB dictionary is relatively large, the dictionary in effect becomes the data. i.e. longish string sequences inside the dictionary, small dictionary position pointer(s) outside of the dictionary (a large dictionary with mostly/all dictionary position pointers outside of the dictionary).

Remastering using ram as temp space also helps make the slower compression time more acceptable (less slow).

Pelo

Remasterx / on test / pets added

#18 Post by Pelo »

Victoire Victoria. Even con Puppy pfix=ram
Defeast : after several runs ok i have lost wlan completely. I will start again pfix=ram.
Il y a something in the algorithm which fails.Not in remasterx i think, in the algorythm of pupjibaro LXDE, the puppy used.
I am using the version 8.

Post Reply