site  contact  subhomenews

Session not saved on first shutdown

April 12, 2008 — BarryK
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.

Comments

Session not saved
Username: kirk
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.

usb flash
Username: eprv
"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

usb flash
Username: eprv
"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=''

Frugal to FAT32
Username: ICPUG
"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.

Frugal to FAT32
Username: ICPUG
"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.

net-boot-like
Username: raffy
"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).

Prit1's Frugal
Username: Prit1
"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

Sample menu.lst
Username: MooDog
"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?

Howto configure grub
Username: BarryK
"The instructions for configuring GRUB are here: http://puppylinux.com/hard-puppy.htm

Can't choose partition for pup_save file?
Username: Magnus
"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?

Still a problem in 4.1.1
Username: grizzly
"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?

Might be grub related
Username: Jan Wielenga
"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).


Tags: puppy