Page 1 of 3

[SOLVED] Can't Save Changes on a Live USB

Posted: 22 Nov 2015, 14:01
by George
Hello, everyone! I originally wanted to install a Linux OS alongside my Windows 10 on a Lenovo ThinkPad Edge e120 laptop in order to learn my way around Linux and hopefully the command line. However, it turns out I can't disable "Secure Boot" in my BIOS (either Lenovo didn't include the switch for that in the settings, or I just can't figure it out), and I couldn't make dual boot on my hard drive to work. So I decided to go with a live USB. I built an ISO with mostly default options, changed BIOS boot settings to boot from USB first, and voila! - managed to boot successfully. HOWEVER, I can't get the system to save the changes! Every time I reboot it's Groundhog Day again. I followed the instructions in "Appendix B" about saving changes to a Windows file system - created the porteussave.dat file, placed at the specified location on the flash drive, edited porteus.cfg (while in root mode) to add the .dat file, and still can't save changes. I can see that the porteussave.dat file is there after I reboot, but somehow is ignored by the system at boot up. When I try to reboot in "save changes' mode I get the message that I have to create a save.dat file, and only have the option to boot in "always fresh'.

Can anyone suggest how can I make "save changes" to work? Like some other newbies, I have no idea what to do.

Re: Can't Save Changes on a Live USB

Posted: 22 Nov 2015, 14:34
by brokenman
Welcome.

It sounds like the cheatcode to save changes is not correct. After booting can you please post the output from a root console:

Code: Select all

cat /proc/cmdline
cat /var/log/porteus-livedbg
Thanks.

Re: Can't Save Changes on a Live USB

Posted: 22 Nov 2015, 16:01
by fanthom
@brokenman
Perhaps 'save dat manager' could display correct 'changes=' cheatcode (based on where save.dat is created but without /mnt/sdXY so all drives are searched) so users could paste it directly to porteus.cfg.

Also - users may have no idea where porteus.cfg is placed so full path to this file could be provided. If advanced user used 3rd party bootloader then he will know for sure which file needs to be edited.

Re: Can't Save Changes on a Live USB

Posted: 22 Nov 2015, 19:23
by brokenman
Yes good point. I plan to overhaul the way changes are handled. I think it needs to be a little more user friendly. It would be nice to automate this.

Re: Can't Save Changes on a Live USB

Posted: 22 Nov 2015, 22:08
by Ed_P
fanthom wrote:@brokenman
Perhaps 'save dat manager' could display correct 'changes=' cheatcode (based on where save.dat is created but without /mnt/sdXY so all drives are searched) so users could paste it directly to porteus.cfg.

Also - users may have no idea where porteus.cfg is placed so full path to this file could be provided. If advanced user used 3rd party bootloader then he will know for sure which file needs to be edited.
Excellent suggestions fanthom. :good:

http://forum.porteus.org/viewtopic.php? ... ger#p35812

http://forum.porteus.org/viewtopic.php? ... ger#p35738

:)

What are you going to be doing come December?

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 04:11
by George
I actually I tried adding the full path (/mnt/sdb1/porteus/porteussave.dat) to the .dat file in porteus.cfg, but there was no effect. Also, In the cfg file I see the comment "Normally Porteus saves all changes to the /porteus/changes/ directory on the boot media". But I don's see a directory called 'changes' in the 'porteus' directory on the flash drive.

Here is what I got when I ran those commands in the terminal:

root@porteus:/# cat /proc/cmdline
quiet \boot\syslinux\vmlinuz changes=/porteus initrd=boot\syslinux\initrd.xz

root@porteus:/# cat /var/log/porteus-livedbg
# Recognized devices:
/dev/sda1: UUID="A238-300D" TYPE="vfat"
/dev/sda3: UUID="BA843AFD843ABC27" TYPE="ntfs"
/dev/sda4: UUID="343C89783C893640" TYPE="ntfs"
/dev/sdb1: LABEL="PORTEUS" UUID="E8FB-6830" TYPE="vfat"

# Booting device:
/mnt/sdb1

# Porteus data found in:
/mnt/sdb1/porteus

# Changes are stored in:
memory

# Non standard /rootcopy dir:
none

# Modules activated during boot time:
/mnt/sdb1/porteus/base/000-kernel.xzm
/mnt/sdb1/porteus/base/001-core.xzm
/mnt/sdb1/porteus/base/002-xorg.xzm
/mnt/sdb1/porteus/base/003-lxqt.xzm
/mnt/sdb1/porteus/base/04-opera.xzm

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 05:02
by Ed_P
George wrote:I actually I tried adding the full path (/mnt/sdb1/porteus/porteussave.dat) to the .dat file in porteus.cfg, but there was no effect.
If you have a /porteussave.dat in the root of your USB drive try having your porteus.cfg like this:

Code: Select all

KERNEL vmlinuz
APPEND initrd=initrd.xz changes=EXIT:UUID:E8FB-6830/porteussave.dat
If on the other hand you have the file at /porteus/porteussave.dat then try this:

Code: Select all

KERNEL vmlinuz
APPEND initrd=initrd.xz changes=EXIT:UUID:E8FB-6830/porteus/porteussave.dat

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 06:29
by George
Hi, Ed:

I just tried your suggestion, and still doesn't save changes. The way I'm checking is by creating a blank file on the desktop, and when I reboot, either in "Default" or "Save Changes" mode, I look to see if the file I created is still there. When I try the "Save Changes" boot mode I always get the prompt to use the .dat manager to create the container, as if I haven't already created it. I'm wondering if there is a manual way to save the changes before I reboot, I don't mind the extra step, I think you mentioned something about that elsewhere on the forum. Another thing I noticed is that I don't have a "/porteus/changes" directory on the USB drive, but the cgf file mentions that by default changes are saved there. I must have done something wrong...

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 06:54
by roadie
Changes to the live system are stored in /mnt/live/memory/changes...you can also look in /opt/porteus-scripts to see the other save options...can't remember offhand cause I never use them.

I'm pretty sure that if you open the Porteus Settngs from the menu, you'll see the save options listed....I save all changes to a linux partition, so have never used a save.dat.

You may need to tell Porteus where the save file is eg: changes=/dev/sdb2/porteus....I have to for any of mine.

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 07:44
by George
roadie wrote:Changes to the live system are stored in /mnt/live/memory/changes...you can also look in /opt/porteus-scripts to see the other save options...can't remember offhand cause I never use them.
I can't find such directories on my USB. Instead I have
mnt/sdb1/boot
mnt/sdb1/EFI
mnt/sdb1/porteus (and in here I have the save.dat file, and 4 sub-directories: base, modules, optional, and rootcopy)
mnt/sdb1/System Volume Information
roadie wrote:I'm pretty sure that if you open the Porteus Settngs from the menu, you'll see the save options listed....I save all changes to a linux partition, so have never used a save.dat.

You may need to tell Porteus where the save file is eg: changes=/dev/sdb2/porteus....I have to for any of mine.
I have told Porteus where to save the changes by editing the porteus.cfg file. As suggested by Ed above, I now have:

KERNEL vmlinuz
APPEND initrd=initrd.xz changes=EXIT:UUID:E8FB-6830/porteus/porteussave.dat

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 10:35
by tmsg
fanthom wrote:@brokenman
Perhaps 'save dat manager' could display correct 'changes=' cheatcode (based on where save.dat is created but without /mnt/sdXY so all drives are searched) so users could paste it directly to porteus.cfg.

Also - users may have no idea where porteus.cfg is placed so full path to this file could be provided. If advanced user used 3rd party bootloader then he will know for sure which file needs to be edited.
+1 +1 +1

Yesterday I tested Porteus on a USB stick formatted as NTFS (so far I've always used ext4) and in the process added a save.dat file. The Save Manager final message was a very helpful "you have to add a line to porteus.cfg". Well, that's good to know!

It is not overly hard to figure out what line to add but it makes the whole process easier (esp for newbies) if this information would be shown.

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 12:52
by aus9
George

I am not a windows user so please be gentle with me :D I am not being grumpy, but I am anal and so I want to point out some things I can see, which apparently others can not? So I am confused.

In most of your posts, especially your first one you mention you have a data file called
porteussave.dat
and in your last post you say
I have the save.dat
Finally in one of your last posts you say
cat /proc/cmdline
quiet \boot\syslinux\vmlinuz changes=/porteus initrd=boot\syslinux\initrd.xz
that shows to me, you have yet to grasp that changes= needs something ending in .dat for a windows format usb stick/drive

Is that clearer?

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 14:08
by George
aus9 wrote: In most of your posts, especially your first one you mention you have a data file called
porteussave.dat
Correct, that's the name of the file, which is also the default setting at Save File Manager.
aus9 wrote:and in your last post you say
I have the save.dat
My mistake, I meant to say "the .dat file". Sorry for the confusion.
aus9 wrote:Finally in one of your last posts you say
cat /proc/cmdline
quiet \boot\syslinux\vmlinuz changes=/porteus initrd=boot\syslinux\initrd.xz
Here I simply pasted the output from the two commands "cat /proc/cmdline" and "cat /var/log/porteus-livedbg", per Ed's kind suggestion in the previous post. As a newbie I'm not sure what that means, but I assumed that would reveal something about my setup and help explain the problem. Now that I look at it again, it seems that "changes=/porteus" should have become "changes=/porteus/porteussave.dat" if I indeed created the .dat file and updated porteus.cfg, which I think I have.
aus9 wrote:that shows to me, you have yet to grasp that changes= needs something ending in .dat for a windows format usb stick/drive
Is that clearer?
Well, that has been clear to me all along, which is why I created the .dat file in the first place. I think the instructions on the site are pretty clear about why and how to do it. But you're right, obviously there is something I'm not grasping, otherwise I wouldn't be wasting everyone's time here with my questions. Thanks for your patience anyways, I sincerely thank you, and everyone else here for their efforts to help me.

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 14:59
by Bogomips
George wrote:Now that I look at it again, it seems that "changes=/porteus" should have become "changes=/porteus/porteussave.dat" if I indeed created the .dat file and updated porteus.cfg, which I think I have.
Looks like that could be it. There are some parts of the documentation which might not be so clear.
George wrote:otherwise I wouldn't be wasting everyone's time here with my questions. Thanks for your patience anyways, I sincerely thank you, and everyone else here for their efforts to help me.
You are not wasting our time. Glad to help. We all have had to travel that same road. :)

Re: Can't Save Changes on a Live USB

Posted: 23 Nov 2015, 15:01
by brokenman
Can you now please post the entire contents of your porteus.cfg file? Thanks.