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

Post here if you are a new Porteus member and you're looking for some help.
George
White ninja
White ninja
Posts: 15
Joined: 22 Nov 2015, 12:01
Distribution: Porteus
Location: hongkong

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

Post#1 by George » 22 Nov 2015, 14:01

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.
Last edited by George on 25 Nov 2015, 16:46, edited 1 time in total.

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

Re: Can't Save Changes on a Live USB

Post#2 by brokenman » 22 Nov 2015, 14:34

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

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

Re: Can't Save Changes on a Live USB

Post#3 by fanthom » 22 Nov 2015, 16:01

@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.
Please add [Solved] to your thread title if the solution was found.

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

Re: Can't Save Changes on a Live USB

Post#4 by brokenman » 22 Nov 2015, 19:23

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

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

Re: Can't Save Changes on a Live USB

Post#5 by Ed_P » 22 Nov 2015, 22:08

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

George
White ninja
White ninja
Posts: 15
Joined: 22 Nov 2015, 12:01
Distribution: Porteus
Location: hongkong

Re: Can't Save Changes on a Live USB

Post#6 by George » 23 Nov 2015, 04:11

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

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

Re: Can't Save Changes on a Live USB

Post#7 by Ed_P » 23 Nov 2015, 05:02

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
Ed

George
White ninja
White ninja
Posts: 15
Joined: 22 Nov 2015, 12:01
Distribution: Porteus
Location: hongkong

Re: Can't Save Changes on a Live USB

Post#8 by George » 23 Nov 2015, 06:29

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

roadie
Full of knowledge
Full of knowledge
Posts: 400
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Re: Can't Save Changes on a Live USB

Post#9 by roadie » 23 Nov 2015, 06:54

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.

George
White ninja
White ninja
Posts: 15
Joined: 22 Nov 2015, 12:01
Distribution: Porteus
Location: hongkong

Re: Can't Save Changes on a Live USB

Post#10 by George » 23 Nov 2015, 07:44

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

User avatar
tmsg
Black ninja
Black ninja
Posts: 44
Joined: 15 Sep 2015, 14:29
Distribution: arch, mx, porteus
Location: York, UK

Re: Can't Save Changes on a Live USB

Post#11 by tmsg » 23 Nov 2015, 10:35

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.

aus9

Re: Can't Save Changes on a Live USB

Post#12 by aus9 » 23 Nov 2015, 12:52

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?

George
White ninja
White ninja
Posts: 15
Joined: 22 Nov 2015, 12:01
Distribution: Porteus
Location: hongkong

Re: Can't Save Changes on a Live USB

Post#13 by George » 23 Nov 2015, 14:08

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.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Can't Save Changes on a Live USB

Post#14 by Bogomips » 23 Nov 2015, 14:59

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. :)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

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

Re: Can't Save Changes on a Live USB

Post#15 by brokenman » 23 Nov 2015, 15:01

Can you now please post the entire contents of your porteus.cfg file? Thanks.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply