Page 1 of 1

Boot from USB, how to put Save File on HDD?

Posted: Thu Oct 01, 2020 9:31 am
by cobaka
Fellow Puppians!

I installed Puppy Linux to flash drive. I want the save-file on the rotating drive, sda2 when I shut down for the first time. How can I do this?

Details of installation.
Installation method: manual. Detail below.

Method: Downloaded uPupBB32-8-UEFI.iso from (probably) SourceForge.
Then, running a copy of uPupBB I installed puppy to a flash drive.

FIRST INSTALLATION
Installing uPupBB_19 on 4GiB, ident: JQ-3
Hardware: Dell 8600.
Installation tool: uPupBB > menu > setup > puppy installer (lightning bolt)
> bootflash installer (lightning bolt) > sdc3

Bootflash SDC (offers 3 methods). Choose the burning CD (write ISO files to USB drive.)
The iso file: bionicpup32-8.0-uefi.iso
Format for JQ-3. None. Left to the loader; see below.
RESULT: A bootable thumb-drive, CD ISO-9660 format. Read-only.

SECOND INSTALLATION.
Booted using the newly-installed Puppy. Using gParted:
Created new partition table. Partitioned drive JQ_#1, as follows:
Part #1 == 900MiB as FAT32 with boot flag set. Part #2 == rest of 4GiB drive as ext3.
Created a folder (uPupBB32-v19) and copied files from JQ-3 to folder on drive JQ-1
Used grub4DOS to install bootloader to drive JQ_#1.
Added command -- forcepae to kernel line in menu.lst. (end of installation)

The flash drive is now bootable and r/w. Will boot files w/out PAE line eg P4-M.

I am using this drive to write this note. I wish to shut down, and when I do I believe Puppy will ask to create a save-file to the flash drive. I want the save file on the conventional rotating drive, sda2.
How can I do this?

cobaka

Re: Location of PupSave File

Posted: Thu Oct 01, 2020 10:03 am
by bigpup
Have the the drive you want to put the save on mounted.
Should have a drive icon, on the desktop, for all drives on the computer.
See what it labels the drive you want to put the save on. Example: sda2

When you do the first shutdown/reboot
It should ask if you want to make a save.
It should show a listing of drives on computer you can choose from as location to put the save.
Example: choose sda2
The save will be written to that drive.

If the drive is not showing on the selection list.

Do not make a save and do the following first.

It is normal for USB installs to put the save on the USB.
This keeps all the files on the same drive.
In the boot menu entry is a command pmedia= that tells the Puppy what kind of drive it is running on.
This pmedia= entry does control some of the way Puppy operates.
Yours should be pmedia=usbflash

Grub4dos boot loader uses the menu.lst file to configure the boot menu.
open that in a text editor.
Find the entry used to boot UPupBB.
Change the pmedia=usbflash to pmedia=cd.
That makes it think you are running from a CD install and it will be able to put the save anyplace.

Boot with that edited menu entry.
Shutdown and make a save choosing example: sda2 location to put the save.


I

Re: Boot from USB, how to put Save File on HDD?

Posted: Fri Oct 02, 2020 4:54 am
by cobaka
@bigpup
Before I commit myself to the location of the save-file, I must consider the advantages and disadvantages of the conventional (rotating) drive vs the flash drive.

As I understand the situation a rotating (disc) drive is much faster than a flash drive.
So - since my CPU is slow, will I get some improvement every 30 minutes when the OS writes the save-file if I use a conventional drive. Yes? No? What do you say?

(2) As I understand, I can configure Puppy to write the save-file to 'disk' only when I shut down by making some variable equal to "0". That means I would lose any any work (not saved to a /mnt/ drive) if the power went off (or the OS fell over)? Is that right? Apart from that, the only problem saving at shutdown would have no other consequences, yes? Generally I try to store most files outside the save file on some /mnt/sdx/ partition anyway.

(3) There is a theoretical limit to the number of times I can write to a flash disk, but let us say it is 10^5. Then, if I save every hour, 365 days per year the disk will last 11 years, I think. Let's not worry about that.

I don't understand how much benefit I will get (every 30 minutes) if the save file is on the rotating drive. Will I notice the difference? Maybe there are other factors I didn't mention. I can see the advantage of keeping the boot files and the save file (and my working environment) together.

The most important thing now is this: I have a reliable method of installing puppy linux to a flash-drive using conventional tools. (either MikeSLR's copy using ROX or the conventional installer from the menu etc (described before)) Thanks to you I can do this on a CPU lacking the PAE.

собака

Re: Boot from USB, how to put Save File on HDD?

Posted: Fri Oct 02, 2020 6:20 am
by garnet
Hi собака,
cobaka wrote: Fri Oct 02, 2020 4:54 am As I understand the situation a rotating (disc) drive is much faster than a flash drive.
Generally speaking, yes.
So - since my CPU is slow, will I get some improvement every 30 minutes when the OS writes the save-file if I use a conventional drive. Yes? No? What do you say?
Generally speaking, yes, but it really depends. The only way to know is to try ^_^
(2) As I understand, I can configure Puppy to write the save-file to 'disk' only when I shut down by making some variable equal to "0".
No, if you set to "0", it will not save anything even when you shut down. You will have to manually click the save icon on the desktop to save your session. Otherwise everything will be lost at shutdown.
That means I would lose any any work (not saved to a /mnt/ drive) if the power went off (or the OS fell over)? Is that right? Apart from that, the only problem saving at shutdown would have no other consequences, yes? Generally I try to store most files outside the save file on some /mnt/sdx/ partition anyway.
Yes.
(3) There is a theoretical limit to the number of times I can write to a flash disk, but let us say it is 10^5. Then, if I save every hour, 365 days per year the disk will last 11 years, I think. Let's not worry about that.
Rotating harddisks also have lifetime, MTBF, number of writes, head loading/unloading ... ^_^
I don't understand how much benefit I will get (every 30 minutes) if the save file is on the rotating drive. Will I notice the difference? Maybe there are other factors I didn't mention. I can see the advantage of keeping the boot files and the save file (and my working environment) together.
It really depends. The thing that gets saved is the "difference" or the "changes" that happen during the session. If you generally don't make a lot of changes during the session, there is little to save and the difference may not even be noticeable. But if you generate a lot of changes, then it may.

Re: Boot from USB, how to put Save File on HDD?

Posted: Tue Oct 06, 2020 12:08 pm
by bigpup
No, if you set to "0", it will not save anything even when you shut down. You will have to manually click the save icon on the desktop to save your session. Otherwise everything will be lost at shutdown.
Setting the save interval to 0 does not stop writing to the save on shutdown or reboot.
It will always save on shutdown or reboot, but you can set it to ask if you want to save.

menu->System->Puppy Event Manager->Save Session
.
Screenshot.jpg
Screenshot.jpg (61.86 KiB) Viewed 1645 times

Re: Boot from USB, how to put Save File on HDD?

Posted: Tue Oct 06, 2020 3:12 pm
by mikeslr
FYI, if you do not set your Save Session to 0/zero, 'Ask' at shut-down and your Puppy is in the process of doing an Automatic Save when you experience a power-outage or power-surge, you run the risk of having a corrupted SaveFile or garbage written to your SaveFolder.

Having Puppy automatically Save also means that it will Save all the mistakes you've made, the applications you've tried which didn't work, or working broke something else, and all the junk you didn't know you picked up while web-surfing written to your SaveFile/Folder. An 'uninstall' doesn't entirely recover space in a SaveFile that was used by an 'install'.

I think the following tip from Puppy's early days is still valid. With Puppy on a USB-Key and its SaveFile on a hard-drive, if you copy the Puppy_Version_NoXXX.sfs to the same location as the SaveFile/Folder on your hard-drive, on bootup Puppy will use the Puppy_Version_NoXXX.sfs on the hard-drive speeding up the bootup process.

I wouldn't know. Except for 'special-purpose' puppies entirely on USB-Keys, all my Puppies are physically located entirely in folders on hard-drives. However, once they are there I run grub4dos which writes to a small USB-Key. Plug in the key -- boot Puppies. Unplug the key, boot Windows/'Big Boy Linux'. Add a Puppy > re-run grub4dos or manually edit its menu.lst, whichever seems easiest.

Re: Boot from USB, how to put Save File on HDD?

Posted: Wed Oct 07, 2020 6:42 am
by garnet
bigpup wrote: Tue Oct 06, 2020 12:08 pm
No, if you set to "0", it will not save anything even when you shut down. You will have to manually click the save icon on the desktop to save your session. Otherwise everything will be lost at shutdown.
Setting the save interval to 0 does not stop writing to the save on shutdown or reboot.
It will always save on shutdown or reboot, but you can set it to ask if you want to save.

menu->System->Puppy Event Manager->Save Session
.
Screenshot.jpg
Thank you for the correction @bigpup ^_^