Light-Debian-Core-Live-CD-Wheezy + Porteus-Wheezy

For talk and support relating specifically to Puppy derivatives
Message
Author
User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#2101 Post by fredx181 »

Terry wrote:# Trying to write a USB installer for DebDog. Looks like it`s going to be ultra simple.
That would be great!
I've had a look at grub4dosconfig for puppy from here:
http://www.murga-linux.com/puppy/viewtopic.php?t=51697
Of course it's specially for puppy but I thought maybe modify it but it's very complicated.
--------
Toni,I tried so change my system locale to my language but it worked only half.
I think there are files missing in /usr/share/locales.
For example, a reinstall of synaptic made it show in my language.
To much cleaning done maybe?

Fred

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#2102 Post by saintless »

sunburnt wrote:Toni; Thanks, I kinda thought we did not have disktype.

What`s the installed Squash size of "parted".? I counted to over 1 MB and quit.
disktype is 40 KB in size. Needed for file system type and both sizes.
Terry, if I you mean the same parted it adds very little:

Code: Select all

root@debian:~# apt-get install parted  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  parted-doc
The following NEW packages will be installed:
  parted
0 upgraded, 1 newly installed, 0 to remove and 23 not upgraded.
Need to get 159 kB of archives.
After this operation, 267 kB of additional disk space will be used.
I will add it if we need it. Since DebianDog has Gparted I thought it is not needed to add parted.

I will add disktype.

Toni

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#2103 Post by saintless »

fredx181 wrote:To much cleaning done maybe?
Hi, Fred.
Yes, but I don't think it is too much.
Not everyone will change the locales so I plan to keep /usr/share/locales in separate squashfs module on the site. I think it will be over 40 Mb uncompressed at the moment inside the main module but I need to check the exact size. I will make a separate module when we stop adding more applications to the main one.

Toni

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#2104 Post by mcewanw »

saintless wrote: Sorry if I didn't make it clear enough, William.
I mean exactly that:
I login via XDM to puppy user account, but I do not start synaptic with su -c. I use su-to-root:

Code: Select all

puppy@debian:~$ su-to-root -c synaptic
...
And Synaptic works.[/quote]

Ah... I think that's because su-to-root finds and uses ktsuss which runs su whilst preserving the environment (I presume, but don't know - hence /puppy/,Xauthority found and used okay when program running as root user needs to write to user X DISPLAY).

You should also be able to run it with:

su --preserve-environment -c  synaptic

But if the user puppy environment is okay, then you could probably simply use: sudo -E synaptic (for example in /opt/bin/synaptic-start)

EDIT: tried it. seems to work (at least the program pops up okay, but I haven't actually tried to install anything with it...EDIT: okay, I tried installing 'unrar' and it seems to do it, but maybe something not done right - I don't know).

However, some programs might need root environment rather than user environment? EDIT: For example, if you just preserve environment, maybe the PATH won't find necessary system binaries or other side-effects?
github mcewanw

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#2105 Post by fredx181 »

saintless wrote:
fredx181 wrote:To much cleaning done maybe?
Hi, Fred.
Yes, but I don't think it is too much.
Not everyone will change the locales so I plan to keep /usr/share/locales in separate squashfs module on the site. I think it will be over 40 Mb uncompressed at the moment inside the main module but I need to check the exact size. I will make a separate module when we stop adding more applications to the main one.

Toni
Ok, that should do it then.
What's your way of collecting these missing locales?
I'd like to do simular maybe with Porteus-Wheezy.

Fred

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#2106 Post by saintless »

Hi, Fred!

I just move /usr/share/locale folder outside before making new squashfs remaster.
Unfortunately I didn't start this from the beginning and I have to download few packages manual and to extract /usr/share/locale from the deb package.

The way I see it the user can install localepurge as Sergey suggested here:
http://mail.murga-projects.com/puppy/vi ... 59b51c8d8e
Then setting dpkg-reconfigure locales to choose the needed locales only for any new installed package.
Then the user can copy only the needed language folder for all included in DebianDog programs and make a remaster. This way the system will stay small as possible.
Not sure yet about the best way to make the process easier for the user but this is my view in general.

At least for me there is no need to keep all languages available just to take space if we can include only what is needed and if it is needed. User choice.

Toni

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#2107 Post by saintless »

mcewanw wrote:However, some programs might need root environment rather than user environment? EDIT: For example, if you just preserve environment, maybe the PATH won't find necessary system binaries or other side-effects?
Hi, William.
I'm not sure if our puppy user account has the best setup but we have some programs using su-to-root (gsu, ktsuss) and some using xterm -e sudo.
For example I think it is better to add user to some more groups than typing sudo eject for open the optical device.
As I wrote a few times it is not my intention at all to make system administrator job easier. I do not know enough to make something like this.
The point of user puppy account was to have it for you and Terry and Fred to test the programs and scripts if they work for user also. And to be sure DebianDog didn't loose multiuser support.
I think we have both now and better setting of user account is something that the user can do if it is needed.
I just like to make the installed programs work with XDM active for user. Nothing more.
Thanks to you, Fred and Terry I think it is almost done and not much left for beta iso.

Toni.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#2108 Post by fredx181 »

Hi Toni
I just move /usr/share/locale folder outside before making new squashfs remaster.
Unfortunately I didn't start this from the beginning and I have to download few packages manual and to extract /usr/share/locale from the deb package.
Thanks for explaining!
Meanwhile I did some searching and found the below on Ubuntu forum.
I guess it's overdone to do this way but I wanted to know what the size of complete /usr/share/locale folder would be.

Code: Select all

for pkg in `dpkg --get-selections | awk '{print $1}' | egrep -v '(mysql|mythtv)'` ; do apt-get -y --force-yes install --reinstall $pkg -d ; done
It will download-only every package that is installed.
Then I moved all packages from /var/cache/apt/archives to another place with enough space and extracted;

Code: Select all

cd /path/to/packages

for arg in *.deb ; do
dpkg -x "$arg" .
done
Size of usr/share/locale: 93Mb :roll:
This on Porteus-wheezy but I guess it will be about the same for Debiandog.

So maybe it's wise to pick a few packages as you suggested.
but on the other hand it's going to be separate squashfs so size doesn't matter much in this case.

Fred

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#2109 Post by saintless »

fredx181 wrote:So maybe it's wise to pick a few packages as you suggested.
but on the other hand it's going to be separate squashfs so size doesn't matter much in this case.
Thanks, Fred :)

Not exactly the way I think to make it. Separate squash file will be uploaded but I'm thinking about copy/paste script or make-separate-language squashfs from this big squashfs or big archive with locale files uploaded on the site.
Every language is in separate folder so we can make at least the most used languages in separate small squash files also.
I'm not ready to think proper on the options now. I'm too busy with DebainDog beta iso preparation.

93 Mb sounds about what I suspect also. I stoped counting over 40 Mb. and I have to add more from previous installed packages. Only Synaptic ads 4,5 Mb locale files.

Toni

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#2110 Post by saintless »

Fred,
just quick test from what I have shows for DebianDog the locale files will be 50-60 Mb. Not more. Maybe Porteus-Wheezy has more language files for some applications. Dillo for example downloaded with apt-get does not have at all /usr/share/locale Some packages have only 6-7 languages.

Bets compression for locale folder I have at the moment with size 48,6Mb makes 11,7Mb squashfs. It is not so bad but still prefer to keep this 11,7 Mb out of the main module.

Toni

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#2111 Post by fredx181 »

Hi Toni
just quick test from what I have shows for DebianDog the locale files will be 50-60 Mb. Not more.
What is the comparison, did you download all installed packages, extracted them and then looked at the size of the locale folder, as I did on Porteus-Wheezy?
Because I couldn't believe such a big difference so i just did that on DebianDog and size turns out to be 91Mb.
Just wanted to mention this, don't want to distract you from working on the beta (yessss :D finally coming out soon??)
We can discuss about locale later.

Fred

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#2112 Post by sunburnt »

# A further thought on locales... Perhaps best if each locale "set" is separate download.?
Why would anyone want to download 90+MB of data they don`t need.?
So a DebDog gui to download and install selected locale sets individually.?

Toni; Parted allows excellent partition creation and manipulation. The cli gparted.
I`ll look at what is really needed to make the USB installer. Looking at shinobar`s grub4dosconf.

Fred; Do you know where the code/script is in Porteus initrd file that does the Live-rw dir.?
I`d like to clone it ( add-on ) to the std. Debian boot. Seems like it`s just a small code section.
Just before mounting a live-rw file, partition, or dir. partition is when we need to do a fsck.
.
Last edited by sunburnt on Mon 31 Mar 2014, 17:00, edited 2 times in total.

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#2113 Post by saintless »

fredx181 wrote:What is the comparison, did you download all installed packages, extracted them and then looked at the size of the locale folder, as I did on Porteus-Wheezy?
Hi, Fred :)
No I didn't do the same as you but I will in the next days. I guess you are right since my experience is from what I have saved and the DebianDog stage at the time I started to save locale files.
I just thought I couldn't miss to save 40-50% locale files but probably I did.
Your test makes even more needed to remove /usr/share/locale files from the base system. It adds too much for our needs. It is better to give user choice.

Toni

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#2114 Post by saintless »

Hi, Terry.
sunburnt wrote:A further thought on locales... Perhaps best if each locale "set" is separate download.?
Why would anyone want to download 90+MB of data they don`t need.?
So a DebDog gui to download and install selected locale sets individually.?
Yes, I also think of separate archives or sfs files with each locale folder inside /usr/share/locale We should do it this way.
Toni; Parted allows excellent partition creation and manipulation. The cli gparted.
I`ll look at what is really needed to make the USB installer. Looking at shinobar`s grub4dosconf.
Parted and disktype added.

Toni

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#2115 Post by fredx181 »

Hi Terry
Fred; Do you know where the code/script is in Porteus initrd file that does the Live-rw dir.?
It should be between line 209-218 in linuxrc script (on root of extracted initrd.xz):

Code: Select all

# Setup changes:
if [ $CHANGES ]; then
    echo $i"setting up directory for changes"
    CHNEXIT=`echo $CHANGES | cut -d: -f1`; [ $CHNEXIT = EXIT ] && CHANGES=`echo $CHANGES | cut -d: -f2-`
    locate -r $CHANGES
    if [ $? -eq 0 ]; then
	if [ -d /mnt/$DEV/$LPTH ]; then
	    mkdir -p /mnt/$DEV/$LPTH/changes 2>/dev/null && \
	    mount -o bind /mnt/$DEV/$LPTH/changes /memory/changes && touch /memory/changes/._test1 2>/dev/null
	else
...
I guess it won't be easy to transform this into the debian initrd, but you'll never know what some magicians can do :wink:

Fred

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#2116 Post by sunburnt »

Thanks Toni & Fred; I`ll make a locale install gui with some help. Should be pretty simple.

Fred; Looks like this is the critical part of the code you posted:

Code: Select all

mount -o bind /mnt/$DEV/$LPTH/changes /memory/changes && touch /memory/changes/._test1 2>/dev/null
I assume the live-rw dir. is called "changes".? I think live-rw is better dir. name. Then 2 dirs., /live & /live-rw

A USB`s partition changes. But if boot part. is always /live/image, then /live/image/live-rw
This path can be a variable so other /partition/dir. can be mounted at boot also.
# Or is /live/image always the partition that /live is on, not the boot partition.?
I think a good setup for the installer is that the O.S. /live and it`s /live-rw dir. are always on the same partition.

# The live-rw dir. is made and then placed at the top of the union stack. So order is important.
# I think I need to see where Porteus initrd does union command and insert /live/image/live-rw

# So does this seem correct.? OR are /cow & /image bind mounts.? Want to bind to original source points.

Code: Select all

mount -o bind /live/cow /live/image/live-rw 2>/dev/null
# But I may have this backward... /live-rw in union and then bind to /cow so /cow will work.

Code: Select all

mount -o bind /live/image/live-rw /live/cow 2>/dev/null
Last edited by sunburnt on Mon 31 Mar 2014, 19:06, edited 2 times in total.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#2117 Post by fredx181 »

Terry wrote:Fred; Looks like this is the critical part of the code you posted:
Code:
mount -o bind /mnt/$DEV/$LPTH/changes /memory/changes && touch /memory/changes/._test1 2>/dev/null
......
So does this seem correct.? OR are /cow & /image bind mounts.? Want to bind to original source points.
Code:
mount -o bind /live/cow /live/image/live-rw 2>/dev/null
I wish I could really help but do no not have enough knowledge on this.
But I *think* that:

Code: Select all

mount -o bind /mnt/$DEV/$LPTH/changes
Stands for the mounted path on the storage media e.g. /mnt/sda1/<somefolder>/changes.
So could be /mnt/sda1/live/changes.
And the second part "/memory/changes" is probably comparable with /live/cow.
Note that the linuxrc script is AFAIK executed from standing in mounted /mnt/live/.
So "/memory/changes" is in fact "/mnt/live//memory/changes"
Still following me? :)
So *if* thats all right it would be e.g.:

Code: Select all

mount -o bind  /mnt/sda1/live/changes /live/cow
Or change the name "changes" to something-else maybe. (but need to do mkdir /path/to/something-else then)
# But I may have this backward... /live-rw in union and then bind to /cow so /cow will work.
Code:
mount -o bind /live/image/live-rw /live/cow 2>/dev/null
Yes, this should be in the right direction.
Fred

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#2118 Post by sunburnt »

Fred; I extracted initrd2.img ( Is this the Porteus file.? ). It`s not an xz archive, initrd.xz
# I only see the "init" file, and find . -name linuxrc does not find the file.

# In /live there are only the 2 dirs.
"mount" command shows /live/cow is original mount point not a bind mount.

Code: Select all

/dev/loop4 on /live/cow type ext2 (rw,noatime,errors=continue,user_xattr,acl)
So I think you`re right, to make /live/cow work, we would have to do:

Code: Select all

mount -o bind /live/image/live-rw /live/cow 2>/dev/null
# Or perhaps /live/cow just be a link to /live/image/live-rw
And then /live/cow would get placed in the union as it normally does.

# As usual we can`t get info. from Aufs about it`s union layers. UnionFS did this.
.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#2119 Post by fredx181 »

Terry wrote:Fred; I extracted initrd2.img ( Is this the Porteus file.? ). It`s not an xz archive, initrd.xz
# I only see the "init" file, and find . -name linuxrc does not find the file.
No you need the initrd.xz, it's on any iso with the name porteus in it on Toni's site.

In linuxrc there's also this:

Code: Select all

# Setup aufs:
echo $i"creating live filesystem and inserting modules"
mount -t aufs -o nowarn_perm,xino=/memory/xino/.aufs.xino,br:/memory/changes=rw aufs /union
Might be needed also.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#2120 Post by sunburnt »

Okay, I need to download an iso.
The "mount -t aufs" line is the actual union command.
But I don`t know about /memory , maybe it`s unique to Porteus.

Wheezy boot scripts are a maze of function calls to many other scripts.
It`s damn hard to tell if you`re coming or going...
# I see in /lib/live/boot/9990-misc-helpers.sh the actual union command(s).

# My hope is to make a script to add to DebDog to do a /live-rw dir.
And at the same time add-in a fsck for the O.S. & /live-rw partition.

### BUT... Maybe Wheezy already does this, I see code, but I`m not sure.
I`ll see if I can get an answer from the guys a the Debian sites.
.
Last edited by sunburnt on Tue 01 Apr 2014, 17:42, edited 1 time in total.

Post Reply