Fatdog64 crashed and couldn't reboot off of savefile

For talk and support relating specifically to Puppy derivatives
Message
Author
PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

BOOTSTATE path

#21 Post by PappyPuppy »

This file mentions the old savefile name - it's the first mention I've seen of it:
AUFS_ROOT='/aufs'
BASELINE_MOUNT='/aufs/pup_init'
MODULE_SFS_MOUNT='/aufs/kernel-modules'
SAVE_DEV_PROTO='/aufs/devsave'
SAVEFILE_PROTO='/fd64save.ext4'
MULTI_PREFIX='multi-'
TMPFS_MOUNT='/aufs/pup_rw'
BASE_SFS_MOUNT='/aufs/pup_ro'
BASE_SFS_PATH='/fd64.sfs'
AUFS_ROOT_ID='si_15c7853eb87ab951'

At least I'm starting to peel back some of the onion. I guess the file is gone though - I need to recreate it, but I can't find out how Linux shuts itself down, so I can find some script that runs and kicks off the savefile creator. Once I get that, I should be able to read the script, write another short script, then run it to create the savefile, all without shutting down.

I found a mount.aufs and umount.aufs or something in there.

aufs/pup_rw has the same environment variables in a file called BOOTSTATE in that dir also.

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

Little by little, I'm making progress

#22 Post by PappyPuppy »

The init process reads something - this is in the directory sbin.

That directory has some files .ext2, .ext3, and .ext4 - these are savefiles.

I need to start looking at boot, init, grub, and shutdown, and figuring out if there are scripts or just -h/-r etc.., controlling them.
Progress, albeit slowly.

I cannot find the inittab file - hmm? I guess it's in etc, need to look there ...
Here's inittab, not much makes sense yet.
::sysinit:/etc/rc.d/rc.sysinit
tty1::respawn:/sbin/getty -n -l /bin/autologin 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
::ctrlaltdel:/sbin/reboot

# Stuff to do before rebooting
::shutdown:/etc/rc.d/rc.shutdown
::shutdown:/etc/rc.d/rc.cleanup

# for testing clean unmounts (type "kill -3 1" to activate this)
::restart:/bin/sh 2>&1

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

There is an rc.sysinit file in directory etc/rc.d

#23 Post by PappyPuppy »

Perhaps I need to look for it there.

#!/bin/ash
# puppy-compatible rc.sysinit - re-written from scratch
# (C) James Budiono, 2012, 2013, 2014, 2015 except where noted
# License: GNU GPL Version 3 or later
#
# not supported: full-install
# boot time parameters handled: pkeys extrasfs

### configuration
PRELOADED_MODULES=/etc/modules
export RC_NETWORK_PID=/tmp/rc.network.pid # record pid in case we need to wait
export RC_SERVICES_PID=/tmp/rc.services.pid # record pid in case we need to wait
export BOOTSTATE_PATH=/etc/BOOTSTATE
export PATH=/usr/sbin:/usr/bin:/sbin:/bin # explicit path - /usr first
. $BOOTSTATE_PATH # load initramfs-time configuration

############ minimum necessary setup #################
# set system clock
HWCLOCKPARM="--localtime" # default
HWCLOCKCONF=/etc/hwclock.conf
[ -e $HWCLOCKCONF ] && . $HWCLOCKCONF # HWCLOCKPARM, HWCLOCKRTC
hwclock --hctosys $HWCLOCKPARM $HWCLOCKRTC
systz auto > /dev/null # set kernel timezone (systz) - for vfat

# mount devpts, /tmp and /dev/shm and swap (if any)
[ ! -L /etc/mtab ] && { rm -rf /etc/mtab; ln -s /proc/mounts /etc/mtab; }
busybox mount -a # as configured in /etc/fstab
busybox swapon -a # as configured in /etc/fstab
mkdir -p /tmp/lock # dynamically create this directory every time

# Check for clean shutdown
if [ -e /etc/booted ] ; then
echo "Running auchk..."
auchk -w $SAVEFILE_MOUNT
else
touch /etc/booted
fi

# setup /mnt/home - the partition where savefile is
# this is puppy-compatibility stuff but may be needed by load_sfs.sh too
rm -f /mnt/home
[ "$SAVE_DEV_MOUNT" ] && ln -sfT $SAVE_DEV_MOUNT /mnt/home
[ "$MULTI_MOUNT" ] && ln -sfT $MULTI_MOUNT /mnt/home

# load boot-time extra sfs
[ "$extrasfs" ] &&
echo "$extrasfs" | sed 's/,/ /g' | xargs -n 1 /sbin/load_sfs.sh --load

# load permanent extra sfs
/sbin/load_sfs.sh start

# pre-load modules, if any
for p in $(sed 's/#.*//' $PRELOADED_MODULES); do echo Loading module $p; modprobe $p; done

# pre-load radeon/nouveau: workaround for kernel 3.7/3.8 module load race conditions
lsmod | grep -q radeon || find /sys/devices/pci* -name uevent | xargs cat 2>/dev/null |
grep -q ^MODALIAS=pci:v00001002d0000 && echo Loading radeon module early && modprobe -b radeon
lsmod | grep -q nouveau || find /sys/devices/pci* -name uevent | xargs cat 2>/dev/null |
grep -qE "^MODALIAS=pci:v000012D2d|^MODALIAS=pci:v000010DEd" && echo Loading nouveau module early && modprobe -b nouveau

# start udev
echo > /proc/sys/kernel/hotplug # disable hotplug leftover from init
! [ -e /etc/udev/hwdb.bin ] && /sbin/udevadm hwdb --update # rebuild hwdb.bin if missing
/sbin/udevd --daemon
/sbin/udevadm trigger --action=add # refresh udev database

############### additional stuff ######################

# clean up empty mountpoints left over by filemnt
rmdir /mnt/+*

# nls modules for accessing filesystems
modprobe nls_iso8859-1 # default western european codepage
modprobe nls_cp437 # us and canada codepage
modprobe nls_utf8 # joliet cd-roms

# load apm if acpi isn't available
[ ! -d /proc/acpi ] && modprobe apm #v406

#v408 kirk: Check for laptop battery...
modprobe battery
if [ -d /proc/acpi/battery ]; then
results="`find /proc/acpi/battery -mindepth 1 -type d`"
if [ ! -z "$results" ]; then # it's a laptop, load other modules
modprobe ac
modprobe thermal
modprobe fan
else
rmmod battery
fi
fi

############## start network and services ##############

### start network
# set hostname - use unique hostname when no savefile is used
[ -z "$SAVEFILE_MOUNT" ] && echo fatdog64-$(dmidecode -s system-uuid | md5sum | cut -c -3) > /etc/hostname
read p < /etc/hostname && sed -i'' -e "1 {s/^.*$/127.0.0.1 localhost $p/}" /etc/hosts
hostname -F /etc/hostname

echo 1 > /proc/sys/net/ipv4/ip_dynaddr # for dial-up modem
/etc/rc.d/rc.network start &
echo $! > $RC_NETWORK_PID

### start services
/etc/rc.d/rc.services start &
echo $! > $RC_SERVICES_PID


################# puppy compatibility stuff ################
. /etc/DISTRO_SPECS # puppy-compatible description

# system id
echo -e "${DISTRO_NAME} Linux\n`uname -s` `uname -r` [`uname -m` arch]\n\n" > /etc/issue

# device links - cdrom & dvd
rm -f /dev/cdrom /dev/dvd /etc/cdburnerdevice
while read cdrom canwrite isdvd; do
! [ -e /dev/cdrom ] && ln -s /dev/$cdrom /dev/cdrom
! [ -e /etc/cdburnerdevice ] && [ "$canwrite" = yes ] && echo $cdrom > /etc/cdburnerdevice
! [ -e /dev/dvd ] && [ "$isdvd" = yes ] && { ln -s /dev/$cdrom /dev/dvd; hdparm -d 1 /dev/$cdrom; } > /dev/null
done << EOF
$(sed 's/\t\t*/|/g' /proc/sys/dev/cdrom/info | awk -F"|" '
/drive name/ { numdrives=NF-1; for (i=2; i<=NF; i++) drives[i-2]=$i; }
/Can write/ { for (i=2; i<=NF; i++) { capability["can_write" (i-2)]="no"; if ($i == "1") capability["can_write" (i-2)]="yes"; } }
/read DVD/ { for (i=2; i<=NF; i++) { capability["is_dvd" (i-2)]="no"; if ($i == "1") capability["is_dvd" (i-2)]="yes"; } }
END { for (i=0; i<numdrives; i++) print drives, capability["can_write" i], capability["is_dvd" i]; }
' | sort )
EOF

# device links - mouse
[ ! -f /etc/mousedevice ] && echo "input/mice" > /etc/mousedevice
read p < /etc/mousedevice && [ "$p" = "psaux" ] && echo "input/mice" > /etc/mousedevice
read p < /etc/mousedevice && ln -sfT /dev/$p /dev/mouse

# mouse drivers - moved here from xwin
grep -q 'ttyS' /etc/mousedevice && modprobe sermouse
grep -q 'input/mice' /etc/mousedevice && modprobe usbhid

# load keymaps and console fonts, modified from original by Barry K
# assuming that keymaps are in unicode
[ -z "$pkeys" ] && [ -e /etc/keymap ] && read -r pkeys < /etc/keymap
if [ "$pkeys" ]; then
# default - empty fontmap, iso-8859-1 codepage
rm -f /etc/fontmap
echo ISO-8859-1 > /etc/codepage

loadkeys "$pkeys" 2>/dev/null && echo Loading keymap "$pkeys" &&
echo "$pkeys" > /etc/keymap
case "$pkeys" in
us*) # us with intl support
setfont LatGrkCyr-8x16
echo LatGrkCyr-8x16 > /etc/fontmap
;;
de*|be*|br*|dk*|es*|fi*|fr*|it*|no*|se*|pt*)
echo 850 > /etc/codepage
modprobe nls_cp850
setfont LatGrkCyr-8x16
echo LatGrkCyr-8x16 > /etc/fontmap
;;
cz*|hu*|pl*|ro*|sk*|croat*|slovene*)
modprobe nls_cp852
modprobe nls_iso8859-2
echo 852 > /etc/codepage
setfont LatGrkCyr-8x16
echo LatGrkCyr-8x16 > /etc/fontmap
;;
big|bbig)
setfont "$pkeys"
echo "$pkeys" > /etc/fontmap
;;
esac
else
[ -s /etc/fontmap ] && read p < /etc/fontmap && setfont $p
fi

### other little things
dmesg > /tmp/bootkernel.log # store initial bootlog
! [ -e /etc/ld.so.cache ] && echo "Generating ld.so.cache (one-time only) ..." && ldconfig

### dump compatibility stuff to /etc/rc.d/PUPSTATE
{
echo "# This file exists for compatibility with Puppy apps and scripts."
echo "# Fatdog-only applications don't use this file."
echo "# Only important entries are emulated, the rest are left blank."

#PUPMODE original bitmask
#bit 0 = 1 tmpfs
#bit 1 = 2 full install
#bit 2 = 4 have base sfs
#bit 4 = 8 have savefile
#bit 6 = 64 multisession
#common values= 2 (full install), 3 (full install on flash), 5 (first boot),
# 12 (frugal), 13 (frugal on flash), 6 (full install), 7 (full install on flash), 77 (multisession)
#
# fake it - 12 or 13 (frugal install)
if [ "$TMPFS_MOUNT" ]; then # RAM layer is used
[ "$SAVEFILE_MOUNT" ] && PUPMODE=13 || PUPMODE=5
PMEDIA=ataflash
else
[ "$SAVEFILE_MOUNT" ] && PUPMODE=12
PMEDIA=atahd
fi
echo PUPMODE=$PUPMODE

# -- used during boot-up, we don't use these
#PDEV1= boot device (where the base.sfs is located)
#we use basesfs if exist, otherwise just use save device
PDEV1=$BASE_SFS_DEVICE; [ -z $PDEV1 ] && PDEV1=$SAVEFILE_DEVICE
echo PDEV1=${PDEV1##*/}
#DEV1FS= filesystem of PDEV1
echo DEV1FS=$(guess_fstype $PDEV1)
#PUPSFS='sda1,ext3,/fd64/fd64-521.sfs' - location of base.sfs
echo PUPSFS=
#PUPSAVE='sda1,ext3,/fd64/fd64save-james.3fs' - location of savefile
echo PUPSAVE=
#PMEDIA='' hints for boot media type in use
#pmedia= usbflash|usbhd|usbcd|ataflash|atahd|atacd|atazip|scsihd|scsicd|cd
echo PMEDIA=$PMEDIA # set when we decide about PUPMODE
#pfix='noram' - all pfix parameters - used by /etc/profile
echo pfix=$pfix
#ATADRIVES= (list of sdx drives), SATADRIVES= (list of hdx drives)
# - needed by probedisk2 to determine icon types
echo ATADRIVES=\'$(ls /sys/block | sed '/^sd/ !d')\'

# -- probably used by other scripts
#SAVE_LAYER='/pup_rw' - where the savefile is mounted
echo SAVE_LAYER=$SAVEFILE_MOUNT
#PUP_LAYER='/pup_ro2' - where base.sfs is mounted
echo PUP_LAYER=$BASE_SFS_MOUNT
#PUP_HOME= where fd64save file is (/mnt/home link) without the /initrd part
echo PUP_HOME=$(readlink /mnt/home) # not 100% compatible but what the heck

# -- management of additional kernel modules sfs - we don't use this
#ZDRV='' - name of addional kernel module sfs
echo ZDRV=
#ZDRVINIT='no' - we don't use it, leave it as no
echo ZDRVINIT=no
#PSAVEMARK='' - for ZDRV management, not used
echo PSAVEMARK=
#FASTPARTS='sda1|ext3 sda2|ext4 sda3|ntfs sda4|vfat ' - don't know what this is
echo FASTPARTS=
} > /etc/rc.d/PUPSTATE

### execute local boot script (rc.local) last so that it can override anything set previously
[ ! -f /etc/rc.d/rc.local.shutdown ] && cat > /etc/rc.d/rc.local.shutdown <<EOF
# this file called from rc.shutdown
# you can edit this file to perform custom shutdown activities
EOF
[ ! -f /etc/rc.d/rc.local ] && cat > /etc/rc.d/rc.local <<EOF
# this file called from rc.sysinit
# you can edit this file to perform custom startup activities
# When firewall is installed, will append lines to this file.
EOF
. /etc/rc.d/rc.local

### next: login shell (which will execute /etc/profile)

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

Shutdown is rc.shutdown script

#24 Post by PappyPuppy »

It's in /user/sbin. It's not a script. It ran when I accidentally clicked on it. Now I have the ugly situation that I don't want to run it right now. It says you will lose your data for this session if you don't create a savefile.

It should say, do you want to keep working, and did you accidentally hit this. That's the problem.

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

I'm running that exe now.

#25 Post by PappyPuppy »

And it also wants me to supply whether multisession or not. I need to research that flag. Then I can save.

So I finally found out how to do it -


savefile.sh is the way!

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

I left the multisession checkbox unchecked

#26 Post by PappyPuppy »

Or to a directory.

it's all so cryptic.

I don't know what the consequences are of each choice.

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

Finally, the last screen

#27 Post by PappyPuppy »

Device location:
Directory:
New hostname
New password

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

All it did was create the directory I had already created be

#28 Post by PappyPuppy »

I guess perhaps I should copy a file over from my ntfs drive, work on it, then drop it in usr and see if it gets saved or something? I don't yet have the layered system fired up.

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

It did NOT do what I wanted it to do

#29 Post by PappyPuppy »

I thought it would allow me a writable space to write the files to - but the directory fd64save must just be a readable directory except during the creation of it. I can't use it - at least I don't know how.

I guess no error message is sent me that the ntfs is blocking my save.

Or will it do this only on shutdown? Perhaps I need to shutdown first and perhaps some different command would flush to that directory?

Anyone know how to flush the session to your savefile or savefile dir (my case)?

I guess I could write a script, and simply copy back and forth from the two environments - ie. Linux in RAM to NTFS.

Or set up a mirroring.

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

I now realize there's a connection between

#30 Post by PappyPuppy »

/aufs/pup_rw/root/spot/Desktop and root/spot/Desktop.

They are the same. Perhaps I can use this somehow.

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

I don't yet know how to flush the ram to my savefile dir are

#31 Post by PappyPuppy »

I still don't know how to force this aufs stuff over onto my savefile directory.

I wish I knew so I can save at will.

Running savefile.sh does not seem to do it. It just sets it up.

I need to study the shutdown scripts in more detail.


PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

I tweaked the Event Manager for saves to 10 minutes.

#33 Post by PappyPuppy »

RAM to disk.

This should be interesting. It had been set at 30 minutes, 0 would mean don't write at all.

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

The changes are NOT being written

#34 Post by PappyPuppy »

I just checked, there are no changes from this session other than what I have on my Fatdog distro's directories in RAM.

I also notice that my desktop does not have a RAM to disk icon.

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#35 Post by drunkjedi »

You are going all over the place.
Or maybe I am not understanding you.
There seems a language barrier...

Anyway,
Did you get your disks writable? or still read only?

I think this should be our first concern.
As creating Savefile would only be possible if you could write to a disk.
It may have loaded your savefile from disk but not been able to write back as the disk is read only.

Please,
Do run the command I gave you for all your ntfs drives, sda1, sda2, sda3 etc...
Post screenshot of your gparted window.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#36 Post by jamesbond »

Thanks drunkjedi and all others who have tried to help.
drunkjedi is all right, you're asking numerous questions all over the known universe making it very difficult to asses your situation and what you actually want. But I'm glad that you're persistent otherwise I would have missed this thread altogether.

Firstly, your Fatdog is old (kernel 3.18.7 is the clue). Please get the latest 710beta2 (http://www.murga-linux.com/puppy/viewtopic.php?t=108677), and load it to either a DVD or to USB flash, and boot from there.

Once you have booted it, open control panel, click "Utilities" tab, scroll to the bottom, and run "Bug Report Info Collector". Upon completion of running that tool, you will get a file. Upload that file here (you may have to rename that file and add ".gz" extension).

Thirdly, please state what is your expected *FINAL* end result, how do you want it configured, and we'll go from there. Also let us know if you need perform some sort of data recovery - find missing files, etc.

When you have done all those three, then we talk.

cheers!
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

What???

#37 Post by PappyPuppy »

I couldn't disagree more with drunkjedi and jamesbond.

You are two who are so consumed in yourselves that you fail to understand what I did.

I researched an operating system called Fatdog that I had never used, understood it, and solved the problem.

And I didn't do it by any other means than my own suggestions.

So I get credit for solving the problem.

You lose dudes!

And if you want to fight about it some more, I'm ready anytime, and you threw the first punch like a sissy! I don't fight like a sissy.

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#38 Post by drunkjedi »

Where did this fight and punch came from?

I and James are both trying to help you.
We just are unable to understand your situation exactly.

And believe me I don't do this to take credit.
I am just a user like you, trying to help another user.

Why did you suddenly became hostile?
I never threw a punch at you.
Calm down.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

Re: What???

#39 Post by jamesbond »

PappyPuppy wrote:I couldn't disagree more with drunkjedi and jamesbond.
You are free to disagree on anything with anyone. We oblige to your disagreement.
You are two who are so consumed in yourselves that you fail to understand what I did.
Indeed.
I researched an operating system called Fatdog that I had never used, understood it, and solved the problem.
I'm glad you did.
And I didn't do it by any other means than my own suggestions.
Congratulations.
So I get credit for solving the problem.
Obviously.
You lose dudes!
Yes, we're losers. You win.
And if you want to fight about it some more, I'm ready anytime, and you threw the first punch like a sissy! I don't fight like a sissy.
If you look into a mirror, you'll see someone waiting to practice with you. I know you're a champion, pity that guy in the mirror and don't hit him too hard.

Adios amigo.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

Post Reply