neurobin / JLIVECD

Live cd/dvd customization tool
https://neurobin.org/projects/softwares/unix/JLIVECD/
GNU General Public License v2.0
89 stars 24 forks source link

Custom live Ubuntu 14.04-Gnome don't boot #5

Closed danjde closed 8 years ago

danjde commented 8 years ago

Hi neurobin,

today I've realized that the live based on Ubuntu 14.04-Gnome don't boot using JLivecd. Using UCK I've not found this problem (but anothers). The live hang trying to start cups services (cupsd and cups-browsed).

For this live I've created two version: the first with only a simply user added and another with mjor updates and the second with software installation, and for both applied the changes for "BUG libpam-systemd and zz-update-grub";

for both the same behaviorr: hang trying to start cups services (cupsd and cups-browsed).

you 've already something similar ?

many thanks

neurobin commented 8 years ago

Did you revert those changes (BUGs....) before exiting the chroot?

danjde commented 8 years ago

Yes, sure. I will investigate...

thanks

neurobin commented 8 years ago

There are some cases your live session may not start:

  1. If you update to a kernel which doesn't have the live session feature enabled, your live iso won't work.
  2. check your x-session link, If it points to a non-existence link your desktop won't start in live session.
  3. Use unetbootin to create bootable usb. It is reported to work better than the others with JLIVECD.
neurobin commented 8 years ago

About the cup-browsed, this might be a workaround: http://askubuntu.com/questions/323598/stuck-starting-cups-browsed

Personally, I haven't faced this kind of problems yet.

danjde commented 8 years ago

Hi neurobin, about your reporting (cups-browsed), I had already seen and tested, but that's not the problem, I think only a coincidence :-)

thanks!

danjde commented 8 years ago

Hi neurobin, I've tested JLivecd from iso Ubuntu 14.04 and Ubuntu-Gnome 14-04, but fail both to cups-browsed. If I uninstall cups-browsed, it hang starting Cups.

For now seem impossible to create a live iso from Ubuntu 14.04 with JLivecd. I must stop here. If you want to investigate I am here ;-)

ciao

neurobin commented 8 years ago

Well, I am going to test the Ubuntu 14.04 LTS... I will give my feedback here...

danjde commented 8 years ago

Well! Note that lastly I've tried from a simple Ubuntu 14.04 iso, only adding a user ad giving him sudo capabilities. No other.

thanks!

neurobin commented 8 years ago

I just tried with Ubuntu 14.04.1 LTS iso. changes in chroot:

add-apt-repository ppa:neurobin/ppa
apt-get update
apt-get install shc rnm

i.e installed only two tools from my repository. The iso is working fine. I created bootable usb with unetbootin and tested on my physical machine ( My VM is somehow broken now).

danjde commented 8 years ago

Mhh..I will try without user creation, and then report...

neurobin commented 8 years ago

I just updated JLICECD. Previously it was excluding the edit/boot directory in squashfs file. The edit/boot directory can be excluded, but in new update I reversed it i.e made it to be inclluded if that makes any difference.

Currently I am checking it with user creation.

neurobin commented 8 years ago

I just finished checking. It works.... I created an user with a password on top of that previous changes. The default login option in live boot was the newly created user which required authentication (password) to login. I noticed no abnormal behavior.

Disk: Ubuntu 14.04.1 LTS

danjde commented 8 years ago

"Is this a fresh start: (y/n)?n"

In my situations, I've try "NOT from a fresh start".

Could you try from a "not fresh start"?

Now I'm trying to build with your new release...

neurobin commented 8 years ago

The first build (with only those two softwares) was a fresh start. The second time which involved user creation was a "not fresh start" i.e I only added a user with the existing customizaions in the same project directory.

neurobin commented 8 years ago

Now I have started a new fresh start with original Ubuntu 14.04 LTS again:

On chroot terminal:

root@:/# sudo add-apt-repository ppa:ubuntu-toolchain-r/test
 Toolchain test builds; see https://wiki.ubuntu.com/ToolChain

 More info: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpztgpuprd/secring.gpg' created
gpg: keyring `/tmp/tmpztgpuprd/pubring.gpg' created
gpg: requesting key BA9EF27F from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpztgpuprd/trustdb.gpg: trustdb created
gpg: key BA9EF27F: public key "Launchpad Toolchain builds" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
root@:/# sudo add-apt-repository -y ppa:neurobin/ppa
gpg: keyring `/tmp/tmpf5qee_c7/secring.gpg' created
gpg: keyring `/tmp/tmpf5qee_c7/pubring.gpg' created
gpg: requesting key BA5CB7FD from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpf5qee_c7/trustdb.gpg: trustdb created
gpg: key BA5CB7FD: public key "Launchpad PPA for Jahidul Hamid" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
root@:/# sudo apt-get update
Get:1 http://ppa.launchpad.net trusty InRelease [16.0 kB]           
Ign http://archive.ubuntu.com trusty InRelease                                 
Ign http://security.ubuntu.com trusty-security InRelease                       
Ign http://archive.ubuntu.com trusty-updates InRelease                         
Get:2 http://security.ubuntu.com trusty-security Release.gpg [933 B]  
Ign http://ppa.launchpad.net trusty InRelease                                  
Hit http://archive.ubuntu.com trusty Release.gpg
Get:3 http://security.ubuntu.com trusty-security Release [63.5 kB]
Get:4 http://ppa.launchpad.net trusty/main amd64 Packages [837 B]             
Get:5 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]             
Get:6 http://ppa.launchpad.net trusty/main Translation-en [1,120 B]            
Hit http://archive.ubuntu.com trusty Release                                   
Get:7 http://ppa.launchpad.net trusty Release.gpg [316 B]                      
Get:8 http://security.ubuntu.com trusty-security/main amd64 Packages [350 kB]  
Get:9 http://archive.ubuntu.com trusty-updates Release [63.5 kB]              
Get:10 http://ppa.launchpad.net trusty Release [15.1 kB]                       
Get:11 http://ppa.launchpad.net trusty/main amd64 Packages [33.0 kB]           
Hit http://archive.ubuntu.com trusty/main amd64 Packages                       
Get:12 http://ppa.launchpad.net trusty/main Translation-en [12.7 kB]  
Get:13 http://security.ubuntu.com trusty-security/restricted amd64 Packages [12.4 kB]
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages                 
Get:14 http://security.ubuntu.com trusty-security/main Translation-en [191 kB] 
Hit http://archive.ubuntu.com trusty/main Translation-en                       
Hit http://archive.ubuntu.com trusty/restricted Translation-en                 
Get:15 http://archive.ubuntu.com trusty-updates/main amd64 Packages [627 kB]   
Get:16 http://security.ubuntu.com trusty-security/restricted Translation-en [3,076 B]
Get:17 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [15.4 kB]
Get:18 http://archive.ubuntu.com trusty-updates/main Translation-en [305 kB]   
Get:19 http://archive.ubuntu.com trusty-updates/restricted Translation-en [3,569 B]
Ign http://archive.ubuntu.com trusty/main Translation-en_US                    
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US              
Fetched 1,715 kB in 22s (75.6 kB/s)                                            
Reading package lists... Done
root@:/# sudo apt-get update
Hit http://ppa.launchpad.net trusty InRelease                                  
Ign http://security.ubuntu.com trusty-security InRelease                       
Ign http://archive.ubuntu.com trusty InRelease                       
Ign http://ppa.launchpad.net trusty InRelease  
Hit http://security.ubuntu.com trusty-security Release.gpg
Ign http://archive.ubuntu.com trusty-updates InRelease
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://security.ubuntu.com trusty-security Release
Hit http://archive.ubuntu.com trusty Release.gpg                      
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://archive.ubuntu.com trusty-updates Release.gpg
Hit http://ppa.launchpad.net trusty Release.gpg
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty Release   
Hit http://ppa.launchpad.net trusty Release                           
Hit http://security.ubuntu.com trusty-security/main Translation-en    
Hit http://archive.ubuntu.com trusty-updates Release
Hit http://ppa.launchpad.net trusty/main amd64 Packages               
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/main Translation-en
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Reading package lists... Done
root@:/# sudo apt-get install rnm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  gcc-5-base libstdc++6
The following NEW packages will be installed:
  gcc-5-base rnm
The following packages will be upgraded:
  libstdc++6
1 upgraded, 2 newly installed, 0 to remove and 564 not upgraded.
Need to get 503 kB of archives.
After this operation, 1,240 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/ trusty/main gcc-5-base amd64 5.1.0-0ubuntu11~14.04.1 [15.9 kB]
Get:2 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/ trusty/main libstdc++6 amd64 5.1.0-0ubuntu11~14.04.1 [388 kB]
Get:3 http://ppa.launchpad.net/neurobin/ppa/ubuntu/ trusty/main rnm amd64 3.0.6-4 [99.1 kB]
Fetched 503 kB in 5s (84.8 kB/s)
Selecting previously unselected package gcc-5-base:amd64.
(Reading database ... 169552 files and directories currently installed.)
Preparing to unpack .../gcc-5-base_5.1.0-0ubuntu11~14.04.1_amd64.deb ...
Unpacking gcc-5-base:amd64 (5.1.0-0ubuntu11~14.04.1) ...
Setting up gcc-5-base:amd64 (5.1.0-0ubuntu11~14.04.1) ...
(Reading database ... 169559 files and directories currently installed.)
Preparing to unpack .../libstdc++6_5.1.0-0ubuntu11~14.04.1_amd64.deb ...
Unpacking libstdc++6:amd64 (5.1.0-0ubuntu11~14.04.1) over (4.8.2-19ubuntu1) ...
Setting up libstdc++6:amd64 (5.1.0-0ubuntu11~14.04.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Selecting previously unselected package rnm.
(Reading database ... 169572 files and directories currently installed.)
Preparing to unpack .../archives/rnm_3.0.6-4_amd64.deb ...
Unpacking rnm (3.0.6-4) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up rnm (3.0.6-4) ...
root@:/# adduser jahid
Adding user `jahid' ...
Adding new group `jahid' (1000) ...
Adding new user `jahid' (1000) with group `jahid' ...
Creating home directory `/home/jahid' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for jahid
Enter the new value, or press ENTER for the default
[...]
Is the information correct? [Y/n] y
root@:/# adduser jahid sudo
Adding user `jahid' to group `sudo' ...
Adding user jahid to group sudo
Done.
root:/# 

One software installation and a sudo privileged user addition.

On host terminal:

Is this a fresh start: (y/n)?y
**********************************************
***Don't use quotation in file/folder path***
**********************************************
......Where do you want to save your project ?.....choose a directory where you have full permission)..Enter path: ~/mylivecd1
......Enter the path to your base iso image: /media/user/Softs/iso images/ubu

......Found iso: /media/user/Softs/iso images/ubuntu-14.04.1-desktop-amd64.iso
[sudo] password for user: 
mount: block device /media/user/Softs/iso images/ubuntu-14.04.1-desktop-amd64.iso is write-protected, mounting read-only
Parallel unsquashfs: Using 4 processors
164437 inodes (173553 blocks) to write

[=================================================================\] 173553/173553 100%
created 102861 files
created 15237 directories
created 61465 symlinks
created 82 devices
created 0 fifos

......If you just hit enter it will take your previous choice (if any)
......Enter your desired (customized) cd/dvd name: 

******Using 'New-Disk' as cd/dvd name

......Entered into directory /home/user/mylivecd1

......managing initrd......

......Found: initrd.lz

......Preparing network connection for chroot.....

......Network connection will be available in chroot.....

......Debcache Management starting....
......moving deb files to edit/var/cache/apt/archives......

......Preparing the chroot terminal......
access control disabled, clients can connect from any host
Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

(xfce4-terminal:16707): IBUS-WARNING **: The owner of /home/user/.config/ibus/bus is not root!

......Preparation complete! Running chroot terminal...
......When you are finished, run: exit or simply close the chroot terminal.....

...... run 'cat help' or './help' to get help in chroot terminal......

Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

(xfce4-terminal:16724): IBUS-WARNING **: The owner of /home/user/.config/ibus/bus is not root!
access control enabled, only authorized clients can connect

......Debcache Management starting......
......Moving .deb files to debcache......

......deb files moved......
Debcache Management complete!......
chroot: failed to run command ‘aptitude’: No such file or directory
Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'

...............Time is value.............
......you have 10 seconds each to answere the following questions.....
......if not answered, I will take 'n' as default (be ready)...

Want to retain edit/home directory? (y/n)?: y
........edit/home kept as it is.......
\n......initrd archive type: initrd.lz detected!

.....................Rebuilding initrd!....................
.......this step is needed if you have modified the kernel module, or init scripts......
......If you have installed new kernel and want to boot that kernel then skip this for now.....

......have you modified init script or kernel module? (y/n)?: 

......Assuming: you haven't modified the kernel modules or init scripts....

.....Cleaning system....

......System Cleaned!.....

......vmlinuz found: extracted/casper/vmlinuz.efi

......have you installed new kernel and want to boot the new kernel in live cd/dvd: (y/n)?: 

......Updating some required files...

......Deleted old filesystem.squashfs..

......Rebuilding filesystem.squashfs..
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on extracted/casper/filesystem.squashfs, block size 131072.
[=================================================================|] 112463/112463 100%
[...]
danjde commented 8 years ago

..have you tried to build from a Ubuntu 14.04 live distro? I will try from a Linux Mint live distro and then report...

neurobin commented 8 years ago

Are you implying that the host system is a live system itself ? If not, then yes, I built those with an Ubuntu 14.04.1 live iso.

danjde commented 8 years ago

Hi neurobin, I've tried from a live iso LXDE Ubuntu 14.04, and now ...WORK FINE!!

This was the last chance, ad the last possibility. The problem had to be (only) this. I don't know why, I really don't know why...

If you want I can send you the packages list of my installed system (ubuntu 14.04 + Gnome shell 3.12).

neurobin commented 8 years ago

Note that I tried with Ubuntu 14.04.1 not 14.04. I loosely remember that I couldn't boot the original 14.04 iso (when it was first released) in my pc. I waited for an update and then the 14.04.1 came which booted fine in my laptop.

neurobin commented 8 years ago

The current latest of original Ubuntu LTS is Ubuntu 14.04.3. If you want to test that, let me know. I will download the iso and make same kind of changes you do and check the outcome.

danjde commented 8 years ago

I intend to create the live system "physically over" a machine Ubuntu 14.04 LTS. I leave for the creation from Ubuntu 14.04 Gnome Edition, and then upgrade and dist-upgrade it.

I will report...

danjde commented 8 years ago

Hi neurobin, I've build from a machine Ubuntu 14.04 LTS, using a Ubuntu-Gnome 14.04 iso. I've updated to gnome 3.12 and addedd a user and give him sudo and adm group.

Now the boot process goes over cups-browsed startup, but hang whe seem to be start gdm and a console tell me: "Authentication failure"

Is this the problem that you have seen with Ubuntu 14.04? And, have you tried to add a user and give him sudo and adm group?

many thanks

neurobin commented 8 years ago

No that was not the problem. It simply failed to boot in my PC.

I haven't given the user sudo or adm group. I will check it this way...

neurobin commented 8 years ago

I added the existing user ( I already added that user in a previous build) to sudo and adm group. Still there is no error. It works fine. Host system: Xubuntu 14.04.1 LTS Live system: Ubuntu 14.04.1 LTS

neurobin commented 8 years ago

One thing I need to be clear about. Even if you choose "fresh start? y", if you choose the same folder as your previous build, only the system files will be overwritten, your customizations won't be deleted. So if you had made something wrong that won't go away with the "fresh start? y" option, you need to choose a different directory or delete the previous directory.

danjde commented 8 years ago

Hi neurobin, my experience using Host Ubuntu-Gnome 14.04 LTS and Live system Ubuntu-Gnome 14.04 is very different. Adding a user obtain "Authentication failure" and impossibility to access to user (or root) authentication. Instead, deleting user (userdel "user-name") and then rebuilding from "fresh start? n" and "Want to retain edit/home directory? n" the live system goes on, and came back the ability to user login.

thanks

neurobin commented 8 years ago

I see... Ok, I am downloading Ubuntu Gnome 14.04.3, I will check it if I find something. You can try the 14.04.3 version too. This is an LTS version (same as 14.04) and came with bug fixes.

I am downloading with torrent: http://torrent.ubuntu.com/ubuntu-gnome/releases/trusty/release/desktop/ubuntu-gnome-14.04.3-desktop-amd64.iso.torrent

danjde commented 8 years ago

Ok, I will do the same... ;-)

neurobin commented 8 years ago

You are right... If user is added then Ubuntu gnome hangs and the user login option never appears, only a black screen. This is a confirmed bug now, either on That side or this side. It will need more thorough investigation.

danjde commented 8 years ago

Ok, I think could be around the greeter. GDM for Ubuntu Gnome and lightdm for Ubuntu. Now I've tried from Ubuntu Gnome 14.04, upgraded to the last packages and Gnome Shell upgraded to 3.12.2 and a new user sudo/adm added. The same behaviour: unable to login, and from tty1/6 "authentication failure"

In the next day I will try from the same environment, but switched to lightdm, and I want to see..

danjde commented 8 years ago

I've seen here the same problem: https://answers.launchpad.net/relinux/+question/181666

danjde commented 8 years ago

Confirm, switching from GDM to lightdm, the new user can correctly login to own user space. now the question is: how inform the live system to use GDM instead lightdm?

"dpkg-reconfigure gdm" it is not enough.

ciao

danjde commented 8 years ago

Hi neurobin, I am continuing research regarding the problem with GDM. by consulting the system log (particularly "/var/log/upstart/gdm.log" and "/var/log/auth.log" came to discover that GDM still looking for user "ubuntu-gnome". This build infact become from the official Ubunt Gnome respin, that came with a user "ubuntu-gnome".

Seem that JLivecd does not clean well some configuration parts from the starting environment.

Here the log:

"/var/log/upstart/gdm.log"

gdm[1963]: Failed to give slave programs access to the display. Trying to proceed.
gdm-autologin][1987]: AccountsService: ActUserManager: user (null) has no username (uid: 0)
gdm-autologin][1987]: pam_unix(gdm-autologin:account): could not identify user (from getpwnam(ubuntu-gnome))

"/var/log/auth.log"

Nov 16 17:49:10 ubuntu-gnome systemd-logind[1200]: New seat seat0.
Nov 16 17:49:10 ubuntu-gnome systemd-logind[1200]: Watching system buttons on /dev/input/event1 (Power Button)
Nov 16 17:49:10 ubuntu-gnome systemd-logind[1200]: Watching system buttons on /dev/input/event0 (Power Button)
Nov 16 17:49:19 ubuntu-gnome dbus[1161]: [system] Rejected send message, 7 matched rules; type="method_return", sender=":1.10" (uid=0 pid=1733 comm="/usr/sbin/dnsmasq --no-resolv --keep-in-foreground") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.5" (uid=0 pid=1595 comm="NetworkManager ")
Nov 16 17:52:28 ubuntu-gnome gdm-autologin][1987]: pam_unix(gdm-autologin:account): could not identify user (from getpwnam(ubuntu-gnome))
Nov 16 17:52:37 ubuntu-gnome systemd-logind[1200]: Failed to issue method call: Unknown unit: autovt@tty2.service

now I will try to create the user "ubuntu-gnome" and then report..

Update 16-11-2015 22:09:31 +0100

I've found on /etc/gdm/custom.conf the autologin enabled for the user "ubuntu-gnome"; disabling the autologin as below

[daemon]
# Enabling automatic login
# AutomaticLoginEnable = true
# AutomaticLogin = ubuntu-gnome

came back the GDM greeter correct functionality ad is possible to complete the login.

I think the problem solved, I will do same test, and then report...

neurobin commented 8 years ago

That's really great... thanks for your enormous effort.... I will add this piece of information in next update... Though Jlivecd won't take any step itself to solve this problem, as changing the configuration files is out of its jurisdiction.

danjde commented 8 years ago

Confirm, the problem depend from GDM autologin; but the question is a bit complicated:

infact the live distro create on the fly the system config files, as for GDM autologin. For to disable the autologin behaviour you need to edit two files into the live system filesystem; these two files are themselves contained in the compressed file "/casper/initrd.lz" and are:

/scripts/casper-bottom/15autologin
/scripts/casper-bottom/16gdmnopasswd

you must find and change this "15autologin" code from:

        -e "s/^#[ ]*AutomaticLoginEnable =.*\$/AutomaticLoginEnable=true/" \

to

        -e "s/^#[ ]*AutomaticLoginEnable =.*\$/AutomaticLoginEnable=false/" \

then you must also change 16gdmnopasswd from:

    sed -i -e "s/^.*return GdmUtil.fadeInActor(this._promptLabel);\$/$STRING1/" \
           -e "s/^.*return GdmUtil.fadeInActor(this._promptEntry);\$/$STRING2/" \
           $GDMLoginFile

to

#    sed -i -e "s/^.*return GdmUtil.fadeInActor(this._promptLabel);\$/$STRING1/" \
#           -e "s/^.*return GdmUtil.fadeInActor(this._promptEntry);\$/$STRING2/" \
#           $GDMLoginFile

optionally for change user name and hostname, you must edit (into the initrd.lz) the file: /etc/casper.conf

export USERNAME="insert-here-your-username"
export USERFULLNAME="insert-here-your-entire-name"
export HOST="insert-here-your-host-name"
export BUILD_SYSTEM="insert-here-your-build-name"

for extract initrd.lz:

initrd.lz: lzma -dc -S .lz ../initrd.lz | cpio -id

for re-pack initrd.lz:

find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../new-initrd.lz

this is all folk ;-)