Light-Debian-Core-Live-CD-Wheezy + Porteus-Wheezy
Hi Toni, All,
I've been been working lately on improving apt2sfs.
My main goals were:
- Leave the save directory (e.g. /live/cow) in the same state as it was before running apt2sfs (except for the files created by 'apt-get update').
- Make it possible to interrupt the script without leaving dpkg in broken state (and restore save directory to previous state).(using 'trap' command)
(in case of pressing Ctrl+C or clicking 'cancel' during install process).
- Make it possible to: not need to run it with a clean savefile (in contrary with older apt2sfs), this way the module created has all required dependencies included, no matter what's already installed in save file/folder.
To accomplish these I needed to drop the 'uninstalling' part at the end (see below).
The way it works is different compared to older apt2sfs:
Instead of uninstalling the packages at the end by apt-get it will just remove the installed files (watched by inotifywait) from the save folder. But excluding the files that were already present in there.
The script makes dpkg got 'fooled' by copying the 'available' and 'status' files in var/lib/dpkg from the main (mounted) module, this way dpkg doesn't 'know' about what's installed in the save directory; for live-boot: /live/cow or for porteus-boot: /mnt/live/memory/changes.
At the end the 'available' and 'status' files are moved back (from a backup previously made (availableold, statusold and also directory 'info' > infoold).
Other changes:
- Increased number of 'max_user_watches' for inotifywait, in case of very large save file/folder.
- Changed way of checking network connection (was sometimes wrong in saying there's no connection).
- As mentioned above the script can be interrupted without breaking dpkg.
- Progress bar while copying files to working directory.
Toni, I like to replace previous apt2sfs with this one but I'd like you to agree with it, can you test from time to time and share suggestions/opinion? No hurry, as it will probably take a while before next iso release.
Attached apt2sfs-new.tar.gz
EDIT: re-uploaded with small, but possibly useful addition:
For example I made a module from changes and didn't disable dpkg registration.
So I load '02-changes.squashfs' everytime at boot.
Then there's more then one module containing 'status' and 'available' in var/lib/dpkg.
In such a case only there's choice now from which module these registration files will be used as starting point for installing by apt2sfs.
So in case there's only one found the list will not show.
See screenshot below.
Fred
I've been been working lately on improving apt2sfs.
My main goals were:
- Leave the save directory (e.g. /live/cow) in the same state as it was before running apt2sfs (except for the files created by 'apt-get update').
- Make it possible to interrupt the script without leaving dpkg in broken state (and restore save directory to previous state).(using 'trap' command)
(in case of pressing Ctrl+C or clicking 'cancel' during install process).
- Make it possible to: not need to run it with a clean savefile (in contrary with older apt2sfs), this way the module created has all required dependencies included, no matter what's already installed in save file/folder.
To accomplish these I needed to drop the 'uninstalling' part at the end (see below).
The way it works is different compared to older apt2sfs:
Instead of uninstalling the packages at the end by apt-get it will just remove the installed files (watched by inotifywait) from the save folder. But excluding the files that were already present in there.
The script makes dpkg got 'fooled' by copying the 'available' and 'status' files in var/lib/dpkg from the main (mounted) module, this way dpkg doesn't 'know' about what's installed in the save directory; for live-boot: /live/cow or for porteus-boot: /mnt/live/memory/changes.
At the end the 'available' and 'status' files are moved back (from a backup previously made (availableold, statusold and also directory 'info' > infoold).
Other changes:
- Increased number of 'max_user_watches' for inotifywait, in case of very large save file/folder.
- Changed way of checking network connection (was sometimes wrong in saying there's no connection).
- As mentioned above the script can be interrupted without breaking dpkg.
- Progress bar while copying files to working directory.
Toni, I like to replace previous apt2sfs with this one but I'd like you to agree with it, can you test from time to time and share suggestions/opinion? No hurry, as it will probably take a while before next iso release.
Attached apt2sfs-new.tar.gz
EDIT: re-uploaded with small, but possibly useful addition:
For example I made a module from changes and didn't disable dpkg registration.
So I load '02-changes.squashfs' everytime at boot.
Then there's more then one module containing 'status' and 'available' in var/lib/dpkg.
In such a case only there's choice now from which module these registration files will be used as starting point for installing by apt2sfs.
So in case there's only one found the list will not show.
See screenshot below.
Fred
- Attachments
-
- dpkg-status-choice.png
- Choice from which module to use 'status' and 'available' files.
- (34.24 KiB) Downloaded 495 times
-
- apt2sfs-new.tar.gz
- New! new apt2sfs
- (5.28 KiB) Downloaded 276 times
Last edited by fredx181 on Wed 10 Sep 2014, 16:22, edited 3 times in total.
Thank you, Fred!
I will use only the new version from now. Uploaded here also:
http://www.smokey01.com/saintless/Debia ... new.tar.gz
If you like to update the iso versions soon I do not have a problem, but I think we have only few fixes and the system works stable. Maybe something more will be found for fixing in the next month.
Anytime you say we can start rebuilding the modules with changes, but my opinion is we better wait and test more.
Toni
I will use only the new version from now. Uploaded here also:
http://www.smokey01.com/saintless/Debia ... new.tar.gz
If you like to update the iso versions soon I do not have a problem, but I think we have only few fixes and the system works stable. Maybe something more will be found for fixing in the next month.
Anytime you say we can start rebuilding the modules with changes, but my opinion is we better wait and test more.
Toni
Hi Toni,
Fred
Ok, but how can you know so quickly, don't trust me blindlyI will use only the new version from now. Uploaded here also:
http://www.smokey01.com/saintless/Debia ... new.tar.gz
Yes, let's just wait a while.Anytime you say we can start rebuilding the modules with changes, but my opinion is we better wait and test more.
Fred
I don't, but reading your changes the script is too complicated for me now. I hope as official fix more people will test it and confirm it works well... Or if it doesn't work well I can easy blame you...fredx181 wrote:Ok, but how can you know so quickly, don't trust me blindly
Just kidding... lets hope more people will test it.
Toni
I see, maybe you PM me a secret message one day about how bad it workssaintless wrote:I don't, but reading your changes the script is too complicated for me now. I hope as official fix more people will test it and confirm it works well... Or if it doesn't work well I can easy blame you...fredx181 wrote:Ok, but how can you know so quickly, don't trust me blindly
Just kidding... lets hope more people will test it.
Toni
Fred
Last edited by fredx181 on Tue 09 Sep 2014, 20:35, edited 1 time in total.
Ah, great, just for fun to know maybe:More testing needed but it works well from the first run for me and it is good sign Smile
You could even install package(s) normally with apt-get (so these are then part of savefile) and after that create module with apt2sfs-new using exactly the same package(s), it wouldn't interfere with each other.
Fred
Worked for me. Did libreoffice. Used latest xfce version with 3.14 kernel with some squashfs files and /changes folder.saintless wrote:Thank you, Fred!
I will use only the new version from now. Uploaded here also:
http://www.smokey01.com/saintless/Debia ... new.tar.gz
If you like to update the iso versions soon I do not have a problem, but I think we have only few fixes and the system works stable. Maybe something more will be found for fixing in the next month.
Anytime you say we can start rebuilding the modules with changes, but my opinion is we better wait and test more.
Toni
This will make things a lot easier, I can get rid of my extra empty install that was just for creating squashfs files.
Dan
Hi, Fred.
Tested to install imagemagick and then create module with apt2sfs-new and it works well. Already installed imagemagick is still there and working and new created imagemagick.sfs also works.
I was thinking what is going to happen if the user renames 01-filesystem.squashfs but I see you already fixed this with MOD= parameter and it works in Squeeze and Wheezy version.
I feel your script is now smarter than me. Be careful not to make it smarter than you at some point
Great job, Fred! I will test it more and post the results in the next days.
I suggest we keep the old version included without menu entry. Maybe renamed apt2sfs-old and started from terminal only option.
Toni
Tested to install imagemagick and then create module with apt2sfs-new and it works well. Already installed imagemagick is still there and working and new created imagemagick.sfs also works.
I was thinking what is going to happen if the user renames 01-filesystem.squashfs but I see you already fixed this with MOD= parameter and it works in Squeeze and Wheezy version.
I feel your script is now smarter than me. Be careful not to make it smarter than you at some point
Great job, Fred! I will test it more and post the results in the next days.
I suggest we keep the old version included without menu entry. Maybe renamed apt2sfs-old and started from terminal only option.
Toni
Hi Toni, Dan,
Yes, it seems to be waterproof in fooling dpkg
Excuse me for trying to be to smart, I made little extra addition to it, see here, edited and re-uploaded:
http://murga-linux.com/puppy/viewtopic. ... 691#798691
Edit: I totally forgot btw to test with live-boot v3, it may not work.
Maybe it does , does it have symlink to /live/cow?, long time since I used it, can't remember.
From what I remember is that there was something wrong with the order of modules anyway.
Edit2: I'd like to file a bug.....
Does the DebianDog team not support live-boot v3 anymore?
Seriously: Ok, I don't mind but shouldn't this be documented? (sorry if I possibly missed something)
Just tried using RemasterCow booting with v3 and it failed.
Looks like we forgot thinking about it.
Should we try to make things work or just drop it, that's the question.
Edit3: Sorry, see next post from Toni for the information about live-boot v3 workarounds.
Fred
Thanks for testing, Dan!Dancytron wrote:Worked for me. Did libreoffice. Used latest xfce version with 3.14 kernel with some squashfs files and /changes folder.
Toni wrote:I feel your script is now smarter than me. Be careful not to make it smarter than you at some point Smile
Yes, it seems to be waterproof in fooling dpkg
Excuse me for trying to be to smart, I made little extra addition to it, see here, edited and re-uploaded:
http://murga-linux.com/puppy/viewtopic. ... 691#798691
Edit: I totally forgot btw to test with live-boot v3, it may not work.
Maybe it does , does it have symlink to /live/cow?, long time since I used it, can't remember.
From what I remember is that there was something wrong with the order of modules anyway.
Edit2: I'd like to file a bug.....
Does the DebianDog team not support live-boot v3 anymore?
Seriously: Ok, I don't mind but shouldn't this be documented? (sorry if I possibly missed something)
Just tried using RemasterCow booting with v3 and it failed.
Looks like we forgot thinking about it.
Should we try to make things work or just drop it, that's the question.
Edit3: Sorry, see next post from Toni for the information about live-boot v3 workarounds.
Fred
Last edited by fredx181 on Wed 10 Sep 2014, 18:35, edited 2 times in total.
We should make some backports repo with yours and William's never ending improvements, Fred
The information is in this post:
http://murga-linux.com/puppy/viewtopic. ... 457#774457
I assume using any of the boot methods will be after reading the post for each boot method. Otherwise we will answer when needed. This is the part for /live/cow:
Originally I needed them for installing new kernel and making new initrd files instruction.
Toni
With live-boot-3x /live/cow (and /live/image) locations are not static and can't be automated easy. The links depend on persistent or no persistent (and what type of persistent - save file or save partition). We have 3 scripts to run from terminal but I do not see them in OpenBox version inside /opt/bin. They worked fine creating /live/cow and /live/image with the original initrd.img, but with the patched initrd.img the link for /live/image is not correct anymore. Anyway /live/cow is correct with original and patched initrd.img.fredx181 wrote:Edit: I totally forgot btw to test with live-boot v3, it may not work.
Maybe it does , does it have symlink to /live/cow?, long time since I used it, can't remember.
From what I remember is that there was something wrong with the order of modules anyway.
The information is in this post:
http://murga-linux.com/puppy/viewtopic. ... 457#774457
I assume using any of the boot methods will be after reading the post for each boot method. Otherwise we will answer when needed. This is the part for /live/cow:
You can find the scripts in Jwm version /opt/bin or in this post: direct downloadTo use RemasterCow with live-boot3x type in terminal one of the options depending what kind of persistence or no persistence you use (all work well with official initrd.img). With the patched initrd.img /live/image may not point the right location and may need manually creating the link /live/image to /lib/live/mount/persistence/sdX instead /lib/live/mount/medium, but /live/cow is created proper and /live/cow is the important link for RemasterCow to work:
cow-nosave - creates /live/cow option (symlink) for live-boot-3x no-persistence
cow-safe-file - creates /live/cow options (symlink) for live-boot-3x with persistence save file.
cow-save-part - creates /live/cow option (symlink) for live-boot-3x with persistence partition.
Originally I needed them for installing new kernel and making new initrd files instruction.
Toni
Hi Toni, All,
---------------------------------------------
Edit: Should have thought about it before: to have the boot parameter exactly the same as when using systemd with live-boot, It's changed now to "init=/bin/systemd"
New revision uploaded:
https://googledrive.com/host/0ByBgCDlZZ ... emd.tar.gz
---------------------------------------------
Original post but with edited parameter: "init=/bin/systemd" (was: "systemd")
---------------------------------------------
Here's a more solid way to enable systemd for porteus-boot instead of what I wrote here:
http://murga-linux.com/puppy/viewtopic. ... 672#792672
Only for porteus-boot method.
Enable systemd using patched initrd1.xz (kernel 3.2.0-4-486), it's here:
https://googledrive.com/host/0ByBgCDlZZ ... emd.tar.gz
by adding "init=/bin/systemd" parameter to your kernel boot line like this:
The steps:
In terminal:
Installing also the 'systemd-sysv' package will make it permanent (by not installing it you'll be still able to use the old initscripts when not using 'init=/bin/systemd' parameter)
To enable autologin for user root, run in terminal:
Then reboot and systemd should be enabled if you added the 'init=/bin/systemd' parameter.
More info about what's changed to make init=/bin/systemd parameter work in the ReadMe-enable-systemd inside initrd1.xz-systemd.tar.gz.
Note: Uninstalling systemd afterwards may give a problem.
If apt-get refuses to uninstall it, best thing to do then is:
Then reboot without 'init=/bin/systemd' parameter added.
Then you should be able to uninstall systemd because it's not running anymore.
Fred
---------------------------------------------
Edit: Should have thought about it before: to have the boot parameter exactly the same as when using systemd with live-boot, It's changed now to "init=/bin/systemd"
New revision uploaded:
https://googledrive.com/host/0ByBgCDlZZ ... emd.tar.gz
---------------------------------------------
Original post but with edited parameter: "init=/bin/systemd" (was: "systemd")
---------------------------------------------
Here's a more solid way to enable systemd for porteus-boot instead of what I wrote here:
http://murga-linux.com/puppy/viewtopic. ... 672#792672
Only for porteus-boot method.
Enable systemd using patched initrd1.xz (kernel 3.2.0-4-486), it's here:
https://googledrive.com/host/0ByBgCDlZZ ... emd.tar.gz
by adding "init=/bin/systemd" parameter to your kernel boot line like this:
Code: Select all
kernel /live/vmlinuz1 noauto from=/ changes=/live/changes.dat init=/bin/systemd
In terminal:
Code: Select all
apt-get update # if needed
apt-get install systemd
To enable autologin for user root, run in terminal:
Code: Select all
# Set ExecStart to autologin as root (inittab doesn't work anymore under systemd)
EXESTART=`cat /etc/systemd/system/getty.target.wants/getty@tty1.service | grep 'ExecStart='`
EXESTARTNEW="ExecStart=-/sbin/agetty --noclear -a root %I 38400"
sed -i "s,$EXESTART,$EXESTARTNEW,g" /etc/systemd/system/getty.target.wants/getty@tty1.service
More info about what's changed to make init=/bin/systemd parameter work in the ReadMe-enable-systemd inside initrd1.xz-systemd.tar.gz.
Note: Uninstalling systemd afterwards may give a problem.
If apt-get refuses to uninstall it, best thing to do then is:
Code: Select all
apt-get install sysvinit # if it isn't already installed
Then you should be able to uninstall systemd because it's not running anymore.
Fred
Last edited by fredx181 on Sat 13 Sep 2014, 09:32, edited 1 time in total.
Thank you, Fred!
Uploaded here also:
http://www.smokey01.com/saintless/Debia ... emd.tar.gz
I think in some point this information should go in HowTo thread. I guess you do not mean to replace initrd1.xz inside the iso with the one patched for systemd? It will be an option for separate download in case it is needed or initrd1.xz replacement suggestion?
Link to your last systemd post added here at the end of the post to find it easy when we need:
http://murga-linux.com/puppy/viewtopic. ... 368#776368
Still can't find anything wrong with apt2sfs-new. Works well for me.
Toni
Uploaded here also:
http://www.smokey01.com/saintless/Debia ... emd.tar.gz
I think in some point this information should go in HowTo thread. I guess you do not mean to replace initrd1.xz inside the iso with the one patched for systemd? It will be an option for separate download in case it is needed or initrd1.xz replacement suggestion?
Link to your last systemd post added here at the end of the post to find it easy when we need:
http://murga-linux.com/puppy/viewtopic. ... 368#776368
Still can't find anything wrong with apt2sfs-new. Works well for me.
Toni
Hi Toni,
Yes, well, maybe you could add link to my post in your systemd howto section?
Btw, the commands for enabling autologin work for live-boot also, as well as the note about possible uninstall problem.
If parameter 'systemd' is not added it will just work the same as before.
And even when 'systemd' is added by mistake (in case of when systemd is not installed) it will just boot normally with initscripts (only gives message about not finding systemd).
If we do replace it's good to document it as extra cheatcode in the section about porteus-boot.
Fred
Thanks!Uploaded here also:
http://www.smokey01.com/saintless/Debia ... emd.tar.gz
I think in some point this information should go in HowTo thread.
Yes, well, maybe you could add link to my post in your systemd howto section?
Btw, the commands for enabling autologin work for live-boot also, as well as the note about possible uninstall problem.
I don't see any harm in replacing the one inside the iso with the patched version.I guess you do not mean to replace initrd1.xz inside the iso with the one patched for systemd? It will be an option for separate download in case it is needed or initrd1.xz replacement suggestion?
If parameter 'systemd' is not added it will just work the same as before.
And even when 'systemd' is added by mistake (in case of when systemd is not installed) it will just boot normally with initscripts (only gives message about not finding systemd).
If we do replace it's good to document it as extra cheatcode in the section about porteus-boot.
Ha!, great!Still can't find anything wrong with apt2sfs-new. Works well for me.
Fred
Hi Toni, Fred et al,
Me too have been thinking about systemd lately, and my research shows, in Debian-Live Wheezy it seems to have some rough edges.
Look here ==>
https://lists.debian.org/debian-live/20 ... 00028.html
and here ==>
http://forums.debian.net/viewtopic.php?f=5&t=115832
and the version is still the same
Package: live-config-systemd (3.0.23-1)
https://packages.debian.org/wheezy/live-config-systemd
Not a big deal, though, just borrow it from Jessy.
Package: live-config-systemd (4.0.0-1)
https://packages.debian.org/jessie/live-config-systemd
Me too have been thinking about systemd lately, and my research shows, in Debian-Live Wheezy it seems to have some rough edges.
Look here ==>
https://lists.debian.org/debian-live/20 ... 00028.html
and here ==>
http://forums.debian.net/viewtopic.php?f=5&t=115832
and the version is still the same
Package: live-config-systemd (3.0.23-1)
https://packages.debian.org/wheezy/live-config-systemd
Not a big deal, though, just borrow it from Jessy.
Package: live-config-systemd (4.0.0-1)
https://packages.debian.org/jessie/live-config-systemd
Hi, Fred, Anikin, All...
http://murga-linux.com/puppy/viewtopic. ... 990#777990
I will add systemd-initrd for porteus boot for changes in the next version.
This means also repacking all separate kernel modules the same way I guess?
The post with porteus boot options we will change when next version is available for download.
I still think we should leave systemd as optional package for download and install from the user. It is difficult enough for the user to choose boot method now. Adding systemd in the iso makes the boot choice more difficult. Also more difficult for us - since almost nobody gives the exact boot details when a problem is reported.
Toni
Added here, Fred:fredx181 wrote:Yes, well, maybe you could add link to my post in your systemd howto section?
http://murga-linux.com/puppy/viewtopic. ... 990#777990
I will add systemd-initrd for porteus boot for changes in the next version.
This means also repacking all separate kernel modules the same way I guess?
The post with porteus boot options we will change when next version is available for download.
I prefer not to change standard debian systemd boot method with alternative methods unless there is a good reason to do it.Btw, the commands for enabling autologin work for live-boot also, as well as the note about possible uninstall problem.
I still think we should leave systemd as optional package for download and install from the user. It is difficult enough for the user to choose boot method now. Adding systemd in the iso makes the boot choice more difficult. Also more difficult for us - since almost nobody gives the exact boot details when a problem is reported.
Toni
Well, I'd suggest not, we can do it in the future maybe, just leave it only for kernel 3.2.0-4-486 for the time being IMHO but tell me if you'd like it different.Toni wrote:I will add systemd-initrd for porteus boot for changes in the next version.
This means also repacking all separate kernel modules the same way I guess?
One of the reasons I say is that I had problems with other kernels than 3.2.0-4-486 to make transition to systemd smoothly (for example with Porteus-Wheezy kernel 3.13.6 I had to tweak a lot).
From what I tested: With the 3.2.0-4-486 kernel systemd "takes over" all the original init scripts very well.
It could be just given as information/option, not as a standard.Quote:
Btw, the commands for enabling autologin work for live-boot also, as well as the note about possible uninstall problem.
I prefer not to change standard debian systemd boot method with alternative methods unless there is a good reason to do it.
Edit: To be more clear, changing /etc/inittab for autologin (as we have now) is not standard Debian also.
Yes, I agree.I still think we should leave systemd as optional package for download and install from the user. It is difficult enough for the user to choose boot method now. Adding systemd in the iso makes the boot choice more difficult.
Fred
Hi, Fred.
What good reason or advantage do we offer for live-boot by suggesting alternative systemd boot since the official debian method is working fine and is well documented in Debian sites and forums?
Toni
Yes, better to keep it only for 3.2.0-486 kernel then.fredx181 wrote:Well, I'd suggest not, we can do it in the future maybe, just leave it only for kernel 3.2.0-4-486 for the time being IMHO but tell me if you'd like it different.
One of the reasons I say is that I had problems with other kernels than 3.2.0-4-486 to make transition to systemd smoothly (for example with Porteus-Wheezy kernel 3.13.6 I had to tweak a lot).
From what I tested: With the 3.2.0-4-486 kernel systemd "takes over" all the original init scripts very well.
There is a good reason for it - we can't autologin other way without using login display manager and especially with xdm without changing inittab.Edit: To be more clear, changing /etc/inittab for autologin (as we have now) is not standard Debian also.
What good reason or advantage do we offer for live-boot by suggesting alternative systemd boot since the official debian method is working fine and is well documented in Debian sites and forums?
Toni