Re: Setting up FAI on xenial

2017-02-16 Diskussionsfäden Bill MacAllister

On Thursday, February 16, 2017 1:31:06 PM PST, Thomas Lange wrote:

I guess you do not have installed any linux-image package inside the
nfsroot. Try: 


grep linux-image /var/log/fai/fai-make-nfsroot.log

Since you have installed the Ubuntu version of the FAI packages, your
/etc/fai/NFSROOT may not work for a Debian nfsroot.

Please check the diff of your NFSROOT to this version:
https://github.com/faiproject/fai/blob/master/conf/NFSROOT

In Ubuntu the kernel package ist called linux-image...-generic in
Debian it's linux-image-amd64. I guess this is the problem you have.


I just copied the whole thing in place and ran fai-setup.  It worked!

I have to fight some other fires now and won't actually get to go 
further today. Thanks again for your help.


Bill

--
"Can't sing louder than the guns when I'm gone,
so I guess I'll have to do it while I'm here."

Phil Ochs


Re: Setting up FAI on xenial

2017-02-16 Diskussionsfäden Thomas Lange
I guess you do not have installed any linux-image package inside the
nfsroot. Try: 

grep linux-image /var/log/fai/fai-make-nfsroot.log

Since you have installed the Ubuntu version of the FAI packages, your
/etc/fai/NFSROOT may not work for a Debian nfsroot.

Please check the diff of your NFSROOT to this version:
https://github.com/faiproject/fai/blob/master/conf/NFSROOT

In Ubuntu the kernel package ist called linux-image...-generic in
Debian it's linux-image-amd64. I guess this is the problem you have.

-- 
regards Thomas


Re: Setting up FAI on xenial

2017-02-16 Diskussionsfäden Bill MacAllister

On Thursday, February 16, 2017 12:11:26 PM PST, Thomas Lange wrote:

> Hmmm, it is pulling the package from the debian repo.
That's ok. The nfsroot must be a Debian one. I do not know if a Ubuntu
nfsroot is currently working. Use a Debian nfsroot.

> Okay, the sources.list is pointing to stretch.  Is that expected?
Yes.

> Here is my /etc/fai/nfsroot.conf file.
> #FAI_DEBOOTSTRAP="jessie http://ftp.us.debian.org/debian/";
> FAI_DEBOOTSTRAP="xenial http://archive.ubuntu.com/ubuntu";
Please change this to Debian stretch.


New error:

Creating config file /etc/default/grub with new version
grub-probe: error: cannot find a device for / (is /dev mounted?).
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
install_packages: executing chroot /srv/fai/nfsroot apt-get clean
install_packages: executing chroot /srv/fai/nfsroot dpkg --configure 
--pending

install_packages: executing chroot /srv/fai/nfsroot dpkg -C
install_packages: executing chroot /srv/fai/nfsroot apt-get clean
chmod: missing operand after 'a+r'
Try 'chmod --help' for more information.
ERROR: No initrd was created. Check the package name of the linux-image 
package in /etc/fai/NFSROOT.

Log file written to /var/log/fai/fai-make-nfsroot.log
Log file written to /var/log/fai/fai-make-nfsroot.log
ERROR when calling fai-make-nfsroot.
Log file written to /var/log/fai/fai-setup.log



And I still like to see the /etc/fai/NFSROOT file.


GACK!  I sent the wrong file.  Here is the right one.

# package list for creating the NFSROOT

PACKAGES apt-get

nfs-common fai-nfsroot module-init-tools ssh rdate lshw rpcbind
rsync lftp less dump reiserfsprogs e2fsprogs usbutils
hwinfo psmisc pciutils hdparm smartmontools parted mdadm lvm2
dnsutils ntpdate dosfstools xfsprogs xfsdump btrfs-tools
procinfo numactl dialog
console-common kbd
iproute2 netselect moreutils udev subversion
xz-utils
cupt
pxelinux syslinux-common # in jessie we need both
curl wget- libpsl0- libicu52-
nmap
emacs24-nox

# some network cards needs firmware
#firmware-bnx2 firmware-bnx2x firmware-realtek
#firmware-linux-nonfree

# dracut replaces live-boot and initramfs-tools
#dracut-network live-boot- initramfs-tools-
#dracut-config-generic # this is not available in plain Debian jessie


# you should not edit the lines below
# architecture dependend list of packages that are installed

#git # git consumes a lot of disk space on the FAI CD

PACKAGES install DEBIAN_8
sysvinit-core systemd-sysv-

PACKAGES install I386
grub-pc
linux-image-server

# packages for Ubuntu natty/oneiric/precise:
# linux-image-generic live-boot

PACKAGES install AMD64
grub-pc
#linux-image-server

# packages for Ubuntu vivid
#PACKAGES install UBUNTU
#upstart-sysv


--
"Can't sing louder than the guns when I'm gone,
so I guess I'll have to do it while I'm here."

Phil Ochs


Re: Setting up FAI on xenial

2017-02-16 Diskussionsfäden Thomas Lange

> Hmmm, it is pulling the package from the debian repo.
That's ok. The nfsroot must be a Debian one. I do not know if a Ubuntu
nfsroot is currently working. Use a Debian nfsroot.

> Okay, the sources.list is pointing to stretch.  Is that expected?
Yes.

> Here is my /etc/fai/nfsroot.conf file.
> #FAI_DEBOOTSTRAP="jessie http://ftp.us.debian.org/debian/";
> FAI_DEBOOTSTRAP="xenial http://archive.ubuntu.com/ubuntu";
Please change this to Debian stretch.

And I still like to see the /etc/fai/NFSROOT file.

-- 
regards Thomas


Re: Setting up FAI on xenial

2017-02-16 Diskussionsfäden Bill MacAllister

On Thursday, February 16, 2017 8:43:16 AM PST, Thomas Lange wrote:

Thanks for the log.
You do not install any kernel package inside the nfsroot. I guess it's
because of the ubuntu version of FAI on your host system.

The main problem may be inside /etc/fai/NFSROOT or in fai-make-nfsroot
itself. IIRC we made some changes there.

Can you please try to upgrade your fai packages on the host. Have a
look at https://launchpad.net/~fai/+archive/ubuntu/ppa.


Added the ppa to the sources.list.d and upgraded FAI to version 
5.3.2-0~6669~ubuntu16.04.1


First thing I hit was that the file /etc/fai/apt/keys/faippa.asc was empty. 
I replaced it with the key for the ppa.  I got further, but it still 
failed.  The last few lines of the failure are:


# -
Preparing to unpack .../systemd_232-15_amd64.deb ...
Unpacking systemd (232-15) over (229-4ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
/var/cache/apt/archives/console-setup-linux_1.158_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Log file written to /var/log/fai/fai-make-nfsroot.log
ERROR when calling fai-make-nfsroot.
Log file written to /var/log/fai/fai-setup.log
# -

I chroot'ed into the nfsroot and ran 'apt-get install -f' and found:

WARNING: The following packages cannot be authenticated!
 console-setup-linux

Hmmm, it is pulling the package from the debian repo.

# -
# apt-cache policy console-setup-linux
console-setup-linux:
 Installed: 1.158
 Candidate: 1.158
 Version table:
*** 1.158 500
   500 http://ftp.us.debian.org/debian stretch/main amd64 Packages
   100 /var/lib/dpkg/status
# -

Okay, the sources.list is pointing to stretch.  Is that expected?

Anyway, added the debian archive key and tried again.  It konked over 
again.  I chroot'ed in again and ran 'apt-get install -f'.  Here is the 
first part of log from that:


# -
# chroot /srv/fai/nfsroot/
root@corpfai:/# apt-get install -f
Reading package lists... Done
Building dependency tree   
Reading state information... Done

Correcting dependencies... Done
The following additional packages will be installed:
 console-setup-linux
The following packages will be upgraded:
 console-setup-linux
1 upgraded, 0 newly installed, 0 to remove and 98 not upgraded.
19 not fully installed or removed.
Need to get 0 B/983 kB of archives.
After this operation, 11.3 kB of additional disk space will be used.
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file 
or directory)

Setting up sysvinit-utils (2.88dsf-59.8) ...
Setting up systemd (232-15) ...
Installing new version of config file 
/etc/dbus-1/system.d/org.freedesktop.login1.conf ...
Installing new version of config file 
/etc/dbus-1/system.d/org.freedesktop.systemd1.conf ...

Installing new version of config file /etc/pam.d/systemd-user ...
Installing new version of config file /etc/systemd/journald.conf ...
# ... more normal output
# -

Maybe the /dev/pts warning is the problem?

Here are the setup and make nfsroot logs: http://pastebin.com/Kqk5G20Z 
http://pastebin.com/2xjMLjgp



Please send the /etc/fai/NFSROOT so I can check this file.


Here is my /etc/fai/nfsroot.conf file.

# -
# For a detailed description see nfsroot.conf(5)

# " " for debootstrap
#FAI_DEBOOTSTRAP="jessie http://ftp.us.debian.org/debian/";
FAI_DEBOOTSTRAP="xenial http://archive.ubuntu.com/ubuntu";
FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'

NFSROOT=/srv/fai/nfsroot
TFTPROOT=/srv/tftp/fai
NFSROOT_HOOKS=/etc/fai/nfsroot-hooks/
FAI_DEBOOTSTRAP_OPTS="--exclude=info,wget,dhcp-client --include=aptitude"

# Configuration space
FAI_CONFIGDIR=/etc/fai
# -

Bill

--
"Can't sing louder than the guns when I'm gone,
so I guess I'll have to do it while I'm here."

Phil Ochs


Re: Setting up FAI on xenial

2017-02-16 Diskussionsfäden Thomas Lange
Thanks for the log.
You do not install any kernel package inside the nfsroot. I guess it's
because of the ubuntu version of FAI on your host system.

The main problem may be inside /etc/fai/NFSROOT or in fai-make-nfsroot
itself. IIRC we made some changes there.

Can you please try to upgrade your fai packages on the host. Have a
look at https://launchpad.net/~fai/+archive/ubuntu/ppa.

Please send the /etc/fai/NFSROOT so I can check this file.

-- 
regards Thomas


Re: Setting up FAI on xenial

2017-02-16 Diskussionsfäden Bill MacAllister

On Thursday, February 16, 2017 3:57:33 AM PST, Thomas Lange wrote:
On Wed, 15 Feb 2017 12:30:41 -0800, Bill MacAllister 
 said:


> Same problem.  What I did was to edit /etc/fai/nfsroot.conf and set
> FAI_DEBOOTSTRAP to "jessie http://ftp.us.debian.org/debian/";
> I add the Debian apt keys to /etc/fai/apt/keys
Please put the log of the fai-make-nfsroot -v call onto
paste.debian.net. You may also want to join the #fai channel, to get
faster help.


Turns on the log is just a little bigger than the Debian paste limit.  Here 
is a pastebin of the log http://pastebin.com/d3RBfTZD


I did join the channel, but didn't get an response the one time I asked 
there.  I expect being on the Left Coast of the US was the problem.


I am going to build as Debian Jessie systems, configure backports for FAI 
and try that next.


Thanks again,

Bill

--
"Can't sing louder than the guns when I'm gone,
so I guess I'll have to do it while I'm here."

Phil Ochs


Re: Setting up FAI on xenial

2017-02-16 Diskussionsfäden Thomas Lange
> On Wed, 15 Feb 2017 12:30:41 -0800, Bill MacAllister  
> said:

> Same problem.  What I did was to edit /etc/fai/nfsroot.conf and set
> FAI_DEBOOTSTRAP to "jessie http://ftp.us.debian.org/debian/";
> I add the Debian apt keys to /etc/fai/apt/keys
Please put the log of the fai-make-nfsroot -v call onto
paste.debian.net. You may also want to join the #fai channel, to get
faster help.

-- 
regards Thomas


Re: Setting up FAI on xenial

2017-02-15 Diskussionsfäden Bill MacAllister

Switching mailers, so the discussion is a bit more readable.

I am having problems setting up FAI on a Xenial system using the stock 
packages.  fai-setup is failing.  The last few lines of the run are:


Which FAI version are you using?

Building a Ubuntu nfsroot may not work. Then create a Debian nfsroot,
but install Ubuntu on your clients. This combination will work.


The version that is in the Xenial archive right now is 5.0.3ubuntu1.

Okay, I'll give it a try and let you know what happens.


Same problem.  What I did was to edit /etc/fai/nfsroot.conf and set
FAI_DEBOOTSTRAP to "jessie http://ftp.us.debian.org/debian/";

I add the Debian apt keys to /etc/fai/apt/keys

What else should I try?

Bill




--
Bill