Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 29 Jul 2014, 04:42
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Empty save file causes kernel panic (Solved)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [13 Posts]  
Author Message
Ghost Dog


Joined: 27 Jan 2012
Posts: 102

PostPosted: Sat 10 Aug 2013, 15:08    Post subject:  Empty save file causes kernel panic (Solved)  

Hello!

I want to make a usb stick for somebody pre-loaded with Puppy, but the person is a little dense, so I don't want him to have to make his own save file. So I created an empty one with this command:

dd if=/dev/zero of=puppy_save.4fs bs=1M count=1024
yes y | mkfs.ext4 puppy_save.4fs
sync

But when the usb stick boots, it gives "kernel panic".

_________________
The Way of the Samurai

Last edited by Ghost Dog on Mon 12 Aug 2013, 02:28; edited 3 times in total
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 102

PostPosted: Sat 10 Aug 2013, 22:07    Post subject:  

When I make a regular save file on the stick the usual way at first shutdown, on the usb stick, it works like it's supposed to. Puppy finds it and merges the filesystem.

But when I make it fresh using the commands in the previous post, it doesn't work for some reason.

_________________
The Way of the Samurai

Last edited by Ghost Dog on Sun 11 Aug 2013, 01:58; edited 1 time in total
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3956
Location: Kiel,Germany

PostPosted: Sat 10 Aug 2013, 23:00    Post subject:  

The PUPPY_VERSION_SAVE file name is hardcoded in the initrd.gz .

A Wary would not offer to load a slackosave-DATE.4fs at boot for example, only warysave*.4fs .
Probably name it -NAMESTRING with dash . The dash might be used as a delimiter in the /init code .

It might have been different with Puppy-4 series, though, that seem to be named pupsave-STRING.2fs anyways .
lupusave-STRING.3fs naming came with Puppy-5 series me thinks .
puppy_VERSION-STRING.3fs is also "newer" .

_________________
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3956
Location: Kiel,Germany

PostPosted: Sat 10 Aug 2013, 23:15    Post subject:  

Code:
yes y | mkfs.ext4 puppy_save.4fs

Where have you found that code ?
Never seen such .
Code:
mkfs.ext4 puppy_save.4fs

should work .
Also
Code:
fsck puppy_save.4fs

probably afterwards .
Back to top
View user's profile Send private message Visit poster's website 
Ghost Dog


Joined: 27 Jan 2012
Posts: 102

PostPosted: Sun 11 Aug 2013, 01:56    Post subject:  

Hi Karl,

Sorry, I was naming the folder the same as PupSaveConfig did it. Creating a save file with the appropriate name in the root directory results in it being found at boot. But now I get a kernel panic.

I have tried creating the file in two ways. One is using the code Dejan55 originally used in his script, later used by RSH and ANSI Education in theirs:

Code:
dd if=/dev/zero of=slackosave.4fs bs=1M count=1024
yes y | mkfs.ext4 slackosave.4fs
sync

And using code adapted from rc.shutdown:

Code:
dd if=/dev/zero of=slackosave.4fs bs=1k count=1024000
yes y | mkfs.ext4 -q -m 0 -F slackosave.4fs

Both result in the kernel panic error. Why does a savefile created in the normal way at shutdown get found and work great, but ones created manually don't work?

_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
Semme

Joined: 07 Aug 2011
Posts: 3580
Location: World_Hub

PostPosted: Sun 11 Aug 2013, 11:14    Post subject:  

Hey Karl, know anything about this?
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3956
Location: Kiel,Germany

PostPosted: Sun 11 Aug 2013, 12:11    Post subject:  

yes y | mkfs.whateverfs whaterveroptions whatever.file is not the Puppy way .

Current it should be
Code:
dd if=/dev/zero of=${SMNTPT}$SAVEFILE bs=1k count=$SIZEPFILE
 sync
 pupkill $w1PID
 echo "`eval_gettext \"Creating a \\\${SFFS} filesystem in \\\${NAMEONLY}...\"`" >/dev/console
 if [ "$CRYPTO" = "" ];then
  case $SFFS in
   ext2) mkfs.ext2 -q -m 0 -F ${SMNTPT}$SAVEFILE ;;
   ext3) mkfs.ext3 -q -m 0 -F ${SMNTPT}$SAVEFILE ;;
   ext4) mkfs.ext4 -q -m 0 -F ${SMNTPT}$SAVEFILE ;;
  esac

no yes y anywhere .. need to get fresh air to stop rolling on the floor laughing ..

Will have to play with
yes y PIPE OR mkfs* * *

yes itself is a good hand warmer on a laptop , good for arctic conditions .

Probably yes y makes mkfs write Y into it instead of ZEROS .. Evil or Very Mad Smile Rolling Eyes

The page Semme liks to by MHHP says that some files are needed in the new savefile .
To make sure I would
Code:
mkdir /mnt/savefile
mount -o loop savefile.4fs /mnt/savefile
[ "$?" = 0 ] || exit
cp -a /initrd/pup_rw/* /mnt/savefile/
rm -rf /mnt/savefile/ /root/*
mkdir -p /mnt/savefile/proc
mkdir -p /mnt/savefile/sys
mkdir -p /mnt/savefile/mnt
mkdir -p /mnt/savefile/tmp
chmod 1777 /mnt/savefile/tmp
mkdir -p /mnt/savefile/var

-BASICALLY mount the savefile and copy the content from /initrd/pup_rw/* into it , remove everything below /root/ therein and create the main folder structure on top rootfs inside it ( /var, /sys, etcetc ) .
Back to top
View user's profile Send private message Visit poster's website 
Ghost Dog


Joined: 27 Jan 2012
Posts: 102

PostPosted: Sun 11 Aug 2013, 14:30    Post subject:  

I should have mentioned that I tried both Dejan555 and Barry's approaches without using the "yes" part that you find so amusing, ie:

Code:
mkfs.ext4 slackosave.4fs
sync

Code:
mkfs.ext4 -q -m 0 -F slackosave.4fs


The reason I used that was because it is in the script that Dejan555, RSH, and ANSI Education made, with help from Bruce B.

So it needs files, huh? I thought it was supposed to be an empty savefile. I'm going to try what you suggested later today.

Thanks!

_________________
The Way of the Samurai

Last edited by Ghost Dog on Sun 11 Aug 2013, 17:53; edited 1 time in total
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 102

PostPosted: Sun 11 Aug 2013, 17:53    Post subject:  

I should have been more careful, and checked those commands you posted before running them.

Code:
rm -rf /mnt/slackosave/ /root/*

should have been
Code:
rm -rf /mnt/slackosave/root/*

So much for all those important files I had in my root directory...

_________________
The Way of the Samurai

Last edited by Ghost Dog on Sun 11 Aug 2013, 19:43; edited 1 time in total
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 102

PostPosted: Sun 11 Aug 2013, 19:34    Post subject:  


_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 102

PostPosted: Mon 12 Aug 2013, 00:04    Post subject:  

Yo I'm back.

Ok, so I created all of the folders you mentioned except for /initrd/pup_rw, because I want to create an empty file not one with all the modules and stuff, plus I'm on a full installation which doesn't seem to have /initrd/pup_rw.

These are the commands I issued from a terminal opened in the usb stick folder:

Code:
dd if=/dev/zero of=slackosave.4fs bs=1k count=1024000
mkfs.ext4 -q -m 0 -F slackosave.4fs #mkfs.ext4 slackosave.4fs

mkdir /mnt/slackosave
mount -o loop slackosave.4fs /mnt/slackosave
mkdir -p /mnt/slackosave/proc
mkdir -p /mnt/slackosave/sys
mkdir -p /mnt/slackosave/mnt
mkdir -p /mnt/slackosave/lib/modules
mkdir -p /mnt/slackosave/tmp
chmod 1777 /mnt/slackosave/tmp
mkdir -p /mnt/slackosave/var
umount /mnt/slackosave && rm -rf /mnt/slackosave


If you click the .4fs file after, it shows the newly-created directories. So the resulting file must be good. However, it causes a kernel panic at boot.

_________________
The Way of the Samurai

Last edited by Ghost Dog on Mon 12 Aug 2013, 00:32; edited 1 time in total
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 102

PostPosted: Mon 12 Aug 2013, 00:32    Post subject:  

So I made a fresh savefile the normal way without changing anything, and had a look inside.

I copied everything out, removed the contents of root, and copied the files into the mounted .4fs file.

And it works! Thanks for the help.

_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3956
Location: Kiel,Germany

PostPosted: Mon 12 Aug 2013, 06:25    Post subject:  

Ok , FULL installation explains it .

Basically MHHP mentions the file
/etc/rc.d/BOOTCONFIG

That looks different in frugal and full installation mode .

In full installation it is an empty file, since it gets written by the initrd.gz/init .

Such a file could look like
Code:
PREVUNIONRECORD='pupsave-2013_07_12.2fs pup-430.sfs zp430305.sfs'
LASTUNIONRECORD='pupsave-2013_07_12.2fs pup-430.sfs zp430305.sfs'

( just copied it outside a mounted pupsave file - am running full also )

The PUPMODE changes from 5(RAM) to 12(intHD) or 13(extHD) when a savefile gets loaded .

The initrd.gz/init should check VARIABLES for contend it seems
and if $PREVUNIONRECORD =""
default back to PUPMODE 5 or set some default VARIABLES .

It is a kind of a rare corner case bug .
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [13 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0771s ][ Queries: 11 (0.0035s) ][ GZIP on ]