Page 1 of 2

Save files

Posted: 20 Mar 2017, 16:13
by karousaras
Hello, i am new with porteus and i have install the portues 3.2.2 xfce. For install i transfer all the files from iso in usb flash and then run Porteus-installer-for-Windows.exe. After that i reboot in portues i do that steps Appendix B - Saving changes to a Windows Filesystem but when i reboot nothing is save. Maybe you can sent me a link with details steps for install. Thanks.

Re: Save files

Posted: 20 Mar 2017, 19:40
by Ed_P
Are you rebooting on a BIOS system or a UEFI system?

Did you create a porteussave.dat file? If so, where did you create it?

What is the format of your USB drive?

Re: Save files

Posted: 20 Mar 2017, 19:41
by Blaze
Hi karousaras.
Welcome on the board!
http://www.porteus.org/component/conten ... guide.html
1) Format your USB drive to ext2 (or your hard drive partition to ext4) and install Porteus via Porteus Installer. All your changes will be save.
2) If you use FAT32 or NTFS - welcome to Porteus save file manager - look at this Saving changes to a Windows Filesystem

Re: Save files

Posted: 20 Mar 2017, 20:29
by karousaras
So i install from usb to usb with Porteus Installer and ext2 partition and i check the 2 boxes but when i go to boot from the usb it boot from the second which is the windows boot.

I rebooting from uefi.

i have in porteus folder.

fat32.

if i burn the iso with rufus and then i run Porteus-installer-for-Windows.exe and after i make the 2 other steps when i reboot, it will work and save?

Re: Save files

Posted: 20 Mar 2017, 21:46
by Ed_P
karousaras wrote:I rebooting from uefi.
On the USB drive there is an EFI?
i have in porteus folder.
So you have on the USB drive /porteus/changes/porteussave.dat? Or /porteus/porteussave.dat?
if i burn the iso with rufus and then i run Porteus-installer-for-Windows.exe and after i make the 2 other steps when i reboot, it will work and save?
I've never used rufus but I doubt it will cause Porteus to save your changes.

If you're booting from UEFI you need to:

1. Disable the machine's UEFI Secure Boot option

2. Then in the USB drive's /EFI/BOOT folder edit the refind.conf file to add the name and location of your porteussave.dat file.

2.a Down near the bottom of the refind.conf file you will see a menuentry for "Porteus GUI mode".
In the menu find the submenuentry "Save changes". Change the "changes=/porteus" to be the name and location of your porteussave.dat file.

2.b Further down you will find a menuentry for "Porteus menu".
Repeat the submenuentry "Save changes" noted above here also.

:)

Re: Save files

Posted: 21 Mar 2017, 16:40
by karousaras
yes

I save in /porteus/porteussave.dat

in 2.b I dont find that section and I write in 2.a changes=/porteus/porteussave.dat

with fat32 I can boot and change the files but still I can't save

Re: Save files

Posted: 21 Mar 2017, 19:44
by Ed_P
karousaras wrote:in 2.b I dont find that section
OK Apparently a tweak I added to my menu. :oops:
and I write in 2.a changes=/porteus/porteussave.dat
OK :good:
with fat32 I can boot and change the files but still I can't save
:x

Please provide the output of:

ls -lgh /mnt/sdb1/porteus/

sdb1 being the address of your USB drive.

So, you make changes, reboot and they are gone. You do not remove the USB drive while booted to Porteus. You see the refind.conf boot menu when you boot. Yes?

Re: Save files

Posted: 21 Mar 2017, 21:46
by karousaras
yes

Re: Save files

Posted: 21 Mar 2017, 23:10
by Ed_P
karousaras wrote:yes
Don't forget the ls -lgh /mnt/sdb1/porteus/ output.

To cover all bases, edit the porteus.cfg file in the USB's /boot/syslinux/ folder and change the "MENU LABEL Graphics mode"'s APPEND line to include the same "changes=/porteus/porteussave.dat" that you added to the refind.conf file. Then reboot and check it out.

Re: Save files

Posted: 23 Mar 2017, 15:06
by karousaras
it show me

guest@porteus:~$ ls -lgh /mnt/sdc1/porteus
total 801M
drwxrwxrwx 2 root 16K Mar 23 16:24 base/
-rwxrwxrwx 1 root 1015 Mar 23 16:25 make_iso.sh*
drwxrwxrwx 2 root 16K Mar 23 16:25 modules/
drwxrwxrwx 2 root 16K Mar 23 16:25 optional/
-rwxrwxrwx 1 root 437 Mar 23 16:24 porteus-v3.2-x86_64.sgn*
-rwxrwxrwx 1 root 800M Mar 23 16:28 porteussave.dat*
drwxrwxrwx 2 root 16K Mar 23 16:25 rootcopy/

Re: Save files

Posted: 24 Mar 2017, 19:39
by karousaras
when I write the command it say guest, so maybe this is wrong?

Re: Save files

Posted: 24 Mar 2017, 21:31
by Ed_P
You're command output looks perfect karousaras. So, with "changes=/porteus/porteussave.dat" added to the refind.conf and porteus.cfg files you should be booting and saving changes on EFI and BIOS systems. If that is not the case I'm running out of ideas. :(

From your booted Porteus system try running these scripts. They may show a clue if the saving is not working.

savedatspaceck.sh

Code: Select all

#!/bin/sh
# Add to /etc/rc.d/rc.local_shutdown.  And make rc.local_shutdown executable.
# Bogomips help: http://forum.porteus.org/viewtopic.php?f=140&t=6069&p=47591#p47589
#                http://forum.porteus.org/viewtopic.php?f=140&t=6069&p=47614#p47598
# Color definitions
txtbld=$(tput bold)               # Bold
txtred=${txtbld}$(tput setaf 1)   # Red
rst=$(tput sgr0)                  # Reset

function redwarning() {
echo -e $txtred "$1" $rst
}

if [ -a /mnt/live/memory/images/changes ]; then
   SDspace=$(df -BM --output=size,used,avail,pcent /mnt/live/memory/images/changes | tail -n1)
   read size used avail percent <<< $SDspace
   if [ ${percent%\%} -gt  85 ]; then
      echo 
      redwarning "Warning! save.dat file $percent full.  Used: $used  Free: $avail"
      echo 
      sleep 5
   else
      echo "save.dat file $percent full.  Used: $used  Free: $avail"
   fi
fi
bootdev.sh

Code: Select all

#!/bin/sh
txtbld=$(tput bold)               # Bold
rst=$(tput sgr0)                  # Reset
function Bold() {
  echo -e $txtbld"$1"$rst "$2"; 
}

# http://forum.porteus.org/viewtopic.php?f=53&t=3801&start=30#p28472
# awk 'c-->0;/Booting device:/{c=1}' /var/log/porteus-livedbg
BOOTDEV=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
if [ "$BOOTDEV" == "/mnt/isoloop" ]; then
   BOOTDEV=`grep -A1 "ISO=" /var/log/porteus-livedbg`
   BOOTDEV=${BOOTDEV:4:9}
fi
TYPE=`grep "/dev/${BOOTDEV:5}" /var/log/porteus-livedbg`
#MEMORY=`grep MemTotal /proc/meminfo`
#MEMORY=${MEMORY:17}
MEMORY=`free -m | grep -A1 "Mem:"`
MEMORY=${MEMORY:13:5}M
KERNEL=`uname -a`
KERNEL="${KERNEL:0:13} `uname -r`"
SAVEDAT=`grep "save.dat/" /var/log/porteus-livedbg`
BOOTMODE=`grep -A1 "Porteus data" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
if [ "${BOOTMODE:5:3}" == "iso" ]; then
   BOOTMODE="ISO `cat /proc/cmdline | sed -e 's/^.*from=//' -e 's/ .*$//'`"
fi
if [ "${BOOTDEV:7:1}" != "a" ]; then
   FOLDER="/porteus/"
else
   FOLDER=`cat /etc/porteus-version`
   FOLDER="/porteus${FOLDER:9:3}/"
   if [ ! -d "$BOOTDEV$FOLDER" ]; then
      FOLDER="/porteus3.x/"
   fi
fi
if [ ! "$1" = "" ]; then
   function Bold() {
     echo -e "$1" "$2";
   } 
fi

Bold "System Memory:" "$MEMORY"
Bold "Boot device:  " "$BOOTDEV"
Bold "Boot device format:" "${TYPE: -7}"
Bold "Boot folder:  " "$FOLDER"
Bold "Boot mode:    " "$BOOTMODE"
Bold "OS:      " `cat /etc/porteus-version`
Bold "ARCH:    " "`echo $MACHTYPE | sed -e 's/-.*$//'`"  

Bold "Kernel:  "  "$KERNEL"         # ${KERNEL:0:29}"
if [ "$SAVEDAT" != "" ]; then     
   Bold "Changes: " "${SAVEDAT:0:-8}"
fi
Bold "Cmdline: " "`cat /proc/cmdline`"
read
Disregard the comments in the scripts. The scripts are designed for my systems so their output folder names may be off a bit but that will not be a big deal. Try them and we can go from there.

Re: Save files

Posted: 28 Mar 2017, 19:49
by karousaras
i run first sacedatspaceck.sh and it show me nothing, then i run bootdev.sh and it print

Code: Select all

System Memory:   386M
Boot device: /mnt/sdb1
Boot device format: "vfat"
Boot folderw:     /porteus/
Boot mode:       /mnt/sdb1/porteus
OS:             Porteus-v3.2.2
ARCH:         x86_64
Kernel:        Linux porteus 4.9.0-porteus
Cmdline:     quietoot\syslinux
                                           mlinuz initrd=boot\syslinux\initrd.xz

also when i install with porteus install it do not move the EFI folder and i if have ext2 partition i can move alone


-edit- Added code tags. Ed_P

Re: Save files

Posted: 28 Mar 2017, 23:58
by Ed_P
karousaras wrote:also when i install with porteus install it do not move the EFI folder and i if have ext2 partition i can move alone
Hey karousaras, you're back. :)

The EFI folder can reside on the same drive as porteus if the drive is vfat which your's is. As for your ext2 partition I don't understand, I don't use one.

In your bootdev output I don't see a mention of your porteussave.dat file which could explain why your changes are not getting saved. Please run the following terminal command from Porteus and post it's output.

Code: Select all

cat /proc/cmdline
You can copy and paste the output on a terminal screen directly to the forum posting window. Then highlight it and click on the Code tag button above. :)

Re: Save files

Posted: 03 Apr 2017, 14:59
by karousaras
the output is

Code: Select all

quiet \boot\syslinux\vmlinuz initrd=boot\syslinux\initrd.xz