Session not saved on first shutdown

I'm trying to untangle this. Three or four people have reported this problem, I think it was three people with a frugal install, one person with a USB Flash drive install.

So far, only prit1 has provided me with the contents of /etc/rc.d/PUPSTATE and the GRUB entry (in the case of booting from USB Flash I would need the contents of syslinux.cfg or extlinux.cfg).

Prit1's PUPSTATE has this in it:
PUPMODE=5
PDEV1=''
DEV1FS=''
PUPSFS='hda5,ext3,/pup_398.sfs'
PUPSAVE=''
PMEDIA=''
ZDRV='hda5,ext3,/zdrv_398.sfs'

This means that Puppy was unable to determine what partition have booted off (no entry for PDEV1). Then looking at prit1's GRUB entry:

title Puppy 3.98
rootnoverify (hd0,4)
kernel (hd0,4)/puppy398/vmlinuz root=/dev/ram0
initrd (hd0,4)/puppy398/initrd.gz

For a start, 'root=/dev/ram0' is no longer needed, but it will be ignored.
vmlinuz and initrd.gz are specified in the puppy398 directry, but notice above that the pup_398.sfs and zdrv_398.sfs are found at '/' -- this is what has confused Puppy.

Are there also pup_398.sfs and zdrv_398.sfs files inside puppy398 directory? That's where they should be, everything in the same place.

There are two boot parameters that should be added to GRUB, like this:

kernel (hd0,4)/puppy398/vmlinuz pmedia=idehd psubdir=puppy398

Both of these are "helpers" to tell Puppy where the installation is. Configuration of GRUB is documented on the web:
http://puppylinux.com/hard-puppy.htm

Ideally, Puppy should be able to figure things out, even if 'pmedia' and 'psubdir' parameters are left off. Puppy should look at the '/puppy398/' specified in GRUB and deduct that that is what 'psubdir' should be. However, that is not so easy. The GRUB parameters unfortunately do not appear in /proc/cmdline, and it is not easy to figure out where the 'menu.lst' file is.

However, Puppy still should be able to fall back to reasonable guessing of PDEV1 and DEV1FS in PUPSTATE, which would fix the shutdown problem -- I'll see what I can do about that.

Although this probably covers prit's situation, and maybe the other two people who reported failure to save session with frugal install, I am puzzled about the person who had that problem with a USB Flash installation -- I need those details to figure it out.


Posted on 12 Apr 2008, 21:23


Comments:

Posted on 12 Apr 2008, 20:19 by kirk
Session not saved
I had this problem with alpha7. Seemed to work if I specified the psubdir, but now I can't reproduce it in beta1.

Another Problem, HotPup doesn't use ntfs-3g, just mounts read-only.


Posted on 13 Apr 2008, 5:05 by eprv
usb flash
These are the files on my system: epia-v mini itx booted from usb stick. I renamed isolinux to syslinux and changed pmedia from cdrom to /dev/sda1
I am not sure if this is correct but cdrom did not boot.
Hope this helps
contents is more than 800 charecters so the
PUPSTATE will follow

syslinux.cfg

default puppy
display boot.msg
prompt 1
label puppy
kernel vmlinuz
append initrd=initrd.gz pmedia=/dev/sda1
timeout 50




Posted on 13 Apr 2008, 5:06 by eprv
usb flash
here is PUPSTATE

PUPMODE=5
PDEV1=''
DEV1FS=''
PUPSFS='sda1,vfat,/pup_398.sfs'
PUPSAVE=''
PMEDIA='/dev/sda1'
SATADRIVES=''
#these directories are unionfs layers in /initrd...
SAVE_LAYER=''
PUP_LAYER='/pup_ro2'
#The partition that has the pup_save file is mounted here...
PUP_HOME=''
#(in /initrd) ...note, /mnt/home is a link to it.
#this file has extra kernel drivers and firmware...
ZDRV='sda1,vfat,/zdrv_398.sfs'
PSWAPFILE=''
PSAVEMARK=''



Posted on 13 Apr 2008, 6:59 by eprv
usb flash
pmedia was cd not cdrom sorry, that did not boot


Posted on 13 Apr 2008, 8:28 by ICPUG
Frugal to FAT32
Just to confirm that my frugal install to a FAT32 formatted hard disk works OK, complete with chance to save Pupsave file after first session.

I do specify the PMEDIA and PSUBDIR parameters though.


Posted on 13 Apr 2008, 8:29 by ICPUG
Frugal to FAT32
Just to confirm that my frugal install to a FAT32 formatted hard disk works OK, complete with chance to save Pupsave file after first session.

I do specify the PMEDIA and PSUBDIR parameters though.


Posted on 13 Apr 2008, 19:42 by raffy
net-boot-like
Quote: "notice above that the pup_398.sfs and zdrv_398.sfs are found at '/' -- this is what has confused Puppy"

This is how network-booting works - you've added that feature to Dingo, so there must be install situations that get into that case statement (in init).



Posted on 13 Apr 2008, 24:11 by Prit1
Prit1's Frugal
Barry,

I moved my pup_398 and zdrv_398 files to the puppy398 subfolder, changed my grub like you suggested and it worked. I could save my session.

But I dont know how it works without the above steps for 2.15CE, 2.16, 2.17.1, 3.01, 3.02 etc.

I do have the problem where ntfs is mounted as read-only. I had this problem earlier and I think it was dougal who suggested that I copy the mount script from 2.14R. I did and it worked.

Prit


Posted on 14 Apr 2008, 13:57 by MooDog
Sample menu.lst
Hi, Barry -

How about adding a sample menu.lst into the grub folder with various examples of boot parameters and an explanation of what they do, so that we an have an idea how to set the boot options?




Posted on 14 Apr 2008, 20:27 by BarryK
Howto configure grub
The instructions for configuring GRUB are here:
http://puppylinux.com/hard-puppy.htm



Posted on 15 Apr 2008, 4:42 by Magnus
Can't choose partition for pup_save file?
Thanks Barry - after reading your post, 4 Beta (3.98) now prompts me to make a pup_save file on shutdown. However, the script only seems to allow me to save the file on the same partition 4 Beta booted from (/hda1). This is inconvenient, since I only have 2 mb free on that partition... What happened to being able to choose where the pup_save file goes?

Alternatively, could I move the pup_save file to a partition with more space afterwards? And then resize it?


Posted on 9 Nov 2008, 6:40 by grizzly
Still a problem in 4.1.1
Setup: 2GB USB stick
1 /dev/sdd1 : 1.5-GB-fat32-partition to also work on Windows hosts
2 /dev/sdd2 : 0.5 GB-ext2-partition for puppy

boot with extlinux (mbr.bin) and installation type "usbflash"

As a result, no saving of a session is offered.

Before that, I had it on 1GB-Stick (probably a fake, holds only 100 M, was some kind of "customer fidelity reward" so I don't care) that only had one big ext2 partition: saving was offered, but failed due to the fake-nature of the thing (it is enough for netboot install for debian, ubuntu or whatever still - so I am keeping it)

Here the resulting PUPSTATE and extlinux:
(oops - there is no c&paste from the terminal to the browser?)

default vmlinuz initrd=initrd.gz pmedia=usbflash pfix=copy nosmp

PUPMODE=5
PDEV1=''
DEV1FS=''
PUPSFS='sdd2,ext2,/pup_411.sfs'
PUPSAVE=''
PMEDIA='usbflash'
#v3.97: kernel with libata pata has both sata and pata drives in ATADRIVES...
ATADRIVES='sda sdb sdc '
#these directories are unionfs layers in /initrd...
SAVE_LAYER=''
PUP_LAYER='/pup_ro2'
#The partition that has the pup_save file is mounted here...
PUP_HOME=''
#(in /initrd) ...note, /mnt/home is a link to it.
#this file has extra kernel drivers and firmware...
ZDRV=''
#complete set of modules in the initrd (moved to main f.s.)...
ZDRVINIT='no'
PSWAPFILE=''
PSAVEMARK=''

I think I need to add a lot of directories, following the other posts. For now, I will try to convice the installer to make me a "disk install" but I understand that wears down the flash faster?


Posted on 25 Oct 2009, 15:33 by Jan Wielenga
Might be grub related
I installed pup with grub for windows as I do not have a bootable cd rom for my old vaio.

Could not save the config. Copying a valid pup save seems to work. when deleting the pupsave the same problem of not able to save the config.

The filesystem does not show /mnt/home implying a read only fs.

another issue with grub for windows is that vmlinuz has to be set to executable.

After I installed grub from puppy disk everything works fine, except uid disks (Ubuntu).