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 Mon 16 Sep 2019, 08:33
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
initrd.gz/init: try to use aufs if unionfs fails?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
jlst

Joined: 23 Nov 2012
Posts: 571

PostPosted: Fri 22 Jan 2016, 15:58    Post subject:  initrd.gz/init: try to use aufs if unionfs fails?  

I'm using a heavily modified and updated Precise 5.7.1 with kernel 3.14.55.
Everything is ok.

I Extracted the main SFS contents and did this:

* I deleted /etc/modules /lib/modules /lib/firmware
* copied zdrv sfs contents from slacko 6.3.0 to the ROOTFS
* copied vmlinuz from slacko 6.3.0
* changed vmlinuz IDSTRING to p130802221835ZZZZ5.7.1XXXXXXXXXX

initrd.gz completely updated from woof-ce.

initrd.gz/init:
Code:

PUPDESKFLG=0
DEVTMPFSFLG=1


Recompressed sfs file and initrd.gz many times while testing.

The thing wouldn't boot, it was unable to setup the layered filesystem
'mount -t unionfs' was returning code 255.

A kernel panic occurs if the layered filesystem has not been setup [correctly]
The message is 'not syncing' or something like that.

Then I thought why not load both unionfs and aufs?

initrd.gz/init:

Code:

#modprobe $LAYERFS #unionfs or aufs.
modprobe unionfs
modprobe aufs


And this:

Code:

if [ "$LAYERFS" = "aufs" ];then
 mount -t aufs -o udba=reval,diropq=w,dirs=${UMNTRW}${UMNTRO0}${ALAYER}${YLAYER}${UMNTRO1}${ZLAYER}${UMNTRO} unionfs /pup_new
else #unionfs
 UMNTRW="`echo -n "$UMNTRW" | sed -e 's/+wh//g'`" #w003 'ro+wh' not accepted by unionfs, change back to 'ro'.
 mount -t unionfs -o dirs=${UMNTRW}${UMNTRO0}${ALAYER}${YLAYER}${UMNTRO1}${ZLAYER}${UMNTRO} unionfs /pup_new
fi
check_status $? #END STEP FIVE


Became

Code:

if [ "$LAYERFS" = "aufs" ];then
 mount -t aufs -o udba=reval,diropq=w,dirs=${UMNTRW}${UMNTRO0}${ALAYER}${YLAYER}${UMNTRO1}${ZLAYER}${UMNTRO} unionfs /pup_new
else #unionfs
 UMNTRW="`echo -n "$UMNTRW" | sed -e 's/+wh//g'`" #w003 'ro+wh' not accepted by unionfs, change back to 'ro'.
 mount -t unionfs -o dirs=${UMNTRW}${UMNTRO0}${ALAYER}${YLAYER}${UMNTRO1}${ZLAYER}${UMNTRO} unionfs /pup_new
 if [ $? -ne 0 ] ; then
   #try to use aufs
   LAYERFS=aufs
   mount -t aufs -o udba=reval,diropq=w,dirs=${UMNTRW}${UMNTRO0}${ALAYER}${YLAYER}${UMNTRO1}${ZLAYER}${UMNTRO} unionfs /pup_new
 fi
fi
retval=$?
check_status $retval #END STEP FIVE

if [ $retval -ne 0 ] ; then
   echo -en "\\033[1;35m" >/dev/console #35=purple
   echo "$LAYERFS: $retval" >/dev/console
   echo "*** Unable to setup layered filesystem ***" >/dev/console
   echo "Error is too critical, a kernel panic will occur later, dropping out to console..." >/dev/console
   /bin/echo -en "\\033[0;39m" >/dev/console
   exec /bin/sh >/dev/console 2>&1
fi
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 164

PostPosted: Sat 23 Jan 2016, 17:14    Post subject:  

So what happened?

If it didn't boot, it sounds like the modules you are trying to load are from Precise but the kernel is from Slacko. If what you are trying to do is switch to the Slacko kernel, /lib/modules, /lib/firmware, and /etc/modules also have to be switched.

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

Joined: 23 Nov 2012
Posts: 571

PostPosted: Sat 23 Jan 2016, 18:46    Post subject:  

The kernel from slacko 6.3.0 is compatible with Precise Puppy, that's good news.

What happens is that the kernel is the "Huge_Kernel" type and uses a different initrd.gz/init (which uses only aufs and has some additional code.

In fact I'm getting the whole picture of how this works and am making some changes locally, but in the end I guess I'll have to keep them to myself..

I wrote more about this here:

https://github.com/puppylinux-woof-CE/woof-CE/issues/731
Back to top
View user's profile Send private message 
Karl Godt


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

PostPosted: Mon 25 Jan 2016, 05:36    Post subject:  

You would need to replace the kernel modules inside the initrd.gz also .
And do not forget to set the LAYERFS variable correctly .

You may want to rename the initrd.gz to initrd.gz-orig and the new initrd.gz to initrd.gz-$KERNELVER
and make a symlink to the "correct" initrd.gz .

It would be also possible to create a Puplet with several kernels and a larger menu.lst .

The 127/128MB limit is obsolete since precompiled Firefox is 40MB nowerdays .

The new limit would be 255/256 MB for 512 MB RAM ,
and that would be able to contain at least one more kernel with 50MB drivers .
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.0339s ][ Queries: 11 (0.0046s) ][ GZIP on ]