usb persistence
usb persistence
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.
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: usb persistence
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:
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.
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
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!
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: usb persistence
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.
Wear your underpants on the outside and put on a cape.
Re: usb persistence
Greatings.
I had an power shortage lately and my HDD died. 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.
I had an power shortage lately and my HDD died. 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.
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: usb persistence
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.
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!
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: usb persistence
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
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.
However you go, post a screenshot of your mac style porteus. Would love to see it!
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
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
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- wread
- Module Guard
- Posts: 1257
- Joined: 09 Jan 2011, 18:48
- Distribution: Porteus v5.0-kde-64 bits
- Location: Santo Domingo
- Contact:
Re: usb persistence
@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!
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!
The Porteus Community never sleeps!
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: usb persistence
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.
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.
Wear your underpants on the outside and put on a cape.
-
- White ninja
- Posts: 12
- Joined: 11 Apr 2015, 17:24
- Distribution: Porteus KDE
- Location: Novi Sad
Re: usb persistence
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),
but stil cant save persist changes.
Please help, what I am doing wrong?
I would like to save changes on exit
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
Please help, what I am doing wrong?
I would like to save changes on exit
- francois
- Contributor
- Posts: 6445
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Re: usb persistence
Please use uuid to identify your USB key instead of /mnt/sdb1. To get uuid of your USB key in terminal use command:
Then change your append line for:
replace cb81a316-66b7-4a04-9760-43357614fc06 by your the uuid of your usb key
Code: Select all
root@porteus:~# blkid
Code: Select all
APPEND initrd=initrd.xz timezone=Europe/Belgrade from=UUID:cb81a316-66b7-4a04-9760-43357614fc06 changes=/porteussave.dat
Prendre son temps, profiter de celui qui passe.
- Ed_P
- Contributor
- Posts: 8730
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: usb persistence
One changes= and it needs to be all one line.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
Code: Select all
APPEND initrd=initrd.xz timezone=Europe/Belgrade changes=/mnt/sdb1/porteus/porteussave.dat
- francois
- Contributor
- Posts: 6445
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Re: usb persistence
One changes= and it needs to be all one line. No enter key at all for all the info.
This is it.
And this is what I have proposed. With uuid you will be able to jump from one compiter to the other.
Prendre son temps, profiter de celui qui passe.
-
- White ninja
- Posts: 12
- Joined: 11 Apr 2015, 17:24
- Distribution: Porteus KDE
- Location: Novi Sad
Re: usb persistence
So I have done this create proteussave.dat on /mnt/sdb1/porteus/proteussave.dat
On proteus.cfg have this
Stil not working. I would like to have saved changes when EXIT Porteus , can someone please help me?
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
-
- Full of knowledge
- Posts: 2098
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: usb persistence
--> 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?
If so, then
changes=/porteus/proteussave.dat
did you really named it proteussave.dat or is it a typo?