How to create Save file on the same flash drive as boot iso?

Using applications, configuring, problems
Post Reply
Message
Author
dominic133
Posts: 2
Joined: Sat 16 Feb 2019, 01:47

How to create Save file on the same flash drive as boot iso?

#1 Post by dominic133 »

Hello Puppy Linux Forum,

I am very new to Puppy Linux (have used standard ubuntu os for awhile as a linux novice), but I really like Puppy's lightweight design and portability. I also just like the simplicity, look and feel of it. However, I am having a lot of trouble creating a flash drive that can store a save file and boot xenialpup iso on the same hardware. I've been troubleshooting for the better part of a week without much success. I've looked through the forums, watched a lot of great videos, and read a good numbers of manuals and guides linked in responses to folks with seemingly similar issues.

My question is, is it possible to have a bootable flash drive with Puppy Linux on it that continues to save my content and the changes I have made (i.e. background, icon themes, wifi login, small text files, etc.) during my session?

I am able to install the xenialpup64-7.5-uefi.iso using balenaEtcher from my MacOS and boot from a usb flash drive to use Puppy. I make a couple changes and when I attempt to save before a reboot, the changes are never saved properly despite naming and making a sf save file. When I reboot and enter Puppy from the same flash drive, none of the changes or information are saved and I have to begin with the startup wizard (i.e. set time, connect network) again.

My understanding is that Puppy boots into RAM to free up the CD or USB drive it booted from. Am I missing a step or simply not able to save back to the usb drive I booted from because I do not have a CD/DVD drive on my laptop?

After a few failed attempts, I added another flash drive to another port on my laptop and when rebooting set the sav file to that flash. This method worked when I rebooted, but does this mean I have to carry the two usb drive with me wherever I want to use Puppy on my laptop or another computer? Again, my hope is to have a simple, lightweight, Linux OS I can take with me and use on various computers for security and familiarity.

One other step I took was to use the Installer software on xenialpup to reinstall Puppy Linux to a second flash drive after booting from the first (which again works, but does not save and was created using balenaEtcher on Mac OS). On this second drive, I used GPart in the Puppy OS to format the flash drive to fat16, fat36, ext3, and ext4. For the formats which could be set to 'boot' using the master boot function, I did that in GPart. Then I would install the xenialpup.sfs file using the Installer program. This time when rebooting, I was sometimes able to create the sav file on the drive I had just used with the Installer, except when starting up again the BIOS could not find/recognize/reveal the flash drive. After a number of attempts at a single partition with the boot file and save file, I even tried creating multiple partitions, some with the install file and some with the sav file.

So far nothing I have tried (except the few instances when I used two flash drives, one for the iso file and one for the save file) has worked. Is the hardware on the MacBook Air just not compatible enough to make it work? I know most Linux users have computers typically designed for Windows. If my only problem is the computer I am using, I could probably get access to a Windows PC fairly easily. I just want to see if anyone has other ideas beforehand.

Thanks so much for any tips, hints, steps, or directions to head in (also if there is just another forum thread I should be on!). I hope what I'm saying makes sense.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

Won't a frugal install in a flash drive ask if you want a Save file in the same flash drive?

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

#3 Post by scsijon »

My way is (slightly long winded, but it works) to:>

1-boot your computer with ANOTHER version, (so the flash drive is free);

2- plugin the flash drive and note what it's name is (sd?);

3-startup gparted and assign it to the flash drive you want to change;

4-shrink the iso PARTITION down, so you have a free space slightly larger than the size of wanted save file size;

5-create a second partition on the flash drive as ext2//3/4;

6-APPLY the change in gparted;

7- shutdown the computer;

8- boot it with the particular flash drive;

9- add a line to /etc/fstab to enable the second flash drive partition when starting it up;

10- create a savefile on that new partition.

\and off you go...

\also means you can update the iso version (carefully), or manually archive the savefile without having to startup the flash drive.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#4 Post by bigpup »

When you make the save, you have selected the USB flash drive as the device to put it on?


When you boot are you seeing a menu with several entries for how to boot?

The first entry should do a normal boot and uses the save after you make a save.

If you are using the entry that says something like ram or ram only.
That entry makes it boot and not us any save.
That is there so you can still boot, if something goes wrong with the save.

Puppy Linux as a frugal install (you have that on the USB stick) will always boot and load into ram.
That is normal operation.
The save will stay on the drive loaded as read/write.

Whatever you do do not use fat16 format.
That is just too old to use.


Fat 32 format is normal for a USB flash drive, because that is the way they come from manufactures.
However, it has a max file size limit of 4GB.
So that is as big as the save file can be.

Exit formats exit 2, 3, or 4.
No file size limit.
Have save option on kind to make.
A save file or a save folder.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#5 Post by bigpup »

My understanding is that Puppy boots into RAM to free up the CD or USB drive it booted from.
First it always boots into ram, when installed to a CD/DVD or USB flash drive.

On a CD/DVD it will release the CD/DVD because there is nothing else needed on it.
This allows using the drive for some other CD/DVD.

On A USB drive install, the save is usually on the USB drive.
That stays mounted to access the save.
However, you usually have other free USB ports to use for other USB devices.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#6 Post by mikeslr »

Hi dominic133,

I'm surprised bigpup didn't ask, but his post brought it to my mind. From your post, I understand that you have a Mac and that you used balenaEtcher to 'burn' to the USB-Stick. Things being as they are, most 'newbies' have PCs but enough of them have had Macs that you don't qualify as a pioneer. Puppies have been booted from Macs before.

balenaEtcher, however, is something I hadn't previously heard about. A quick 'google' revealed it claims to be a technological innovation making it easy to install and boot from an SD card. As being able to do so has been a problem, I'm glad to learn that there's a way to overcome that problem. But that isn't your problem. You are booting from a USB-Stick.

Linux operating systems are often packaged as ISOs, a technology first developed for CDs. Within the ISO are files: Puppies files are compressed. What applications which 'burn' an ISO to a USB-Stick, Hard-Drive, CD/DVD or SD-Card can do is (1) either simply copy the ISO or (2) Unpack the ISO and perhaps the compressed files within it. But (3) they also 'burn' to the target medium a bootloader [sometimes this is optional]. It is the bootloader system which instructs the computer what files to load into RAM and how to manage them.

The first file a bootloader should read is initrd(gz/xz): the initial ram disc which contains instructions regarding what to do with the other files. The most commonly used bootloaders with Puppies are Grub4dos (Puppy's 'native'), Grub2 and its predecessor Grub, now commonly referred to as Grub Legacy. Those bootloaders, follow the instructions in Puppy's initrd and will load into RAM a SaveFile or SaveFolder unless it finds the boot-argument 'pfix=RAM'.

Perhaps the bootloader balenaEtcher installs works differently. If it uses some version of Grub4dos, there will be a text file named Menu.lst. If it uses some version of Grub2, there will be a configuration file named grub.cfg.

After booting into Puppy, look for either of those or any 'cfg' file at the top of the USB-Key or within a folder often named 'boot'. Advise us what bootloader was used, and EXACTLY what of its grub.cfg or menu.lst or similar provides. Perhaps we will be able to suggest how to edit the bootloader balenaEtcher uses.

The alternative would be to follow scsijon's advice or some alternative such as this:

Boot into xenialpup64-7.5-uefi on one USB-Key*. Download Ted Dogs' No-Format Install package and follow the instructions from here http://www.murga-linux.com/puppy/viewto ... 727#818727, copying the package to the base of a 2nd USB-Stick.

-=-=-=-=
I don't have a Mac. Perhaps this can be done while running MacOS so that only one USB-Stick is necessary.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#7 Post by Mike Walsh »

I'm thinking scsijon is probably on the right track. Use two USB sticks.

Fire up Puppy with your working USB stick. Plug the second USB stick in (noting what label it comes up with; sdb2, sdb3, etc). Then use gParted (Menu->System->GParted partition manager) to format the second stick with ext3 (my personal recommendation). Create a main partition. Leave 2 GB 'free' at the end. Format the 'end' 1 GB of this as 'linux-swap'. This leaves 1 GB free space, which helps to prolong the life of the flash drive's controller chip, as it shuffles blocks around.

Before leaving gParted, make the 'main' partition bootable (set the 'boot flag'). Rt-clk the partition, select 'Manage flags', tick the first checkbox, 'boot'.

Then, from the running Puppy, use the Puppy Universal Installer (Menu->Setup->Puppy universal installer) to install Pup to that 'main' partition you've just created on the second flash drive. (If the stick is sdc, you want sdc1, for instance).

-------------------------------------

When this is done, install the Grub4DOS bootloader (Menu->System->Grub4DOS bootloader config).

1.Select the drive you've just installed to.
2. Tick the checkbox for 'Search within only this device'.
3. Click 'OK'.
4. Click 'OK' again.
5. Click 'OK' a third time.

Grub4DOS is now installed.

-----------------------------------------

Now, by using this USB stick and selecting it in the BIOS as the first boot device (or however it works on a Mac; I, too, have no experience of them), you should be able to boot into Puppy. Set up the first run stuff. Then, immediately shut down.

Puppy will ask if you want to save the session. It will recommend the correct drive/partition; just make sure it's the same one your Puppy is on. Go for 'Save-folder'; Xenialpup should have this option. Follow things through, but don't select encryption; it's a PITA, and more trouble than it's worth. If the 'final sanity check' looks right, click OK.....and your save-folder should be created on the same drive Puppy lives on.

Simples!

Let us know how you get on, please.


Mike. :wink:

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#8 Post by bigpup »

As always we are having to guess at some of this!

It would really help if you could tell us what you see when you boot?
Do you see a menu of ways to boot?
If yes.
What are the options it gives?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

dominic133
Posts: 2
Joined: Sat 16 Feb 2019, 01:47

some results

#9 Post by dominic133 »

Hello Mike, Mike, and BigPup.

Thank you all so much for your suggestions and helping with this question. i'm humbled by your willingness and knowledge.

I've tried a few different avenues since my last post, including jumping on a Windows PC to see if the install of XenialPup or Slacko on this machine works differently. Indeed it does help me with the save issue to a certain extent.

When I did use the Gparted and then universal installer on my Mac, I could typically find the flash drive, but when I selected it a message stating no software recognized appeared.

This time around though, (from Windows 8 Machine) I used Unetbootin to install Slacko onto the first usb. Booted from that after restart, made changes and saved back to the usb without any issue. As far as I can tell this flash drive will work on other PC with a standard BIOS setup on Windows machines. However, when I attempted a boot from my Mac computer, the flash drive was not recognized (no drive appeared next to the internal OS so no way to boot into Slacko). Maybe Unetbootin defaults to a fat format not recognized by a Mac formatted PC?

After a successful boot and save on the Windows PC, I followed the steps of booting up again from the first USB, inserting a second, partioning per Mike's suggestions, running the universal install (w/ boot flag selected), followed by Grub4DosConfig. The issue I am running into is that a boot file does not seem be be installing on the second flash drive. "Grub4DosConfig Error- "Somewhat error occured. See /tmp/grub4dosconfig/grub4dosconfig.log" Which leads me to a log that reads "Too fe sectors to hold GRLDR.MBR ... failed to install bootlace.com"

Am I just running around in circles? Even if I can install and save to a second USB will it only work with Windows formatted BIOS startups? Of course, none of this feels like a dead end. You all have helped me get closer and closer. I think I am almost there. Can't thank you enough.

williams2
Posts: 337
Joined: Fri 14 Dec 2018, 22:18

#10 Post by williams2 »

When I wanted to have a savefile on my flash drive, I seemed to need the boot option pmedia=usbflash

But I don't have a Mac.

Post Reply