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 Wed 26 Nov 2014, 07:32
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 Posts_count  
Author Message
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

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

Edited_times_total
Back to top
View user's profile Send_private_message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

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

Edited_time_total
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
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_website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
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_website 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

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: 4050
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: 3972
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_website 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

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

Edited_time_total
Back to top
View user's profile Send_private_message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

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

Edited_time_total
Back to top
View user's profile Send_private_message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

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: 108

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

Edited_time_total
Back to top
View user's profile Send_private_message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

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: 3972
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_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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