usb persistence

Post tutorials, HOWTO's and other useful resources here.
mikronimo
Ronin
Ronin
Posts: 1
Joined: 18 Jan 2012, 23:00
Location: italy

usb persistence

Post#1 by mikronimo » 21 Jan 2012, 23:55

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. :)

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: usb persistence

Post#2 by Ahau » 22 Jan 2012, 08:00

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.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
brokenman
Site Admin
Site Admin
Posts: 5456
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: usb persistence

Post#3 by brokenman » 22 Jan 2012, 23:46

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

panacoic
Ronin
Ronin
Posts: 3
Joined: 26 Feb 2012, 15:57
Location: Hungary

Re: usb persistence

Post#4 by panacoic » 14 May 2012, 15:44

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.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: usb persistence

Post#5 by Ahau » 14 May 2012, 16:28

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.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
brokenman
Site Admin
Site Admin
Posts: 5456
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: usb persistence

Post#6 by brokenman » 15 May 2012, 01:36

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!
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
wread
Module Guard
Module Guard
Posts: 1065
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: usb persistence

Post#7 by wread » 16 May 2012, 12:02

@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!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
brokenman
Site Admin
Site Admin
Posts: 5456
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: usb persistence

Post#8 by brokenman » 16 May 2012, 14:45

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

milangru
White ninja
White ninja
Posts: 12
Joined: 11 Apr 2015, 17:24
Distribution: Porteus KDE
Location: Novi Sad

Re: usb persistence

Post#9 by milangru » 11 Apr 2015, 17:32

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

User avatar
francois
Contributor
Contributor
Posts: 4942
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: usb persistence

Post#10 by francois » 12 Apr 2015, 00:36

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
Voltaire: Le mieux est l'ennemi du bien.

User avatar
Ed_P
Contributor
Contributor
Posts: 3156
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: usb persistence

Post#11 by Ed_P » 12 Apr 2015, 04:35

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
Ed

User avatar
francois
Contributor
Contributor
Posts: 4942
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: usb persistence

Post#12 by francois » 12 Apr 2015, 07:54


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.
Voltaire: Le mieux est l'ennemi du bien.

milangru
White ninja
White ninja
Posts: 12
Joined: 11 Apr 2015, 17:24
Distribution: Porteus KDE
Location: Novi Sad

Re: usb persistence

Post#13 by milangru » 12 Apr 2015, 13:09

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?

donald
Full of knowledge
Full of knowledge
Posts: 1159
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: usb persistence

Post#14 by donald » 12 Apr 2015, 16:22

--> 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?

milangru
White ninja
White ninja
Posts: 12
Joined: 11 Apr 2015, 17:24
Distribution: Porteus KDE
Location: Novi Sad

Re: usb persistence

Post#15 by milangru » 12 Apr 2015, 16:53

I have done it like this
Image
and like that
Image

What am I doing wrong?

Post Reply