cleanup script copy update
- abelM
- Black ninja
- Posts: 50
- Joined: 22 Oct 2017, 12:35
- Distribution: Porteus v-3.2.2 64 bit
- Location: Argentina
- Contact:
cleanup script copy update
Thank you brokenman!
Could we download just the initrd.xz instead of the whole ISO file? Anyway I don't know if someone makes Porteus load the ISO at boot time
Best regards,
Could we download just the initrd.xz instead of the whole ISO file? Anyway I don't know if someone makes Porteus load the ISO at boot time
Best regards,
- Ed_P
- Contributor
- Posts: 8368
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
- abelM
- Black ninja
- Posts: 50
- Joined: 22 Oct 2017, 12:35
- Distribution: Porteus v-3.2.2 64 bit
- Location: Argentina
- Contact:
cleanup script copy update
Hi Ed, I suposed so Now I hope brokenman will upload both files -- ISO and initrd.xz -- so we can test them
cleanup script copy update
Hi abelM , your initrd.xz is located inside your /boot/syslinux folder in your Porteus media. You can uncompress and compress yourself from the terminal like @brokenman explains here -->
viewtopic.php?p=53718#p53718
Also, you can have a look at this article --> http://www.porteus.org/component/conten ... ernel.html
Once uncompressed, you can replace all ocurrences of cp -af to cp -afu in the tree like this -->
Then pack it again and give it a try
BTW: I found the article in this very forum on how to unpack/repack the initrd.xz by googleing
viewtopic.php?p=53718#p53718
Also, you can have a look at this article --> http://www.porteus.org/component/conten ... ernel.html
Once uncompressed, you can replace all ocurrences of cp -af to cp -afu in the tree like this -->
Code: Select all
find . -type f -print0 | xargs -0 sed -i 's/cp -af/cp -afu/g'
BTW: I found the article in this very forum on how to unpack/repack the initrd.xz by googleing
> Does not compute_
https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584
https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584
- abelM
- Black ninja
- Posts: 50
- Joined: 22 Oct 2017, 12:35
- Distribution: Porteus v-3.2.2 64 bit
- Location: Argentina
- Contact:
cleanup script copy update
Thanks M. Eerie!
Interesting tip indeed. However the new initrd.xz includes a version of busybox which does support cp -u. The cleanup script should also be modified I think. That's why I've asked brokenman for the initrd.xz -- and Ed for the iso file. Editing cleanup and repacking the present initrd.xz won't be effective and worse: cp will copy nothing and exit with an error message. Just to see please try
Regards
Interesting tip indeed. However the new initrd.xz includes a version of busybox which does support cp -u. The cleanup script should also be modified I think. That's why I've asked brokenman for the initrd.xz -- and Ed for the iso file. Editing cleanup and repacking the present initrd.xz won't be effective and worse: cp will copy nothing and exit with an error message. Just to see please try
Code: Select all
/mnt/live/bin/cp -afu SOURCE DEST
Last edited by abelM on 23 Nov 2017, 18:58, edited 1 time in total.
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
cleanup script copy update
I'll do my best to upload a new version tonight.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- abelM
- Black ninja
- Posts: 50
- Joined: 22 Oct 2017, 12:35
- Distribution: Porteus v-3.2.2 64 bit
- Location: Argentina
- Contact:
cleanup script copy update
Hi brokenman,
I'd like to know if there's an updated initrd.gz for downloading
Thank you!
I'd like to know if there's an updated initrd.gz for downloading
Thank you!
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
cleanup script copy update
The latest was uploaded on 20/11/2017.
It does not contain your patches.
http://brokenman.porteus.org/current/x86_64/dev/
Sorry. Forgot to add. In porteus you can mount an ISO file over the internet and just extract the initrd.xz file. Read about httpfs2.
It does not contain your patches.
http://brokenman.porteus.org/current/x86_64/dev/
Sorry. Forgot to add. In porteus you can mount an ISO file over the internet and just extract the initrd.xz file. Read about httpfs2.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- abelM
- Black ninja
- Posts: 50
- Joined: 22 Oct 2017, 12:35
- Distribution: Porteus v-3.2.2 64 bit
- Location: Argentina
- Contact:
cleanup script copy update
Nice tip. Thank you very much!
- abelM
- Black ninja
- Posts: 50
- Joined: 22 Oct 2017, 12:35
- Distribution: Porteus v-3.2.2 64 bit
- Location: Argentina
- Contact:
cleanup script copy update
Hi all,
Until we get a patched cleanup script I'm running a modified dump-session at shutdown -- bypassing cleanup. You'll find the code at direct update at dump session (Post by abelM #60431)
/mnt/live/tmp/changes-exit is removed so cleanup won't find it and will not activate its own save changes code.
Regards,
Until we get a patched cleanup script I'm running a modified dump-session at shutdown -- bypassing cleanup. You'll find the code at direct update at dump session (Post by abelM #60431)
Code: Select all
#!/bin/sh
# rc.local_shutdown
dump-session && rm -f /mnt/live/tmp/changes-exit
Regards,
- abelM
- Black ninja
- Posts: 50
- Joined: 22 Oct 2017, 12:35
- Distribution: Porteus v-3.2.2 64 bit
- Location: Argentina
- Contact:
cleanup script copy update
A small fix at direct update at dump session (Post by abelM #60573)
Last edited by abelM on 29 Nov 2017, 22:48, edited 1 time in total.
- abelM
- Black ninja
- Posts: 50
- Joined: 22 Oct 2017, 12:35
- Distribution: Porteus v-3.2.2 64 bit
- Location: Argentina
- Contact:
cleanup script copy update
I've made some small fixes you can see at direct update at dump session (Post by abelM #60653)
Regards,
Regards,
- Ed_P
- Contributor
- Posts: 8368
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
cleanup script copy update
Impressed with your attachment to the changes=EXIT process abelM.
A question I have is how come I've had to change my save.dat file size over the years from 256MB to 320 to 512 to 1GB (60+ % used) yet when I save just my changes, using a script I made, it is only 7.3MB?
I identify my changes by doing nothing for a couple of minutes, making my change, then running this script:
A question I have is how come I've had to change my save.dat file size over the years from 256MB to 320 to 512 to 1GB (60+ % used) yet when I save just my changes, using a script I made, it is only 7.3MB?
I identify my changes by doing nothing for a couple of minutes, making my change, then running this script:
Code: Select all
#!/bin/sh
# http://forum.porteus.org/viewtopic.php?f=81&t=3776#p27204
X=1
if [ ! "$1" == "" ]; then
X=$1
fi
echo " mmin = "$X
if [ `whoami` != "root" ]; then
echo -e "Enter root's password"
su -c "sh $0 $1"
exit
fi
find /mnt/live/memory/changes -iname "*" -mmin -$X
read
exit
Ed
- abelM
- Black ninja
- Posts: 50
- Joined: 22 Oct 2017, 12:35
- Distribution: Porteus v-3.2.2 64 bit
- Location: Argentina
- Contact:
cleanup script copy update
Hi Ed,
The same has been for me! I've inspected some places to find out:
BTW I've tried something like you to see recent changes -- using a different approach
This way I can see files created or modified just at the present session. I've chosen to compare with fstab for it's recreated at every boot. Resetting IFS is useful to handle files with spaces in their names.
You can also see the number of files and total size of recent changes
Regards!
The same has been for me! I've inspected some places to find out:
- Contents of my save.dat file as you can see in /mnt/live/memory/images/changes.
- Files under /mnt/live/memory/changes
- Folders included and excluded in /etc/changes-exit.conf
- Save files by using magic folders or symlinks pointing to folders -or filesystem images eventually- out of save.dat
- Exclude unneeded folders -web browser cache and some other- in changes-exit.conf
BTW I've tried something like you to see recent changes -- using a different approach
Code: Select all
IFS="
"
find /mnt/live/memory/changes -newer /mnt/live/memory/changes/etc/fstab
unset IFS
You can also see the number of files and total size of recent changes
Code: Select all
find /mnt/live/memory/changes -newer /mnt/live/memory/changes/etc/fstab | wc -l
du -sh `find /mnt/live/memory/changes -newer /mnt/live/memory/changes/etc/fstab`
-
- Black ninja
- Posts: 75
- Joined: 28 Oct 2017, 13:40
- Distribution: 4.0 XFCE, Manjaro
- Location: .bay.de
cleanup script copy update
Hi abelM,
thanks for sharing your thoughts.
Exclued unneeded folders from changes is a thing i´ve been looking for...didn´t come across the solution you mentioned. Will give it a try later.
cheers
thanks for sharing your thoughts.
Exclued unneeded folders from changes is a thing i´ve been looking for...didn´t come across the solution you mentioned. Will give it a try later.
cheers