Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TRICKS] Speed up system with aufs + squashfs
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
tclover
Guru
Guru


Joined: 10 Apr 2011
Posts: 516

PostPosted: Sat Apr 16, 2011 12:15 am    Post subject: Not finished yet without a sucessfuly squashed /lib64 Reply with quote

Yes, again.
Lets start with a candy script intended for experiments...
A squashfs build script that could, maybe, avoid doing the same thing several times:
Quote:
EDIT: sqfsd-[re]build.sh script was updated Apr 26 2011 to the previous page.

I've just added the related excluded line later, not sure if it's fully working.

That said, I've just opened my eyes the other day and noticed this in the output of mount:
Quote:
rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)
cachedir on /lib64/splash/cache type tmpfs (rw,relatime,size=4096k,mode=644)

Those two line explain why my blind attempt failed. So I've just went right away to exclude /lib64/{rc,splash} from my lib64.sfs image but... the thing is, it just doesn't work simply as that. And that I can understand why, lib64 is mounted on /lib64 after all, excluding it or not from the image doesn't make any difference in the sense that when attempting to write to /lib64{rc,splash} will result to writing to /sqfs/lib64/rw/{rc,splash}. Anyone know what I could do? I started reading the aufs[2] documentation but I did not find anything yet. Is it possible to exclude a sub-directory from aufs branch? or something like that? so that when writing to that sub-directory, the real sub-directory is written instead of the sub-branch? Anybody?


Last edited by tclover on Wed Apr 27, 2011 11:51 am; edited 6 times in total
Back to top
View user's profile Send private message
tclover
Guru
Guru


Joined: 10 Apr 2011
Posts: 516

PostPosted: Sat Apr 16, 2011 3:45 pm    Post subject: Reply with quote

An, of course, if somebody knows how to change rc-svcdir and cachedir mount points, do not hesitate to post something. I didn't manage to find out where I could find something to configure those two mount points from openrc or splashutils files.
Back to top
View user's profile Send private message
tclover
Guru
Guru


Joined: 10 Apr 2011
Posts: 516

PostPosted: Mon May 09, 2011 10:09 am    Post subject: Not finished with lib64 Reply with quote

Well, It happen I wanted an encrypted root partition, an encrypted keys and squashing stuff.
So I've just went into updating the init script of DM-Crypt_with_LUKS http://en.gentoo-wiki.com/wiki/DM-Crypt_with_LUKS#Alternate_init_script_with_squashfs.2Baufs.2Bloop_back_encrypted_keyfile.2BTuxOnIce section of the wiki, and it ended up being a major update, hopping to get rid of the lib64 issue. Well, nothing worked. The squashed lib64 get mounted as other squashed dirs and everything looks fine expect nobody can log in but root. I smashed my head over some walls because I haven't any clue of the why it's happening.

I spent some time reading some scripts from /lib64/rc/sh that do the necessary steps for rc, like mounting rc-svcdir, and only found a single, or did I miss something, parameters assignment--`: ${RC_SVCDIR:=/lib64/rc/init.d}'--in init-common-post.sh. So when this script is called in the chain rc-svcdir get mounted on the right location. I changed it to somewhere else only to found that it didn't take any effect. I don't get this either because I did not find anything assigning another value to RC_SVCDIR.
Nobody knows something about this? [RE-BUMP]

This is what I got when gdm is launched:
Quote:
gdm-simple-slave[3812]: WARNING: Could not spawn command: Failed to execute child process "/usr/bin/dbus-launch" (Permission denied)
gdm-simple-slave[3812]: WARNING: Unable to launch D-Bus daemon: Failed to execute child process "/usr/bin/dbus-launch" (Permission denied)
gdm-simple-slave[3812]: WARNING: Could not spawn command: Failed to execute child process "/usr/bin/gnome-session" (Permission denied)
gdm-simple-slave[3812]: WARNING: Could not start command '/usr/bin/gnome-session --autostart=/usr/share/gdm/autostart/LoginWindow/': Failed to execute child process "/usr/bin/gnome-session" (Permission denied)

Loggin is also broken in any terminal, when trying to log in as a user I have this:
Quote:
Apr 26 14:20:48 xxyyzz polkitd(authority=local): Registered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session1 (system bus name :1.16 [/usr/libexec/polkit-gnome-authentication-agent-1], object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Apr 26 14:21:03 xxyyz gdm-session-worker[3693]: pam_unix(gdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost= user=xyz

As one can see above, my uid=1000 gid=1001 is just plain wrong so I cannot never login in any terminal or in gdm. And all this goe after mounted a squashed lib64. I exclude /lib64/{rc/init.d/*,splash/cache/*} when building the sfs image to ensure that I don't get other services info in rc. And even if ever I left init.d contains, it get flushed when rc start, that's part of the init process of rc.
Back to top
View user's profile Send private message
shentino
n00b
n00b


Joined: 21 Nov 2009
Posts: 63

PostPosted: Tue Jul 12, 2011 9:14 am    Post subject: Chicken and egg Reply with quote

Sounds like you got nailed by a chicken and egg with a module that was on a filesystem whose type wasn't modprobed yet.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
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