ISO - save changes

Post here if you are a new Porteus member and you're looking for some help.
User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

ISO - save changes

Post#1 by Ed_P » 20 Feb 2013, 22:04

I'm running Porteus 2.0 from an ISO using Grub4DOS. Is there a way to save personalized settings and still run the system as an ISO. Either a file of changes saved in the ISO or a file of changes saved outside the ISO but that the ISO interacts with. The changes I'm thinking of would be a WiFi network SSID and password, Firefox bookmarks, and simple things like that .
Ed

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: ISO - save changes

Post#2 by Ahau » 20 Feb 2013, 22:43

Yes, you can do this, and there is a number of ways. You could create a module containing your changes and either remaster your ISO image with the module present (more here: http://porteus.org/faq.html#22), or you could place the module on your filesystem outside the ISO and activate it on startup using the "extramod" cheatcode -- please see /boot/cheatcodes.txt for more on this.

Also, you could use the "changes=" cheatcode to point to a folder or save.dat container that exist outside the ISO. Let us know if you need any further instruction on one of these methods :)
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: ISO - save changes

Post#3 by Ed_P » 21 Feb 2013, 06:17

Hi Ahau. Thank you for responding.

I like the sound of the changes= option that I read here: http://porteus.org/component/content/ar ... -them.html

So if I add changes=/ISOs/porteus20.dat to my Grub4DOS parms

Code: Select all

title Porteus 2.0\n 233MB\n Porteus-v2.0-i486.iso
map --heads=0 --sectors-per-track=0 /ISOs/Porteus-v2.0-i486.iso (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz from=/ISOs/Porteus-v2.0-i486.iso autoexec=startx changes=/ISOs/porteus20.dat 
initrd /boot/syslinux/initrd.xz
Porteus will record my WiFi and Bookmark changes to the porteus20.dat file? I don't have to preallocate the .dat file? Or use the /sdb1/ISOs/ path?
Ed

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: ISO - save changes

Post#4 by Ahau » 21 Feb 2013, 07:00

Hi EdP,

You will first need to create a save.dat file, it won't be generated automatically by adding it to the cheatcodes. You can create one with the 'Porteus save file manager' application in the applications menu (under the system heading). You can add '/dev/sda1/' or '/mnt/sda1/' or use a UUID to specify the device, but I don't believe this is necessary when the save.dat is on the same partition as where your 'from=' cheatcode is pointing. I may be wrong, there were some changes to the 'from=' cheatcode in 2.0 and I don't usually boot directly from the ISO -- let me know if this doesn't work for you :)

Also, this will save all of your changes, including modified files, internet history, downloaded files, etc. If you want JUST your wifi and bookmarks to stick around, you might be better off placing them in your rootcopy or building a separate module for them, and then boot without the 'changes=' cheatcode. This way your wifi settings and bookmarks will always be there but nothing else will be saved. This is how I run Porteus :)

more useful information on some of these options:
http://porteus.org/component/content/ar ... cture.html
http://porteus.org/component/content/ar ... d-one.html
http://porteus.org/component/content/ar ... ctory.html
http://porteus.org/component/content/ar ... udies.html
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: ISO - save changes

Post#5 by Ed_P » 21 Feb 2013, 16:22

Thanks Ahau.

What I found when I tried booting without preallocating the .dat file I got a file missing error but Porteus finished booting. I then created the file using Porteus and made my changes and rebooted. No error msg about the file being missing but the changes weren't there. So I remade them than rebooted and they still weren't there.

I'll check out your links. And I take that your reference to "better off placing them in your rootcopy " means the into the ISO file. I'm not sure I'm ready to build a module yet, I'm still struggling with a changes file. :%) And I do like the idea of keeping my changes separate from the distribution.

I'll keep trying and will keep you posted.
Ed

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: ISO - save changes

Post#6 by Ahau » 21 Feb 2013, 18:00

You need to build your .dat changes file, then add the location to your bootloader config's cheatcodes like you've done. Then reboot so your system mounts the .dat file. Now you can update your settings and they'll be saved in the save.dat for the next reboot. Your changes aren't saved to the .dat upon initial creation.

Working with a filesystem like this does take a little getting used to, but there's so much flexibility I think you'll find it's pretty amazing once you get the hang of it :)
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: ISO - save changes

Post#7 by Ed_P » 21 Feb 2013, 19:34

Over the years I've tried a few Linux distros, DSL and PartedMagic come to mind, but I've never really "connected" with them, most likely their not supporting my NICs. But Porteus does and I find it very appealing at this point. You guys have done a very good job assembling this. And it's less than 1/4 GB!!! And I like this modularity concept.

I haven't reached the point of wanting to install it but we'll see.
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: ISO - save changes

Post#8 by Ed_P » 22 Feb 2013, 00:11

Update:

I Rt clicked System>System Tools>Porteus save file manager>I want to create a new savefile.

I allocated a 10MB file named porteussave.dat. (It's all the space I have on the USB drive at this point.) I then changed the menu.lst to include changes=porteussave.dat.

I rebooted. Added the password to my WiFi network connection and tweaked the SpaceFM window's settings and rebooted.

Nothing was saved and/or restored on the rebooted system.

And no error msg indicating the .dat file wasn't found.

BTW What happens when the .dat file fills up? Does it loop around or hang up or what?
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: ISO - save changes

Post#9 by Ed_P » 22 Feb 2013, 07:06

CRAP!! :x

Deleted the 1.2 ISO and expanded the save file to 64MB, rebooted, same thing.

Rebooted again. Happened to catch a msg stating Invalid fs!! USB drive is FAT16!! Not FAT32 which I thought all my USB drives were. I need to back it up, reformat it and rebuild it before I continue my testing. :wall:
Ed

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: ISO - save changes

Post#10 by fanthom » 22 Feb 2013, 09:44

@EdP
10MB save file is way too small. i guess that ext4/xfs was not even created on such small container that's why you get ' Invalid fs!' message.
not sure what happens when container fills up but i recon it's the same as filling up the partition: "no space left on device"
FAT16 is ok.
when you boot with 'changes=porteussave.dat' then make sure it's placed in top dir of the stick: /mnt/sdXY/porteussave.dat and not '/mnt/sdXY/porteus/porteussave.dat'

Cheers
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: ISO - save changes

Post#11 by Ed_P » 22 Feb 2013, 18:42

Moved ISO to a FAT32 flash drive, created new porteussave.dat at 256MB (It's bigger than the ISO!!), rebooted, connected to my WiFi, tweaked SpaceFM window, rebooted. Both changes now restored. :Yahoo!:

Want to try a smaller save file.
Ed

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: ISO - save changes

Post#12 by Ahau » 22 Feb 2013, 18:55

Smaller than 256MB should be fine, but since it saves every file on your system that gets modified (as well as temporary internet files, etc) it will build up with time. You may find yourself running out of room and having to be diligent about cleaning up after yourself. While you're booted into porteus, open your file manager and go to your home directory. It should show how much room is left on your filesystem (256 MB less however much space is occupied with your changes).

Since it seems like you want to use as little disk space as possible, after you get more comfortable with the setup it may serve you well to generate a module with just the files you want, and boot up without saved changes and the 'extramod=' cheatcode. That will give you more room in your root filesystem while you're running (~60% the size of your RAM), all the stuff you don't need will get flushed when you reboot, and the module will be just the size of your config files, compressed (i.e. very small).
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: ISO - save changes

Post#13 by Ed_P » 22 Feb 2013, 19:31

Some changes I don't know how to save as a mod, the two that I've saved currently for example. But yes you're right I want to keep space to a minimum since I'm booting an ISO rather than a full install.

Also, the Savefile Manager is misleading with the I want to resize a savefile option. The existing savefile is not resized, a new one is created and the files previously saved are not copied to the new one. And since the new save file has a new name the cheatcode value has to be changed. So "resize" is misleading.

BTW My new size is now 128MB.


-Edit-

"While you're booted into porteus, open your file manager and go to your home directory. It should show how much room is left on your filesystem "

I wasn't sure how to do that initially, going to my USB drive's root and checking the Properties of the Savefile didn't show me space used. But dbl clicking on the Home desktop icon showed me what you were saying. Thank you. :beer:

(108MB free) :wink:
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: ISO - save changes

Post#14 by Ed_P » 22 Feb 2013, 22:36

@fanthom

On the FAT16 flash drive the save file is 64MB and on the root of the drive but Porteus is displaying a unsupported fs msg on about the 4th line when booting and the save drive is not being used.

Not a big deal but the documentation should reflect the limitation as should the Save File Manager app.
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: ISO - save changes

Post#15 by brokenman » 22 Feb 2013, 23:50

Also, the Savefile Manager is misleading with the I want to resize a savefile option. The existing savefile is not resized, a new one is created and the files previously saved are not copied to the new one.
Thanks for the report. Can you confirm you meant the old files are 'NOT' copied to the new one? If so i will file a bug report with the guy that wrote the script. :o
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply