Page 3 of 4

Re: 12.3 bugfix release

Posted: 15 Nov 2013, 10:04
by simargl
New kernel parameter:

resize (e.g. resize=50, resize=200, ...)

Meaning
Increase savefile size during the boot process, for the given number of Megabytes

Re: 12.3 bugfix release

Posted: 16 Nov 2013, 20:57
by Scooby
How do you envision the workflow of resizing savefile?

Is it


a) Manually change boot parameter in menu.lst

b) Automagically changing boot parameter in menu.lst

c) Use the puppy approach with txt.pupsaveresize that gets detected at boot up and handled by init script

d) Some other Sim magic?

Re: 12.3 bugfix release

Posted: 17 Nov 2013, 00:16
by simargl
Correct answer is that one under a)

so, there are two options:
- open menu.lst add resizesf parameter, reboot, remove resizesf parameter, or
- press e to edit menu.lst when grub4dos menu shows up on boot, then add that parameter

Re: 12.3 bugfix release

Posted: 17 Nov 2013, 00:29
by smil99
simargl wrote:
so, there are two options:
- open menu.lst add resizesf parameter, reboot, remove resizesf parameter, or
- press e to edit menu.lst when grub4dos menu shows up on boot, then add that parameter

Why not have an option in "Setup Savefile" to re-size savefile as before? I think many users (including myself) will be more comfortable increasing savefile through a gui :)
Cheers.

Re: 12.3 bugfix release

Posted: 17 Nov 2013, 12:47
by Scooby
Of course then you could add a second entry in menu.lst that does the increase
and is always availible.

Code: Select all

timout=3
default=0

title alphaos (sda6/alphaos)
  find --set-root --ignore-floppies --ignore-cd /alphaos/boot/initrfs.img
  kernel /alphaos/boot/vmlinuz from=/alphaos
  initrd /alphaos/boot/initrfs.img

title Increase savefile by 512M - alphaos (sda6/alphaos)
  find --set-root --ignore-floppies --ignore-cd /alphaos/boot/initrfs.img
  kernel /alphaos/boot/vmlinuz from=/alphaos  resizesf=512
  initrd /alphaos/boot/initrfs.img


I think the puppy approach under c) with pupsaveresize.txt increasing savefile through a gui
is a little bit more userfriendly. If you remove the stuff relating to crypto it is not that much code in
puppy init script.

Code: Select all

   if [ -f /mnt/dev_save/pupsaveresize.txt ];then
    KILOBIG=`cat /mnt/dev_save/pupsaveresize.txt`
    rm -f /mnt/dev_save/pupsaveresize.txt
    echo > /dev/console
    echo -en $BBlue":: "$Color_Off"Increasing $PUPSAVEFILE by $KILOBIG Kbytes, please wait..." >/dev/console
    dd if=/dev/zero bs=1024 count=$KILOBIG >> /mnt/dev_save$PUPSAVEFILE
    sync
    e2fsck -y -f /mnt/dev_save$PUPSAVEFILE
    resize2fs -pf /mnt/dev_save$PUPSAVEFILE
    sync
    check_status 0
    echo -en $BBlue":: "$Color_Off"...Continuing with loading $PUPSAVEFILE..." > /dev/console
   fi
   


BTW do we have something similar to puppy boot parameter pfix=fsck?
I used it many times on puppy? maybe cause I'm on ext2? But I heard journalled
systems aint a 100% safe either.

Re: 12.3 bugfix release

Posted: 17 Nov 2013, 13:07
by simargl
I renamed resizesf bootcode to just resize, so it's easier to remember.

Previous post with this parameter explained, is edited to not make confusion

Scooby wrote:BTW do we have something similar to puppy boot parameter pfix=fsck?
I used it many times on puppy? maybe cause I'm on ext2? But I heard journalled
systems aint a 100% safe either.


When alphaos was based on Puppy, I always had that pfix=fsck in menu.lst and used ext2 for save file

I could make save file checking as default without need for addition boot code, but don't know

is it needed now with ext4. Probably not..

Re: 12.3 bugfix release

Posted: 17 Nov 2013, 13:25
by Scooby
simargl wrote:I could make save file checking as default without need for addition boot code, but don't know

is it needed now with ext4. Probably not..


Neh dont make it default, should only be when needed in my opinion.

You could always boot to ram and fix it huh?

what would be the steps? Do you have to mount savefile?
or just run e2fsck on it?

Re: 12.3 bugfix release

Posted: 17 Nov 2013, 13:34
by simargl
Scooby wrote:what would be the steps? Do you have to mount savefile?
or just run e2fsck on it?


Just one command:

fsck.ext4 changes.fs4

before save file is mounted, or in 'always fresh' mode

Re: 12.3 bugfix release

Posted: 18 Nov 2013, 17:54
by Scooby
simargl wrote:Just one command:

Code: Select all

fsck.ext4 changes.fs4

before save file is mounted


That easy huh?

Then why dont you put in

Code: Select all

if grep -q fsck /proc/cmdline; then e2fsck -y -f  $1/changes.fs4; fi


after check of file exists?

use with bootcode fsck

Should only be rarely needed but you are not 100% safe even with journalled filesystems such as ext4

Re: 12.3 bugfix release

Posted: 18 Nov 2013, 22:51
by simargl
Scooby wrote:
simargl wrote:Just one command:

Code: Select all

fsck.ext4 changes.fs4

before save file is mounted


That easy huh?

Then why dont you put in

Code: Select all

if grep -q fsck /proc/cmdline; then e2fsck -y -f  $1/changes.fs4; fi


after check of file exists?

use with bootcode fsck

Should only be rarely needed but you are not 100% safe even with journalled filesystems such as ext4


https://bitbucket.org/simargl/alphaos/c ... livekitlib