Page 1 of 2

usb persistence

Posted: 21 Jan 2012, 23:55
by mikronimo
I have tried to apply the instruction for make of porteus a persistent distro on a usb flash drive, but though i have made all the configurations in the menu for all the languages and the directory and the dimension, etc., i did not understood how to modify the bootloader config file to make all of them fixed after the reload. Once for all, can someone provide a full example of the right procedure? I used linux distro for almost 4 year, but i'm not confidente with shell, scripts and manual setting of config file and so on... thanks in advance for your attention and patience. :)

Re: usb persistence

Posted: 22 Jan 2012, 08:00
by Ahau
Welcome, mikronimo!

For setting up saved changes, we first need to know what filesystem you are using on your flashdrive. For example, is it formatted as FAT32 (this is likely the case if you have never reformatted the drive), NTFS, or a linux filesystem, such as EXT2, XFS, or EXT4?

If you are using a linux filesystem, then you should have persistent changes simply by using the first entry on the boot menu, which contains the cheatcode, 'changes=/porteus/'. This will copy all of your changed files to a directory on your flashdrive, inside /porteus/changes/.

My guess, however, is that you are using a FAT32 filesystem, in which case you need to use a 'save.dat' container file. This is a file that needs to be created on your flashdrive (for example, at /porteus/save.dat). It cannot be created inside your live filesystem (for example, at /home/guest/save.dat). You can create this container file using a GUI tool, available from the menu at 'System-> Porteus save.dat manager'. After you create this file, you need to modify your bootloader config file (this is located on your flash drive at /boot/porteus.cfg, assuming you are using the syslinux bootloader -- let us know if you are using lilo or some other bootloader, such as grub). You can open this file in a graphical text editor, such as leafpad or kwrite. Scroll down to where you see this text:

Code: Select all

LABEL kde
MENU LABEL Graphics mode (KDE)
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd.xz vga=791 changes=/porteus/ 
TEXT HELP
    Run Porteus the best way we can.
    Try to autoconfigure graphics
    card and use the maximum
    allowed resolution
ENDTEXT
and modify the last section of the APPEND line, so that it reads 'changes=/porteus/save.dat'. If you gave your container a different name or put it in a different folder in your flash drive, then you will need to use that path and filename instead.

More information can be found in the install guide, which is located on your flashdrive, at /boot/docs/install.txt. Scroll down to the end, "Appendix B". We typically have this information available on our website, but we're having some technical issues right now (all of our documentation should be back online soon).

Thanks, and please let us know if this doesn't work for you.

Re: usb persistence

Posted: 22 Jan 2012, 23:46
by brokenman
I will update the save.dat manager (for next version release) to make it a little easier to use and allow for inserting the required line into the /boot/porteus.cfg file. This should make things a little easier.

Re: usb persistence

Posted: 14 May 2012, 15:44
by panacoic
Greatings.

I had an power shortage lately and my HDD died. :x Had 20GB of data flushed on the drain.
Fortunately, my older pc still working, I found my 1gb usb memory stick and got Porteus to boot from it, from which I'm writing these lines.

I've set up, just as the guidelines said, everything for persistency, a ".dat container". I've downloaded some modules, etc., modified my desktop for a mac-os experience. Haven't forgot to set changes cheatcode(/mnt/sda1/porteus/changes/defo.dat), after reboot, either in kde, either lxde, I've only got my modules loaded at startup. My desktop settings have disappeared.

The question is, does it matter when I'm setting .dat container before or after making changes? Wouldn't it save either ways? Or its just me and it's not meant for desktop setting changes?!

Humbly asking for your help.

Cheers.

Re: usb persistence

Posted: 14 May 2012, 16:28
by Ahau
Hi panacoic,

If you created your save.dat and modified your porteus.cfg to point to the .dat container, then it still won't start saving changes until your next reboot. Please do a quick check to see if your changes are being saved now (create an item on your desktop, reboot and see if it's still there). Watch the messages while your system is booting up, it should say "setting up directory for changes" and then "testing for posix compatibility", "filesystem is posix compatible" -- then you know things are set up properly and your changes will be saved. If it's still not working, please run 'psinfo' in a terminal and upload the resulting file to pastebin.com and post a link here and we should be able to help get it straightened out. Your changes to the desktop settings will be saved once you have it working.

Re: usb persistence

Posted: 15 May 2012, 01:36
by brokenman
As Ahau said ... your desktop changes should be saved.

Option 1 ) changes=save.dat [for use with FAT]
You will need to first boot into porteus and setup your save.dat file and edit your porteus.cfg file (this is much easier in the latest testing release candidate). Ahau mentioned the APPEND line in a post above. Here are the codes you can enter onto the APPEND line:

changes=/dev/device
changes=/dev/device/file.dat
changes=/path/
changes=/path/file.dat
changes=/dev/device/path/
changes=LABEL:YourLabelName/path
changes=UUID:STrING-0F-ChARACtERS/path/file.dat


Then you should reboot to engage the changes save file. Anything changes after this should be captured into the save file container.

Option 2) magic folders
Use the magic folders option to save changes to your $HOME folder

Option 3) create a module

Code: Select all

mkdir -p /tmp/changes/home
cp -Rdp /home/guest /tmp/changes/home
dir2xzm /tmp/changes /mnt/XdaY/porteus/modules/desktop-settings.xzm
I highly recommend formatting your USB device with a linux file system and just adding the changes= cheatcode.

Some people also prefer to setup their systems how they like it, then make a module from the changes folder. You can then boot into 'always fresh mode' and have no fear of cluttering or screwing up your system.

Code: Select all

dir2xzm /mnt/live/memory/changes /mnt/sda1/porteus/modules/mychanges.xzm
However you go, post a screenshot of your mac style porteus. Would love to see it!

Re: usb persistence

Posted: 16 May 2012, 12:02
by wread
@brokenman
How is that, can a system start on a linux-formatted-usb? I thought a pc would only recognize fat and dos partitions. Or does it?

That is the reason why I partition my usbs before loading Porteus into it. I make a minimal partition of say 75 MB for "boot" in vfat format an the rest of usb I format as ext4 for "porteus".

If I am wrong, then I could spare the partitioning of the usb!

Regards!

Re: usb persistence

Posted: 16 May 2012, 14:45
by brokenman
I am able to boot Porteus on both my laptops from USB with ext4 file system. While an operating system (or perhaps some bootstraps) may have troubles reading certain filesystems i don't believe your bios will have troubles reading the first 512 bytes of a drive. This MBR is located on the first part of the device (physical offset 0) which lies before the first partition.

In any case it's a good idea to have a windows compatible partition as the first partition if you are dual booting between Porteus and windows as you will then have a partition that win can see and use. I remember this 'double partition' setup from using slax when the bootloader required a fat partition, but the changes would have corruption problems from POISX mismatches, hence the second ext2/3 partition with data folder.

I havn't tested this on hardware any older than around 2006.

Re: usb persistence

Posted: 11 Apr 2015, 17:32
by milangru
I am new to Porteus. Long time looking for the solution to save presist changes to the live usb Porteus on Fat 32 USB.
have created
/mnt/sdb1/porteus/porteussave.dat
and in the
/mnt/sdb1/boot/syslinux/porteus.cfg have changed next row(add it),

Code: Select all

LABEL KDE4
MENU LABEL Graphics mode (KDE4)
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/porteus timezone=Europe/Belgrade
changes=/mnt/sdb1/porteus/porteussave.dat
TEXT HELP
    Run Porteus the best way we can.
    Try to autoconfigure graphics
    card and use the maximum
    allowed resolution
ENDTEXT
but stil cant save persist changes.
Please help, what I am doing wrong?
I would like to save changes on exit

Re: usb persistence

Posted: 12 Apr 2015, 00:36
by francois
Please use uuid to identify your USB key instead of /mnt/sdb1. To get uuid of your USB key in terminal use command:

Code: Select all

root@porteus:~# blkid
Then change your append line for:

Code: Select all

APPEND initrd=initrd.xz timezone=Europe/Belgrade from=UUID:cb81a316-66b7-4a04-9760-43357614fc06  changes=/porteussave.dat
replace cb81a316-66b7-4a04-9760-43357614fc06 by your the uuid of your usb key

Re: usb persistence

Posted: 12 Apr 2015, 04:35
by Ed_P
milangru wrote:changed next row(add it),

Code: Select all

LABEL KDE4
MENU LABEL Graphics mode (KDE4)
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/porteus timezone=Europe/Belgrade
changes=/mnt/sdb1/porteus/porteussave.dat
TEXT HELP
    Run Porteus the best way we can.
    Try to autoconfigure graphics
    card and use the maximum
    allowed resolution
ENDTEXT
One changes= and it needs to be all one line.

Code: Select all

APPEND initrd=initrd.xz timezone=Europe/Belgrade changes=/mnt/sdb1/porteus/porteussave.dat

Re: usb persistence

Posted: 12 Apr 2015, 07:54
by francois

One changes= and it needs to be all one line
. No enter key at all for all the info.

This is it. :D

And this is what I have proposed. With uuid you will be able to jump from one compiter to the other.

Re: usb persistence

Posted: 12 Apr 2015, 13:09
by milangru
So I have done this create proteussave.dat on /mnt/sdb1/porteus/proteussave.dat
On proteus.cfg have this

Code: Select all

LABEL XFCE
MENU LABEL Graphics mode (XFCE)
KERNEL vmlinuz
APPEND initrd=initrd.xz timezone=Europe/Belgrade from=UUID:8291-4946  changes=/porteussave.dat
TEXT HELP
    Run Porteus the best way we can.
    Try to autoconfigure graphics
    card and use the maximum
    allowed resolution
ENDTEXT
Stil not working. I would like to have saved changes when EXIT Porteus , can someone please help me?

Re: usb persistence

Posted: 12 Apr 2015, 16:22
by donald
--> on /mnt/sdb1/porteus/proteussave.dat <--
If so, then
changes=/porteus/proteussave.dat
did you really named it proteussave.dat or is it a typo?

Re: usb persistence

Posted: 12 Apr 2015, 16:53
by milangru
I have done it like this
Image
and like that
Image

What am I doing wrong?