12.2. Testing iso based on Linux Live Kit

Global announcements
simargl
Site Admin
Posts: 466
Joined: 16 May 2013, 10:54
Contact:

Re: 12.2. Testing iso based on Linux Live Kit

Postby simargl » 02 Nov 2013, 11:17

I tested this previously on ext4 partition...

with boot code perch=changes, session will be saved to specified directory changes, but that boot code should be kept as Slax specific.

Because in alphaos we use save file changes.fs4, to save sessions without need for any additional boot code. It is confirmed to work on ext4 and FAT32, don't know why wouldn't if installation is on NTFS.

---
Boot code from should be mandatory for all installations, I edited first post.

Marv
Proficient
Posts: 81
Joined: 16 May 2013, 16:42

Re: 12.2. Testing iso based on Linux Live Kit

Postby Marv » 02 Nov 2013, 16:05

Scooby wrote:I boot directly from ISO using grub2

that means my from boot code is

Code: Select all

from=_ISO/MAINMENU/AlphaSlax122.iso


To get savefile working I changed in init to

Code: Select all

save_file_activate "$DATAMNT/$LIVEKITNAME"

My savefile is on USB. Only vfat I got, No ext, My internal HD is ntfs.

The system is very slow!

*edit*
found

Code: Select all

slax.flags=toram


snappier now

But no savefile loaded :cry:
*end edit*




Is bundles copied to ram during start or is it savefile on USB which slows it down?

Is /tmp setup differently? smaller?
Had problem building new alphaslax from it. No space left?
Worked OK in alphaos.

I really miss ntfs support :cry:


I tried toram on my slower computer/cd-card combination (Grub4Dos frugal)and it did indeed speed it up but it changes a couple of things which seems to break save-session. If toram is used, the boot partition is not left mounted at boot and the home symlink in /mnt is thus broken. This also broke my links to the common opera browser on the boot partition. Previous changes are loaded ok, new ones (post toram) are not saved. Playing, I put a couple of lines in /root/.start to mount the boot partition and reinstate the home symlink and that fixes my links to what I have on the boot partition but new work is not saved to the changes file. No big deal, just an observation whilst testing. Hid/disabled save-session and changes are still saved perfectly in non-toram mode. :?:
Edit: Some further notes while testing. For now, makepfile.sh only creates changes.fs4 file in /alphaos. After creation, not using toram, the directory may be renamed and from= used sucessfully. save-session seems experimental at this point. By using alphaos as directory, moving savefile.txt to /etc before rebooting, changing the appropriate code in save-session to look for savefile.txt there and inserting

Code: Select all

cd /
before the unmount $SAVEFILE_MNT, I got it to run in toram mode but bricked a changes.fs4 file in the process. For now, for me toram is out and deleting /tmp/savefile.txt disables save-session, seemingly not needed in non-toram mode. Just my 2 centimes

Attached is a modified makepfile.sh I'm using. It asks for a directory name and does some simple checking for existance. First cut, think I have all the diagnostic lines out.
Attachments
makepfile.sh.gz
Asks for boot directory to put changes.fs4 in.
(1.35 KiB) Downloaded 85 times

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: 12.2. Testing iso based on Linux Live Kit

Postby Scooby » 03 Nov 2013, 11:04

Checked up on the toram execution chain.

When toram paramater is specified $DATA in init gets replaced by $CHANGES/toram ( livekitlib-->copy_to_ram )
and here no changes.fs4 can be found! Hence savefile_activate cannot activate.

Since I boot directly from iso I use

# alphaos save file

Code: Select all

save_file_activate "$DATAMNT/$LIVEKITNAME"


It still doesnt work because
at the end of copy_to_ram something needed is unmounted

if I switch places of copy_to_ram and savefile_activate in init it works

toram and savefile can coexist.

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: 12.2. Testing iso based on Linux Live Kit

Postby Scooby » 03 Nov 2013, 15:30

hacked a little bit in init and lib/livekitlib

added boot parameter savefile as in the following grub2 menu entry

Code: Select all

menuentry "AlphaSlax ISO" {
insmod part_msdos
insmod ext2
set isofile="_ISO/MAINMENU/AlphaosSlax122.iso"
search --no-floppy --file --set=root /$isofile
loopback loop /$isofile
linux (loop)/alphaos/boot/vmlinuz from=$isofile slax.flags=toram savefile=testdir/changes.fs4
initrd (loop)/alphaos/boot/initrfs.img
}


and modified save_file_activate() to make a search of devices for the savefile.
(code is QnD but could be cleaned if anyone interested)

changes get saved in savefile.

my /mnt/home link is pointing at the wrong place
? were is it set? is it important?

spacefm looks weird? doesnt have mount command
Is this because of home link
or are the bundles layered in wrong order in union?

Code: Select all

0     changes.fs4                             
1     extra_12.sb                             
2     alpha_12.s


Now I can have iso on USB and savefile on ntfs internal HD :D

remaining is fixing modules dir. Maybe a separate parameter for modules for maximum flexibility!?

I think savefilename and type(.fs2) also should be variable as in alphaos
(a prefix set in DISTRO_SPECS)

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: 12.2. Testing iso based on Linux Live Kit

Postby Scooby » 03 Nov 2013, 16:12

/tmp folder is definitely restricted by savefile size

created /mnt/live/tmp instead and using it.

Code: Select all

> mount | grep -w tmpfs
tmpfs on /mnt/live type tmpfs (rw,relatime,size=2766432k)

> free
                             total             used           free     
Mem:                   2766432    1159316    1607116


How to fix? can you symling /tmp to /mnt/live/tmp in init?
.

simargl
Site Admin
Posts: 466
Joined: 16 May 2013, 10:54
Contact:

Re: 12.2. Testing iso based on Linux Live Kit

Postby simargl » 03 Nov 2013, 17:14

I set save_file_activate before copy_to_ram in init. Thanks. toram works now with save file, only I don't really see speed improvement when using it.

To get tmpfs:

mkdir /dev/shm
mount -a
Then make directory in /dev/shm, called for example tmpfs and add symbolic link,
ln -s /dev/shm/tmpfs /tmp/tmpfs

Size of /tmp/tmpfs will be as your total available RAM,

I don't know what's best way to get bigger tmpfs than size of save file, commands from above work, but should that be default?, will it break something else? Isn't this strange to /tmp be limited to for example 200 MB, while /tmp/tmpfs can have 2 GB or 6 GB of data? Maybe it's better to mount it somewhere else like in /mnt/live/memory

my /mnt/home link is pointing at the wrong place


/mnt/home is made from rc.sysinit as symlink to /mnt/live/memory/data, but only if doesn't exist (will not be overwritten).

Marv
Proficient
Posts: 81
Joined: 16 May 2013, 16:42

Re: 12.2. Testing iso based on Linux Live Kit

Postby Marv » 03 Nov 2013, 18:57

simargl wrote:I set save_file_activate before copy_to_ram in init. Thanks. toram works now with save file, only I don't really see speed improvement when using it.

Thenks, init modified per above. Frugal install now working and saving correctly in /alphaos_live with from=/alphaos_live toram boot parameters. save-session commented out in rc.shutdown just for clarity. I only see an improvement from toram on the machines with quite slow flash access. On the laptop with a SATA SSD, non-toram actually 'seems' faster.

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: 12.2. Testing iso based on Linux Live Kit

Postby Scooby » 03 Nov 2013, 20:16

simargl wrote:only I don't really see speed improvement when using it.


Booting from usb2.0 drive with both savefile and iso on it makes for a considerable improvement here



simargl wrote:Maybe it's better to mount it somewhere else like in /mnt/live/memory

cant you do something like removing /tmp from alpha_12.sb and lib/livekitlib-->change_root
and do something like

ln -s /mnt/live/tmp /tmp

simargl wrote:/mnt/home is made from rc.sysinit as symlink to /mnt/live/memory/data, but only if doesn't exist (will not be overwritten).


Thank you I will take this into consideration and make an conditional set of symlink in rc.sysinit

simargl
Site Admin
Posts: 466
Joined: 16 May 2013, 10:54
Contact:

Re: 12.2. Testing iso based on Linux Live Kit

Postby simargl » 03 Nov 2013, 20:46

Commits / 660af2c
In filesystem package /tmp is symlink to /mnt/live/tmp,
initramfs-tree now contains /tmp directory with 1777 permissions

https://bitbucket.org/simargl/alphaos/c ... 81d819a0cd

this change will keep /tmp outside of save file, as it should be

simargl
Site Admin
Posts: 466
Joined: 16 May 2013, 10:54
Contact:

grub4dosconfig and new alphaos

Postby simargl » 04 Nov 2013, 08:47

Here is new grub4dosconfig fixed to recognize alphaos frugal installation. As you see installation directory must have name like one from this list: alphaos alphaOS Alphaos AlphaOS alphaos.usb alphaos-usb. I can add new names if needed

code difference

Code: Select all

@@ -252,6 +252,7 @@
   io.sys) DISTRO_NAME="Windows 9x/Me";;
   plpbt.bin) DISTRO_NAME="PLOP_boot_manager";;
   rootfs*.gz) DISTRO_NAME="Slitaz Linux";;
+  initrfs.img) DISTRO_NAME="alphaOS";;
   initrd) DISTRO_NAME="Fatdog64";;
   puppy.sfs) # frugal installed Puppy with simple file name
     DISTRO_IDSTRING=$(tail -c 16 $TOPDIR$KEYFILE)
@@ -290,7 +291,7 @@
    [ -f $TOPDIR/etc/DISTRO_SPECS ] && source $TOPDIR/etc/DISTRO_SPECS
    [ "$DISTRO_VERSION" != "" ] && DISTRO_NAME="$DISTRO_NAME $DISTRO_VERSION"
    [ "$DISTRO_NAME" ] && echo "$DISTRO_NAME" && return
-

   # other linux
    if [ "$DISTRO_NAME" = "" ]; then
      if [ -f $TOPDIR/etc/vine-release ] ; then
@@ -972,6 +973,18 @@
     fi
     break
   done
+
+  # alphaos
+  for D in alphaos alphaOS Alphaos AlphaOS alphaos.usb alphaos-usb; do
+    if [ -f $TOPDIR/$D/boot/vmlinuz -a -f $TOPDIR/$D/alpha*sb ];then
+      LINUXOPTIONS="$LINUXOPTIONS from=/$D"
+      KEYFILE="/$D/boot/initrfs.img,/$D/boot/vmlinuz"
+      ITEM="$PART$KEYFILE|$(read_distro_specs $TOPDIR)"
+      FULLINSTS="$FULLINSTS
+      $ITEM"
+    fi
+  done

   # Wubi
   if [ -f $TOPDIR/ubuntu/disks/boot/grub/menu.lst ];then # ununtu on Windows
     KEYFILE=/ubuntu/disks/boot/grub/menu.lst

grub4dosconfig.gz
(19.21 KiB) Downloaded 155 times

Edit:
There's problem in case two frugal installation are on the same disk, in will add from=/dir1 from=/dir2 for both entries...


Return to “Announcements”

Who is online

Users browsing this forum: No registered users and 1 guest

cron