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..
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:
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.
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.
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...
Could someone please shed some light on this please?
---------- 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/skelcp -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.
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)
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)
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)
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)
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)
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)
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)
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)
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)