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 Tue 02 Sep 2014, 23:19
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Build scripts for small debian live images (similar to woof)
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 6 of 9 [132 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Author Message
saintless


Joined: 11 Jun 2011
Posts: 2377
Location: Bulgaria

PostPosted: Sun 16 Feb 2014, 14:19    Post subject:  

Hi, Anikin.
anikin wrote:
I actually hoped that COW will allow me to capture a snapshot of the running system (like ro1, ro2 in Puppy). Is that possible?

Yes, it is easy. Just use for example:
Code:
mksquashfs /live/cow /live/image/live/02-my-snapshot.squashfs

Fred made a special script named remastercow for light and porteus wheezy. It is included in /opt/bin and does also proper cleaning from GUI. It needs yad installed to work on Cat from GUI but I think it will be easy to make CLI script to do it or to install yad and test it. Download link in archive (look at remastercow one):
http://www.smokey01.com/saintless/Fredx181/remaster.tar.gz
I'm sure Emil also wrote about similar script keep.sh but haven't test it yet.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
konaexpress

Joined: 13 Oct 2011
Posts: 73

PostPosted: Sun 16 Feb 2014, 15:34    Post subject:  

Instead of yad, just use BaCon. Way less to install.

John
Back to top
View user's profile Send private message 
anikin

Joined: 10 May 2012
Posts: 461

PostPosted: Mon 17 Feb 2014, 06:46    Post subject: Re: Office CAT with Libreoffice and other goodies
Subject description: Version CAT-041
 

Hi emil,
emil wrote:
I updated the first post
Download build scripts: CAT-scripts-0.41.tar.gz (6,7 MB)

hope you like it...
Using your CAT-scripts-0.41, I built a SID CAT.
I removed some items from the scripts, made the build JWM based, added geany ... and now posting this from my own, self-crafted OS.
Code:
user@debian:~$ sudo -i
root@debian:~# uname -a
Linux debian 3.12-1-686-pae #1 SMP Debian 3.12.9-1 (2014-02-01) i686 GNU/Linux
root@debian:~#

Not everything worked out as expected, namely, nodm doesn't work, which I tend to blame on the hook, geany and some other added items didn't install. However, for a first go, the end result is excellent.

Thank you.
Back to top
View user's profile Send private message 
emil

Joined: 10 Nov 2009
Posts: 616
Location: Austria

PostPosted: Mon 17 Feb 2014, 07:03    Post subject:  

Quote:
I built a SID CAT


Wow, congrats!
could you describe how nodm failed? From your post I see you are loged in as user - Do you have the old version of the hook, where the autologin is set to user in the /etc/default/nodm file?

I also wonder about packages failing to install. If they are in the repos of the sid distribution they should be found...

I would be very curious about any new modifications and also about testing persistence with the modifications Toni suggested or setting full persistence with
Code:
/ union
.
in persistence.conf

cheers
emil
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 616
Location: Austria

PostPosted: Mon 17 Feb 2014, 07:10    Post subject:  

In the meantime I build a squeeze CAT and then tried to run the scripts from the squeeze distribution, which will use the live build 2.xx version.

Although the scripts ran for a great part they failed somewhere in the middle, so it will not be possible to use them OOB to create CAT versions with the old persistence mechanism (live-rw, home-rw). But it was worth a try...
Back to top
View user's profile Send private message Visit poster's website 
anikin

Joined: 10 May 2012
Posts: 461

PostPosted: Mon 17 Feb 2014, 07:51    Post subject:  

emil wrote:
could you describe how nodm failed? From your post I see you are loged in as user - Do you have the old version of the hook, where the autologin is set to user in the /etc/default/nodm file?

Somewhere closer to the end of the build, there was a message like "no run level operations are allowed" - that must be nodm hook, I thought. The first boot was to user, I shutdown, unsquashed the build, set nodm to root, like I did the first time, resquashed ... and booted again to user.
emil wrote:
I also wonder about packages failing to install. If they are in the repos of the sid distribution they should be found...

The packages are in the repo, I added geany via apt-get, version 1.23.1 - typing this in it.
emil wrote:
I would be very curious about any new modifications and also about testing persistence with the modifications Toni suggested or setting full persistence with
Code:
/ union
.
in persistence.conf

I'm going to ask saintless for help via PM, as I don't quite understand this persistence stuff in Debian Live and don't want to sidetrack the threads. All I need is to run without a save file, remastering the main squashfs like I do in Puppy.
I will do some more builds, later on and will share the result.
Back to top
View user's profile Send private message 
saintless


Joined: 11 Jun 2011
Posts: 2377
Location: Bulgaria

PostPosted: Mon 17 Feb 2014, 09:01    Post subject:  

emil wrote:
I would be very curious about any new modifications and also about testing persistence with the modifications Toni suggested or setting full persistence with
Code:
/ union
.
in persistence.conf

Hi, Emil, Anikin and anyone interested testing full persistence.

Here is archive with 1 Gb save file with lib_link symlink to /lib included and persistence.conf with the content from my example post:
http://www.smokey01.com/saintless/01-Gb-persistence-lib_link.tar.gz
/lib_link symlink to /lib is inside the save file and will work.
Extract it and add persistence to kernel boot line.
Note it has to be extracted on different partition.The boot partition is mounted read-only and will not load persistence file from boot partition.
Test it with more than one squashfs module loaded. Install for example one program and create second module:
Code:
mksquashfs /live/cow /live/image/live/02.squashfs

Then reboot with 01 and 02 squashfs modules in /live using persistence file.
If /var/lib/dpkg/status file has information for the new installed program in 02.squashfs after boot everything is ok.
You can check status file with text editor or with:
Code:
apt-get purge my-new-installed-program-name

Then create file or folder in /lib and see if it is there after reboot. If it is full persistence is working.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
emil

Joined: 10 Nov 2009
Posts: 616
Location: Austria

PostPosted: Mon 17 Feb 2014, 09:47    Post subject:  

Hi saintless,

you are helpful and resourceful as always. I will test it.
I saw a post from William at the Debian-light-wheezy thread, that it is possible to label the persistence file (-L persistence) and add a line to grub so that it will be entered in the partition table. This would allow to have the persistence file on the same partition than the frugal install (lib/live folder).

Quote:
Code:
Code:
title DebianDog on /dev/sda1
  partnew (hd0,3) 0x0 (hd0,2)/live-rw
  kernel (hd0,2)/live/vmlinuz1 boot=live config persistent quickreboot noprompt autologin
  initrd (hd0,2)/live/initrd1.img



This is noteworthy because it will work on NTFS partions too and I can remember sometimes ago we had endless debates about that 'frugal install on NTFS'.

It seems all a bit overcomplicated to me, also I quite don't understand how to completely change naming schemes (from live-rw, home-rw), but the debian live guys probably had their reasons and maybe we will find out how one could use all those new nifty features.
so sudo su, cats and dogs
emil
Back to top
View user's profile Send private message Visit poster's website 
saintless


Joined: 11 Jun 2011
Posts: 2377
Location: Bulgaria

PostPosted: Mon 17 Feb 2014, 10:32    Post subject:  

Hi, Emil.
Yes, I remeber the NTFS persistent file discussion Smile
For me the best way if the computer have enough RAM is to use toram=01-filesystem.squashfs to copy the main module in RAM.
With RAM 512 Mb or more and squashfs module 100-200 Mb it is the best and save way to get persistent on NTFS partition.
William found different way to boot frugal from NTFS partition but it needs another partition to point to the NTFS one. This new partition can be very small or with no size from what I understood but second partition is needed. This makes esier to use another partition or toram option.

Toni
Back to top
View user's profile Send private message MSN Messenger 
mcewanw

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

PostPosted: Mon 17 Feb 2014, 18:17    Post subject:  

saintless wrote:

William found different way to boot frugal from NTFS partition but it needs another partition to point to the NTFS one. This new partition can be very small or with no size from what I understood.


Yes, it is zero size, because it is not really that you need another partition, just another free partition table entry (any free partition table entry will do).

Code:
title DebianDog on /dev/sda1
  partnew (hd0,1) 0x0 (hd0,0)/mydebian-rw
  kernel (hd0,0)/live/vmlinuz1 boot=live config persistent quickreboot noprompt autologin
  initrd (hd0,0)/live/initrd1.img


In the above example, the live file is renamed mydebian-rw and it is stored on /dev/sda1. The second partition wasn't being used, so the partition table entry hd0,1 is being pointed to the live file mydebian-rw on hd0,0 (i.e. /dev/sda1).

Regarding the live file name, the trick here is however that the live file named mydebian-rw still has to be given the VOLUME LABEL "live-rw" when using saintless's cow type method or "persistence" when using Debian standard live Wheezy method. So with this partition 'redirection' method, you can store the live file on ntfs if you want and rename it to any file name you wish. If the file is ext2 type then you can change its volume label with e2label command. The volume label is essential when storing live file on ntfs or Debian can't find it anyway.

Notes: I actually created a zero sized partition to make sure I had that extra partition table entry - that may not be necessary (but it is very important you really aren't already using the partition for something). The ntfs disk I did this was completely allocated by its existing 3 partitions, so the 4th partition was purely a dummy one of no size. In practice, it is probably usually more sensible to use hd0,3 as the empty partition entry, since you might later want to use partition hd0,1 and hd0,2 for extra partitions. I haven't tested to see if logical/extended partition entry could be used though I see no reason why not.

Note that there is a mistake in title (mine) in the grub4dos menu.lst stanza emil quoted a few posts up for (hd0,2). In that example, I was booting from /dev/sda3 (not /dev/sda1), which I've now fixed in my original post. The new example, in this post, is for live file stored on /dev/sda1

_________________
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 
anikin

Joined: 10 May 2012
Posts: 461

PostPosted: Tue 18 Feb 2014, 13:25    Post subject:  

Hi emil,

I've come across this script (20nodm_sid.sh), that crunchbang uses for nodm:
Code:
#!/bin/sh

# This is a hook for live-helper(7) to install nodm and remove gdm in squeeze/sid.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.

apt-get autoremove --yes gdm --purge
apt-get install --yes nodm --force-yes

Do you think it's a good idea to remove gdm, prior to installing nodm?
If yes, where exactly should I put this "apt-get autoremove --yes gdm --purge" line?

One more, this one is from CAT-scripts-0.41/modules/jwm:
Code:
#!/bin/bash

#
#*****************************************************************************
#   Copyright (C) 2012 Thierry Monteil <sage-debian-live!lma.metelu.net>
#
#  Distributed under the terms of the GNU General Public License (GPL)
#  as published by the Free Software Foundation; either version 2 of
#  the License, or (at your option) any later version.
#                  http://www.gnu.org/licenses/
#*****************************************************************************
#
# This is a hook script allows to start nodm at startup.

sed -i 's/^NODM_ENABLED.*/NODM_ENABLED=true/g' /etc/default/nodm
sed -i 's/^NODM_USER.*/NODM_USER=user/g' /etc/default/nodm

shouldn't it be "NODM_USER=root"?

And the last one. I would like to use your original build scripts in the future, taking what I like from CAT and customize them to my needs. Am I correct in thinking, that the underlying code in both scripts has remained unchanged, you only added new modules to CAT?

Thank you in advance.
Back to top
View user's profile Send private message 
emil

Joined: 10 Nov 2009
Posts: 616
Location: Austria

PostPosted: Wed 19 Feb 2014, 02:28    Post subject:  

Hi anikin,
I think we dont need the line to remove gdm, because it is not installed by the scripts. We also don't need the install nodm line, because package installation is managed over the modules in the script.

If you want default root login, then replace user with root in the hook (or probably comment the line will also work). I havent tried to use graphical login managers, e.g. xdm instead of nodm. I think it would also work, and you get a a graphical login screen.

The scripts were not changed in principle between the 2 versions, if you copy modules from the 2nd version to the 1st it should mostly work, although be prepared to fix the occasional bug.

Last edited by emil on Wed 19 Feb 2014, 13:18; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 616
Location: Austria

PostPosted: Wed 19 Feb 2014, 10:55    Post subject: persistence  

After some testing I found the configuration

Code:
/ union


in persistence.conf works for me and the overlay then works similar to puppy savefile.
In my build the package pciutils is missing for configuration of wifi, I will include this in my next builds, however those will not happen in the near future. In the meantime I have a working system and I will do some slow testing.
Have fun Cool
emil
Back to top
View user's profile Send private message Visit poster's website 
wibble


Joined: 10 Jul 2013
Posts: 77

PostPosted: Thu 20 Feb 2014, 09:22    Post subject:  

can I ask how would I install this on a microsd? is there a command line option i can use from puppy/tool or will I need to use windows?
Back to top
View user's profile Send private message 
emil

Joined: 10 Nov 2009
Posts: 616
Location: Austria

PostPosted: Thu 20 Feb 2014, 15:43    Post subject:  

http://www.debian.org/releases/stable/i386/ch04s03.html.en

might be as easy as to do
Code:
cp debian.iso /dev/sdX
sync


this will overwrite contents on the card.

There are several other possibilities, like using programs like "unetbootin" or
maybe try the method described here:

http://www.murga-linux.com/puppy/viewtopic.php?p=411105#411105
although this will need probably adaption to the debian live settings(folder live).

maybe post what worked for you, thanks in advance
emil
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 6 of 9 [132 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 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.1094s ][ Queries: 13 (0.0060s) ][ GZIP on ]