Custom-Spin doesnt boot to GUI when /etc/skel is changed


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Custom-Spin doesnt boot to GUI when /etc/skel is changed
# 1  
Old 09-22-2014
Custom-Spin doesnt boot to GUI when /etc/skel is changed

Heyas

So i have my custom Fedora with AwesomeWM spin with alots of customizations using the kickstart method for a liveimage.
A few weeks (2-3 months) ago, i've done some changes i cannot remember.
Those changes made the image from bootable to gui, to not booting to gui any more.

Just figured that out about 2 weeks ago, and after i spent 8 hours today (about 14-16 builds), i could pintpoint the bad to a script that is executed within %post section.
However, to me its a deadend, as i really dont understand how that could be the cause, however, when that script is started, the image wont boot to gui, and if its not executed, i'm missing all my customizations.

My system is Fedora 20 : 3.16.2-201.fc20.x86_64

This one is just to be complete:
Code:
%post
#!/bin/bash
	cd /root/spin_files/scripts
	sh skel-config.sh	# Problem is within here !!
#	sh skel-awesome.sh
	sh post-livesys.sh
#
# 	This goes at the end after all other changes.
#
	echo
	echo "selinux restorecon"
	echo
	useradd -m liveuser
	/usr/sbin/chown -R liveuser:liveuser /home/liveuser
	/usr/sbinrestorecon -R /home/liveuser

%end

This one is what i've pinpointed after 8 hrs of trial and error builds: post-skel.sh
Code:
#!/bin/bash
echo
echo "Somewhere BELOW is error"
echo
#
#	Copy fixed template
#
	cd /root/spin_files/skel
#	rm -f /etc/skel/.bashrc
	cp -fr *		/etc/skel
	cp -fr .[a-zA-Z]*	/etc/skel
	ln -sf /root/spin_files/make-iso.sh	/usr/bin/make-awesomewm
# The 'cd' is required for the other scripts to work
	cd ..
echo
echo "Somewhere ABOVE is error"
echo

This is how it looks (note i've removed the pwd & ls commands above for better readability):
Code:
Writing LXDE & LXDM conf
DONE LXDM conf

post-myscript.sh
DONE post-myscript.sh

Prepare files in /root/spin_files
* 001-system-settings.ks
* 005-repo-sea.ks
* 006-repo-non-foss-rawhide.ks
* 006-repo-non-foss.ks
* 008-pkgs-awesome.ks
* 009-pkgs-dev.ks
* 010-pkgs-nonfoss.ks
* 011-pkgs-rescue.ks
* 020-post-nochroot.ks
* 021-post-chroot.ks
* 022-post-skel.ks
* 999-post-fedora-template.ks

DONE 021-post-chroot.ks

Somewhere BELOW is error


--------------
/root/spin_files/skel
total 32
-rw-r--r--. 1 root root 2118 Sep 22 14:11 README
-rw-r--r--. 1 root root  506 Sep 22 14:11 cheatsheet-awesomewm-hotkeys.txt
drwxr-xr-x. 2 root root 4096 Sep 22 14:11 data
drwxr-xr-x. 5 root root 4096 Sep 22 14:11 mm
drwxr-xr-x. 6 root root 4096 Sep 22 14:11 net
drwxr-xr-x. 2 root root 4096 Sep 22 14:11 notepad
drwxr-xr-x. 5 root root 4096 Sep 22 14:11 priv
drwxr-xr-x. 2 root root 4096 Sep 22 14:11 prjs
--------------


--------------
/etc/skel
total 32
-rw-r--r--. 1 root root 2118 Sep 22 14:12 README
-rw-r--r--. 1 root root  506 Sep 22 14:12 cheatsheet-awesomewm-hotkeys.txt
drwxr-xr-x. 2 root root 4096 Sep 22 14:12 data
drwxr-xr-x. 5 root root 4096 Sep 22 14:12 mm
drwxr-xr-x. 6 root root 4096 Sep 22 14:12 net
drwxr-xr-x. 2 root root 4096 Sep 22 14:12 notepad
drwxr-xr-x. 5 root root 4096 Sep 22 14:12 priv
drwxr-xr-x. 2 root root 4096 Sep 22 14:12 prjs
--------------


Somewhere ABOVE is error


(Over-)Writing livesys // post-livesys.sh


DONE post-livesys.sh


selinux restorecon

/tmp/ks-script-xfa88y: line 12: useradd: command not found
/tmp/ks-script-xfa88y: line 13: /usr/sbin/chown: No such file or directory
/tmp/ks-script-xfa88y: line 14: /usr/sbinrestorecon: No such file or directory
ignoring %post failure (code 127)
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.

I've checked the file permissions with my host system, and they look the same..
Code:
:) /etc/skel # ls -la
insgesamt 40
drwxr-xr-x.   3 root root  4096 12. Sep 18:39 .
drwxr-xr-x. 132 root root 12288 22. Sep 12:05 ..
-rw-r--r--.   1 root root    18 21. Jul 13:52 .bash_logout
-rw-r--r--.   1 root root   193 21. Jul 13:52 .bash_profile
-rw-r--r--.   1 root root   231 21. Jul 13:52 .bashrc
-rw-r--r--.   1 root root   172 24. Jul 13:50 .kshrc
drwxr-xr-x.   4 root root  4096 26. Jul 22:16 .mozilla
-rw-r--r--.   1 root root   658 28. Aug 22:57 .zshrc

I am aware of the 3 command errors, but they dont seem to have any effect on the no-gui-issue, because either with them - but unused post-skel.sh - i CAN (just did last build) boot to GUI within the VM.
Code:
Name       : VirtualBox
Architektur : x86_64
Version    : 4.3.16
Ausgabe    : 1.fc20

Please understand, that for useradd, chown and restorecon, i've just added their folders like 4 builds ago as they were not found without, nor are with it (fixing the typo now).

Any ideas why the change of the /etc/skel results in an image that doesnt boot to GUI?

Thank you in advance
Simon


EDIT:
To be complete, this is the project strucutre on the host system:
Code:
+ /home/sea/prjs/iso-awesome-sea # ll -a *
-rw-rw-r--.  1 sea sea  1285 22. Sep 10:32 AwesomeWM.ks
-rw-rw-r--.  1 sea sea  1188 28. Aug 21:36 AwesomeWM-rawhide.ks
-rw-rw-r--.  1 sea sea 35147 31. Aug 14:53 gpl.txt
-rw-rw-r--.  1 sea sea   269 14. Sep 00:18 make-iso.conf
-rwxrwxr-x.  1 sea sea  2254 14. Sep 00:31 make-iso.sh
-rw-rw-r--.  1 sea sea  1658 31. Aug 20:07 README.md
-rw-rw-r--.  1 sea sea 81932 11. Mai 17:19 screenshot-clean.jpg

ks:
insgesamt 60
drwxrwxr-x. 2 sea sea 4096 22. Sep 13:51 .
drwxrwxr-x. 6 sea sea 4096 22. Sep 14:20 ..
-rw-rw-r--. 1 sea sea  431 31. Aug 15:03 001-system-settings.ks
-rw-r--r--. 1 sea sea  194 22. Sep 02:46 005-repo-sea.ks
-rw-rw-r--. 1 sea sea 1724 17. Sep 13:47 006-repo-non-foss.ks
-rw-rw-r--. 1 sea sea 1725 29. Aug 00:45 006-repo-non-foss-rawhide.ks
-rw-rw-r--. 1 sea sea 1163 17. Sep 16:36 008-pkgs-awesome.ks
-rw-rw-r--. 1 sea sea  246  2. Sep 23:27 009-pkgs-dev.ks
-rw-rw-r--. 1 sea sea  424 17. Sep 17:46 010-pkgs-nonfoss.ks
-rw-rw-r--. 1 sea sea   45  3. Sep 00:37 011-pkgs-rescue.ks
-rw-rw-r--. 1 sea sea 1396  1. Sep 02:33 020-post-nochroot.ks
-rw-rw-r--. 1 sea sea  167 22. Sep 06:28 021-post-chroot.ks
-rw-rw-r--. 1 sea sea  346 22. Sep 13:51 022-post-skel.ks
-rw-rw-r--. 1 sea sea 7650  2. Sep 23:27 999-post-fedora-template.ks

scripts:
insgesamt 44
drwxrwxr-x. 3 sea sea 4096 22. Sep 13:53 .
drwxrwxr-x. 6 sea sea 4096 22. Sep 14:20 ..
drwxrwxr-x. 2 sea sea 4096  1. Sep 19:25 bin
-rw-rw-r--. 1 sea sea  114 30. Aug 10:25 __DONT__execute_README
-rw-rw-r--. 1 sea sea  660 30. Aug 16:39 post-grub.sh
-rw-rw-r--. 1 sea sea 1529 22. Sep 08:24 post-livesys.sh
-rw-rw-r--. 1 sea sea 1034 22. Sep 06:27 post-lxdm.sh
-rw-rw-r--. 1 sea sea  260 22. Sep 06:26 post-myscripts.sh
-rw-rw-r--. 1 sea sea  409 22. Sep 06:26 post-sustain.sh
-rw-rw-r--. 1 sea sea  229 30. Aug 10:35 skel-awesome.sh
-rw-rw-r--. 1 sea sea  505 22. Sep 13:53 skel-config.sh

skel:
insgesamt 64
drwxrwxr-x. 10 sea sea 4096 22. Sep 13:25 .
drwxrwxr-x.  6 sea sea 4096 22. Sep 14:20 ..
-rw-r--r--.  1 sea sea   18  2. Sep 2013  .bash_logout
-rw-r--r--.  1 sea sea  193  2. Sep 2013  .bash_profile
-rw-rw-r--.  1 sea sea 1322 22. Sep 13:25 .bashrc
-rw-rw-r--.  1 sea sea  506 28. Aug 23:50 cheatsheet-awesomewm-hotkeys.txt
drwxrwxr-x. 10 sea sea 4096 31. Aug 12:41 .config
drwxrwxr-x.  2 sea sea 4096 29. Aug 18:40 data
-rw-rw-r--.  1 sea sea  165 29. Aug 06:12 .gtk-bookmarks
drwxrwxr-x.  3 sea sea 4096 29. Aug 06:23 .local
drwxrwxr-x.  5 sea sea 4096 23. Apr 16:19 mm
drwxrwxr-x.  6 sea sea 4096 23. Apr 16:19 net
drwxrwxr-x.  2 sea sea 4096 23. Apr 16:19 notepad
drwxrwxr-x.  5 sea sea 4096 11. Mai 22:34 priv
drwxrwxr-x.  2 sea sea 4096 23. Apr 16:19 prjs
-rw-rw-r--.  1 sea sea 2118 31. Aug 14:51 README


Last edited by sea; 09-22-2014 at 01:42 PM..
# 2  
Old 09-22-2014
Hi,

The fact that you hace several command/file not found messages indicates that the most likely issue is a PATH variable problem.

Check and make sure that the PATH variable is properly set.

Rwegards

Dave
# 3  
Old 09-22-2014
I've had those 3 for like ALL the 14-16 builds, and i could boot to gui, and all other commands ARE found, like echo, for, cp, mv, ln...
Attempting to fix this now, but the boot to gui fails when just that single script is executed which copies the skel files to hardcoded paths, the copy works...

Also, the only file that gets overwritten, is .bashrc, which contains . /etc/bashrc as well.
Code:
:) /home/sea/prjs/iso-awesome-sea/skel # head .bashrc -n 12
#!/bin/bash
# .bashrc by sea, designed for sea's spin using AwesomeWM
#
#	Sources
#
	[ -f /etc/bashrc ] 				&& . /etc/bashrc	
	[ -f /etc/profile.d/tui.sh ] 			&& . /etc/profile.d/tui.sh
	[ -f $HOME/.config/user-dirs.dirs ] 		&& . $HOME/.config/user-dirs.dirs
#
#	Path Updates
#
	[ -d $HOME/.local/bin ]				&& PATH+=":$HOME/.local/bin"

EDIT:
The PATH env from just that build, see screenshot, it even works fine at init 3... Smilie

EDIT2:
Please let know if you need additional info
Custom-Spin doesnt boot to GUI when /etc/skel is changed-image-pathjpg
Custom-Spin doesnt boot to GUI when /etc/skel is changed-image-dmesgjpg

Last edited by sea; 09-22-2014 at 10:32 AM..
# 4  
Old 09-23-2014
Got rid of those 3 path errors, but still boots to blackscreen rather than gui.

EDIT:
It works however with manualy booting to init 3, and then go init 5, but not straight.
Been there before, right after it stoped booting directly to init 5. Smilie

EDIT2:
Ah yeah, the initial KS looks like:
Code:
# Based on: fedora-live-base.ks
#
#	To recieve a working rawhide live spin, you must build it on a rawhide host!
#
#
#	Includes, order required
#	Default environment first
#
	%include 	ks/001-system-settings.ks
	%include 	/usr/share/spin-kickstarts/fedora-repo-not-rawhide.ks
	%include 	/usr/share/spin-kickstarts/fedora-live-minimization.ks
# AwesomeWM, here the customization begins
	%include 	ks/005-repo-sea.ks
	%include 	ks/006-repo-non-foss.ks
# Comment out the rpmfusion-rawhide repo if build fails for current release
# (its required for close-to-release and rawhide)
	#include 	ks/006-repo-non-foss-rawhide.ks
	%include 	ks/008-pkgs-awesome.ks
	%include 	ks/009-pkgs-dev.ks
##	include 	ks/010-pkgs-nonfoss.ks

# Sytem changes
	%include 	ks/020-post-nochroot.ks
	%include 	ks/021-post-chroot.ks
	%include 	ks/022-post-skel.ks
	%include 	ks/999-post-fedora-template.ks
#
#
#	Packages
#	These are the very basic required to display anaconda
#	and have a functional live environment, even in a VM
#
#	The configuration for the custom spin, are in the other files
#
%packages
#
# Basic GUI
#
	@core
	@hardware-support
	@standard
	@base-x

# Might be removable
	#dial-up
	@multimedia
#
# Required by LiveImage
#
	kernel
	memtest86+
	anaconda
	@anaconda-tools
	qemu-guest-agent
%end

The first 6 builds, were just from "ks/008-..." down to "ks/999-...", now eventhough i've already figured there that it was "ks/022-...", i've had to build all options to make sure no other kickstart file interfere[ds].
After i made sure its only the 022 file, i've tried diffrent combinations for the scripts, and tried diffrent settings of each script, until i was sure the post-skel.sh script was the real trigger whether or not i could boot to gui from the built image.

I just cant think of a reason, specialy since it once worked, why the copy of files into /etc/skel would stop the GUI from loading... Smilie
Could someone please shed some light on this please?

Thank you in advance
a desperate one

PS
It 'used' to work: https://sourceforge.net/projects/awe.../files/stable/

---------- Post updated 23-09-14 at 06:53 ---------- Previous update was 22-09-14 at 16:10 ----------

So after googling not for errors but for "how it's done", i found that many copy the 'skel' files inside the "%post --nochroot" section...

So i've appended that after copy the files to chroot's /root/spin_files.
Snippet from within %post --nochroot:
Code:
#
# 	Copy requires kickstarts files to the image's /root/spin_file
#
	# Prepare subfolder to be copied to /root/spin_files
	# '$dir_target' beeing /root/spin_files/skel
	cd "${prjs}"
	pwd
	sleep 3
	cp -fr	*	 	$dir_target
	cp -fr	.[a-zA-Z]* 	$dir_target
	# Copy from /root/spin_files/skel to /etc/skel
	cp -fr $(cd $dir_target;find) $INSTALL_ROOT/etc/skel

Upon successfull build (quite inadequat) it still doesnt boot to gui, files are copied.
On the first build with this change, i've accidently just copied the folder 'spin_files' to skel (as in /etc/skel/spin_files, THAT booted fine to GUI.

So i'm back to... if i copy files to the skel dir, i cannot boot to gui.
Which to me denies the goal of this live image.

Last edited by sea; 09-22-2014 at 01:43 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

Nagios widgets to create custom GUI

Hi, I need to create a custom GUI for Nagios, as follows: - no logo - including monitoring info (network status overview, host/service details & status) as well as some network google map I'm looking for Nagios widgets that can be easily integrated in our HTML page. Can you suggest if there... (0 Replies)
Discussion started by: CHK
0 Replies

2. Fedora

Automatically execute a software without gui at boot

hi all, this is my first post here...i hope that this is the correct section to write my question. I have a distro linux without gui, only text mode. So, it's possible run automatically a command or a program as "top" or "ping" and get the result on the main shell , after the boot and after... (6 Replies)
Discussion started by: gangiaemi
6 Replies

3. Linux

ArchLinux - GUI (DE) set to boot up

Okay I'am not using ArchLinux but one of girlfreinds needs it (or it recommend by her work) and she need a desktop - so how do we do so the computer boot up with GUI instead of console ? - I'am a newbie to Arch so I have no idea, is it like SlackWare where you change the inittab file or is it some... (10 Replies)
Discussion started by: looop
10 Replies

4. Solaris

Create a custom CD boot

I'm doing as the official document of the SUN : www.sun.com/blueprints/1205/819-3731.pdf Who on page 15 / 18, asks to be executed the following command: 3.Combine mboot and pboot into a single file called mboot+pboot.cd. # dd if=/dev/dsk/c1t1d0p0 of=mboot+pboot.cd bs=512 count=2 I try... (6 Replies)
Discussion started by: poyato
6 Replies

5. Red Hat

Boot Messages changed after mondorestore

Hello All, I backed up my RHEL 4 as an image. Then I restored the image (by mondorestore) on my machine. Everything went fine but I dont get the normal boot sequence as it used to come when I freshly installed RHEL4. The messages that are shown when the system boots are something like- "... (13 Replies)
Discussion started by: shamik
13 Replies

6. Filesystems, Disks and Memory

Boot Sequence changed After Image Restore

Hello All, I backed up my RHEL 4 as an image. Then I restored the image on my machine. Everything went fine but I dont get the normal boot sequence as it used to come when I freshly installed RHEL4. The messages that are shown when the system boots are something like- " ..... EXT3-fs:... (2 Replies)
Discussion started by: shamik
2 Replies

7. UNIX for Dummies Questions & Answers

Custom kernel compiling, won't boot, and errors.

First of all, I'd like to preface this post by relaying that I have considerable experience with FreeBSD but I'm a Linux newb. I've been attempting to compile linux-2.6.29.3 from source and I'm having some problems and have a few newb questions... a) First of all, my kernel won't boot, it fails... (0 Replies)
Discussion started by: urbanriot
0 Replies

8. AIX

has bosboot command changed characteristics of boot image?

hi all i just found one of my p650 server showing a warning message when i tried to run bosboot command after upgrading TL to AIX 530803. i also tried to run chpv -c hdisk0 and chpv -c hdisk1 to clear out the old boot info in hdisk0 and hdisk1 and rerun bosboot -a. it still showed... (0 Replies)
Discussion started by: rs6000er
0 Replies

9. Programming

How to create a custom GUI

In Unix, is there any way in which I can create a GUI like Realplayer? I mean the Windows Look & Feel. Borded with buttons, windows, dialogs and other predefined widgets, I am wondering how to create my own buttons that come in different shapes and fashions or even draw images/control objects... (2 Replies)
Discussion started by: hirosima
2 Replies
Login or Register to Ask a Question