RE: [External] Re: GRUB EFI blues - Debian 9/FAI 5.3.6

2018-04-24 Diskussionsfäden Bob Apodaca
Honeywell Internal

> The FAI classes are defined in class/. By default FAI defines the class
> GRUB_PC if the architecture is i386 or amd64. You should try to change this to
> GRUB_EFI in class/60-misc.
>
> --
> regards Thomas

Thank you, Thomas. I downloaded the source code for FAI 5.3.6 and came to a 
similar conclusion. Here's what I did in one of my class/ files:

if test -d /sys/firmware/efi ; then
echo GRUB_EFI
fi

I also had to reorganize my files under disk_config/* so I could support both 
BIOS and EFI based systems simultaneously.

Bob


RE: [External] Re: GRUB EFI blues - Debian 9/FAI 5.3.6

2018-04-18 Diskussionsfäden Bob Apodaca
Please accept my apology in advance, I cannot get this e-mail client to bottom 
post and be readable.



Here's what I've found:

1.   My thumb drive appears to be booting in EFI mode as I can see 
/sys/firmware/efi once the system is installing. In addition, dmesg.log shows:
[0.00] efi: EFI v2.50 by American Megatrends
[0.00] efi:  ACPI=0x9e1b2000  ACPI 2.0=0x9e1b2000  SMBIOS=0xf05e0  
SMBIOS 3.0=0xf0600  MPS=0xfca20  ESRT=0x9a7e0bd8

2.   I suspect another issue was the fact I was missing a partition for 
/boot/efi with a "vfat" filesystem. I've fixed this as well.

3.   I thought I might need the grub-efi package installed in the NFSROOT 
and I tried to do so but this caused conflicts with fai-make-nfsroot



At this point, I think getting GRUB to install is the main issue. If I could 
get FAI to create GRUB_EFI that would be wonderful as well.



From: linux-fai [mailto:linux-fai-boun...@uni-koeln.de] On Behalf Of Andreas 
Heinlein
Sent: Wednesday, April 18, 2018 3:22 AM
To: linux-fai@uni-koeln.de
Subject: [External] Re: GRUB EFI blues - Debian 9/FAI 5.3.6



Am 18.04.2018 um 10:14 schrieb tt-...@kky.ttu.ee<mailto:tt-...@kky.ttu.ee>:

   I can second to that. I installed a SuperMicro X10SLM-F based server last 
month and did not find any option in the BIOS to PXE-boot FAI into UEFI mode. 
Ended up using disklabel:gpt-bios and GRUB_PC. I did not try to boot off an USB 
stick, so it is worth investigating if an option exists for booting that in 
UEFI mode.



   From my experiments I was left with the impression that it is not easy (or 
even possible) to “cross-install” UEFI-boot-capable disk if the system was 
booted into legacy (BIOS) mode. If someone has found a way to do it, I would 
also appreciate suggestions.



   Regards,

   Toomas



   From: linux-fai 
<linux-fai-boun...@uni-koeln.de><mailto:linux-fai-boun...@uni-koeln.de> On 
Behalf Of Andreas Heinlein
   Sent: Wednesday, April 18, 2018 9:56 AM
   To: linux-fai@uni-koeln.de<mailto:linux-fai@uni-koeln.de>
   Subject: Re: GRUB EFI blues - Debian 9/FAI 5.3.6



   Am 18.04.2018 um 00:28 schrieb Bob Apodaca:

  I think the first issue is FAI is setting the GRUB_PC class instead of 
the GRUB_EFI class and I'm not sure why.

   I am pretty sure this depends on how the installation was started. That 
means you will have to boot your FAI installation using UEFI as well. This can 
be a bit tricky if you want to install from network - I also tried setting up 
PXE with UEFI some time ago and failed.
   Bye,
   Andreas

   I am pretty sure it is not possible to set up grub-efi correctly when booted 
in legacy mode. While it is possible to detect that we are actually running an 
EFI-capable machine (dmidecode or lshw can detect that), we cannot access the 
efi variables under /sys/efi since the firmware doesn't expose them to the host 
when running under CSM aka "Legacy mode".

   Booting from USB with UEFI is possible, in fact I have such a USB device 
here somewhere. But I need to remember what I did, it was not (yet) completed 
in FAI at that time. I remember I wanted to make some patches available, but 
never found the time. This is almost a year ago now. What you basically need is 
a small FAT partition preferrably of type 'ef' (EFI Boot Partition) on the USB 
drive, which contains a grub efi image as EFI/BOOT/BOOTX64.EFI. That image can 
be created with grub-mkimage and needs to include at least all modules for 
reading the "main" partition and the grub.cfg on it. That will be mostly ext 
filesystem and msdos partition table, I think. That image should also include 
an embedded config file with a one-liner like
   configfile (hd0,msdos1)
   if the main partition is the second on the USB drive.

   I will try to find this again and post it here.

   Bye,
   Andreas



RE: [External] Re: GRUB EFI blues - Debian 9/FAI 5.3.6

2018-04-18 Diskussionsfäden Bob Apodaca
Honeywell Internal









From: linux-fai [mailto:linux-fai-boun...@uni-koeln.de] On Behalf Of Andreas 
Heinlein
Sent: Wednesday, April 18, 2018 3:22 AM
To: linux-fai@uni-koeln.de
Subject: [External] Re: GRUB EFI blues - Debian 9/FAI 5.3.6



Am 18.04.2018 um 10:14 schrieb tt-...@kky.ttu.ee<mailto:tt-...@kky.ttu.ee>:

   I can second to that. I installed a SuperMicro X10SLM-F based server last 
month and did not find any option in the BIOS to PXE-boot FAI into UEFI mode. 
Ended up using disklabel:gpt-bios and GRUB_PC. I did not try to boot off an USB 
stick, so it is worth investigating if an option exists for booting that in 
UEFI mode.



   From my experiments I was left with the impression that it is not easy (or 
even possible) to “cross-install” UEFI-boot-capable disk if the system was 
booted into legacy (BIOS) mode. If someone has found a way to do it, I would 
also appreciate suggestions.



   Regards,

   Toomas



   From: linux-fai 
<linux-fai-boun...@uni-koeln.de><mailto:linux-fai-boun...@uni-koeln.de> On 
Behalf Of Andreas Heinlein
   Sent: Wednesday, April 18, 2018 9:56 AM
   To: linux-fai@uni-koeln.de<mailto:linux-fai@uni-koeln.de>
   Subject: Re: GRUB EFI blues - Debian 9/FAI 5.3.6



   Am 18.04.2018 um 00:28 schrieb Bob Apodaca:

  I think the first issue is FAI is setting the GRUB_PC class instead of 
the GRUB_EFI class and I'm not sure why.

   I am pretty sure this depends on how the installation was started. That 
means you will have to boot your FAI installation using UEFI as well. This can 
be a bit tricky if you want to install from network - I also tried setting up 
PXE with UEFI some time ago and failed.
   Bye,
   Andreas

   I am pretty sure it is not possible to set up grub-efi correctly when booted 
in legacy mode. While it is possible to detect that we are actually running an 
EFI-capable machine (dmidecode or lshw can detect that), we cannot access the 
efi variables under /sys/efi since the firmware doesn't expose them to the host 
when running under CSM aka "Legacy mode".

   Booting from USB with UEFI is possible, in fact I have such a USB device 
here somewhere. But I need to remember what I did, it was not (yet) completed 
in FAI at that time. I remember I wanted to make some patches available, but 
never found the time. This is almost a year ago now. What you basically need is 
a small FAT partition preferrably of type 'ef' (EFI Boot Partition) on the USB 
drive, which contains a grub efi image as EFI/BOOT/BOOTX64.EFI. That image can 
be created with grub-mkimage and needs to include at least all modules for 
reading the "main" partition and the grub.cfg on it. That will be mostly ext 
filesystem and msdos partition table, I think. That image should also include 
an embedded config file with a one-liner like
   configfile (hd0,msdos1)
   if the main partition is the second on the USB drive.

   I will try to find this again and post it here.

   Bye,
   Andreas





























































































































































GRUB EFI blues - Debian 9/FAI 5.3.6

2018-04-17 Diskussionsfäden Bob Apodaca
I have a Supermicro X11SAE motherboard with an M.2 SATA drive that requires
UEFI to boot. I've created a bootable USB drive, I've changed the BIOS
settings to use UEFI and I can boot and appear to install the system.
However, the system will not boot after the install is completed and the
system does not recognize the drive.

 

I think the first issue is FAI is setting the GRUB_PC class instead of the
GRUB_EFI class and I'm not sure why.

 

I've also attempted to run GRUB_EFI/10-setup manually after the installation
is complete, this does not allow the system to boot either.

 

Help.

 

 



debconf and exim4

2017-06-06 Diskussionsfäden Bob Apodaca
Honeywell Internal



I'm trying to pre-seed answers for exim4-config by creating a file in 
debconf/FAIBASE. For the most part, it appears to work. Here's the line that's 
giving me issues:



$ grep other debconf/FAIBASE

exim4-configexim4/dc_other_hostnamesstring



However, when I'm in the chrooted install environment, I'm getting this:



root@phxtst09:/# debconf-get-selections | grep exim4-config | grep other

exim4-configexim4/dc_other_hostnamesstring  subdomain.example.com



So, it's not blank. Any ideas?





RE: cryptsetup with FAI 4.3.1 (Debian Jessie)

2017-05-16 Diskussionsfäden Bob Apodaca
From: linux-fai [mailto:linux-fai-boun...@uni-koeln.de] On Behalf Of Bob Apodaca
Sent: Tuesday, May 16, 2017 8:48 AM
To: linux-fai@uni-koeln.de
Subject: cryptsetup with FAI 4.3.1 (Debian Jessie)



I'm trying to make an encrypted partition and getting errors.  Here are my 
files:



#

disk_config disk1 disklabel:gpt bootable:1 fstabkey:uuid

primary - 1M   - -

primary / 8192 ext4  rw,errors=remount-ro createopts="-L 
root"

primary swap  1024 swap  sw  createopts="-L swap"

primary /home 5120 ext4  rw,errors=remount-ro createopts="-m 1 
-L home"

primary /var/log  2048 ext4  rw,errors=remount-ro createopts="-L 
var_log"

primary /tmp  4096 ext4  rw,errors=remount-ro createopts="-L 
tmp"

primary - 2048-- -



disk_config cryptsetup

luks:"test" /var/data disk1.7  ext3  rw,errors=remount-ro createopts="-L 
data"







and here is some output from fai.log:



Executing: wipefs -a /dev/sda7

...

Executing: parted -s /dev/sda mkpart primary "" 21476933632B 80026344959B

...

Executing: head -c 2048 /dev/urandom | od | tee /tmp/fai/crypt_dev_sda7

Executing: yes YES | cryptsetup luksFormat /dev/sda7 /tmp/fai/crypt_dev_sda7 -c 
aes-cbc-essiv:sha256 -s 256

Executing: cryptsetup luksOpen /dev/sda7 crypt_dev_sda7 --key-file 
/tmp/fai/crypt_dev_sda7

Executing: yes 'test' | cryptsetup luksAddKey --key-file 
/tmp/fai/crypt_dev_sda7 /dev/sda7

Executing: yes 'test' | cryptsetup luksRemoveKey /dev/sda7 
/tmp/fai/crypt_dev_sda7

Executing: mkfs.ext3 -L data /dev/mapper/crypt_dev_sda7

/dev/sda5 UUID=073bb05a-c5c0-454c-8ba7-034b4d927da7

/dev/sda5 LABEL=var_log

/dev/sda4 UUID=342b98dc-bc5f-40fd-bb7d-001b38c057ee

/dev/sda4 LABEL=home

/dev/sda3 UUID=b055a193-3dfe-4c4a-b569-84534ddd39b0

/dev/sda3 LABEL=swap

/dev/sda6 UUID=76199b90-db2d-4b2a-b43c-f721639379d0

/dev/sda6 LABEL=tmp

/dev/sda2 UUID=8270d805-b35d-46fb-bb8f-d602aec8bd26

/dev/sda2 LABEL=root

Calling task_mountdisks

Enable swap device /dev/sda3

Mounting UUID=8270d805-b35d-46fb-bb8f-d602aec8bd26 to /target/

mount: unknown filesystem type 'ext4'

Error in task mountdisks. Code: 885

Traceback: task_error task_mountdisks task task_install task task_action task 
main

Source hook: savelog.LAST.source

ERRORS found in log files. See /tmp/fai/error.log



--



Two apologies:

1.   My mail client stinks

2.   I had rebuilt the NFSROOT and forgot to update the kernel/initrd on my 
USB stick causing this error.







RE: /tmp read-only with Debian Stretch and FAI 5.3.4

2017-02-14 Diskussionsfäden Bob Apodaca
> For a 4.x kernel you need rootovl instead of aufs as kernel parameter.
boot=live is now obsolete.

That was the issue. Thanks.



/tmp read-only with Debian Stretch and FAI 5.3.4

2017-02-14 Diskussionsfäden Bob Apodaca
I know there are several threads already going related to this topic, sorry
to start another. I'm using a GRUB bootable USB stick to start FAI.  I've
already attempted the suggestions here:

 

https://lists.uni-koeln.de/pipermail/linux-fai/2016-August/011454.html

 

Here's my /etc/exports on the FAI server (192.168.80.138):

 

# Force  first export NFSv4, everything else NFSv3 (for FAI)

/srv/nfsv4 192.168.80.0/24(fsid=0,ro,no_subtree_check)

/srv/fai *(async,ro)

 

Here's the stanza from my GRUB entry:

 

menuentry 'Debian 9 (Stretch) 64 bit FAI using DHCP' {

insmod part_msdos

echo'Loading Linux 4.9.0-1-amd64 ...'

linux   /stretch64/vmlinuz-4.9.0-1-amd64 ip=eth0:dhcp
root=nfs:192.168.80.138:/srv/fai/nfsroot,nfsvers=3 aufs boot=live
FAI_CONFIG_SRC=nfs://192.168.80.138/srv/fai/config,nfsvers=3
FAI_FLAGS=verbose,sshd,createvt FAI_ACTION=install
BOOT_IMAGE=vmlinuz-4.9.0-1-amd64 HOSTNAME=faitest

echo'Loading initial RAM disk ...'

initrd  /stretch64/initrd.img-4.9.0-1-amd64

}

 

I am still having the read-only /tmp issue. Any other suggestions?

 



RE: Recommended specs for a FAI server

2016-08-17 Diskussionsfäden Bob Apodaca
Sent: Wednesday, August 17, 2016 1:53 PM
To: linux-fai@uni-koeln.de
Subject: Recommended specs for a FAI server

I browsed through the mailing list archive but could not find any infos on this:

What would be the "recommended" specifications for a FAI server? I know these 
things can vary from one use case to another, but what about a sensible setup?

Maybe more broadly, what are your FAI server specs (if you use a standalone 
machine/VM)?

-

I use a standalone machine, it's a Pentium 4 processor @ 2.8GHz with 512MB. We 
usually only install one client at a time, but I'm sure the system could handle 
more. I have another system that is an apt proxy to cache packages so that may 
take some of the load off the main FAI server.

HTH,

Bob

PS: Sorry for the bad formatting, my e-mail client is not so good for mailing 
lists.





RE: $ROOTCMD commands fail

2016-05-18 Diskussionsfäden Bob Apodaca
>From: linux-fai [mailto:linux-fai-boun...@uni-koeln.de] On Behalf Of Thomas
Lange
>Sent: Wednesday, May 18, 2016 1:45 PM
>To: fully automatic installation for Linux 
>Subject: Re: $ROOTCMD commands fail
>
>> On Wed, 18 May 2016 15:38:02 -0500, Michael Kriss 
said:
>
>> $ROOTCMD cd /home/kriss/src_dir ; make install Please try
>
>$ROOTCMD bash -c "cd /home/kriss/src_dir ; make install"

Be sure you are using "/bin/bash" as your interpreter and not "/bin/sh".




RE: setting up deb mirror

2016-03-28 Diskussionsfäden Bob Apodaca
My apologies in advance, this e-mail client does not appear to permit bottom 
posting nor do I have the freedom to choose my e-mail client.

 

I use a APT mirror and I put the settings in /etc/fai/apt/sources.list on the 
FAI server (this is for FAI 4.3.1). Once I do “fai-make-nfsroot” the file gets 
copied to the NFSROOT on the FAI server. Did you run “fai-make-nfsroot” after 
you updates /etc/fai/apt/sources.list?

 

From: linux-fai [mailto:linux-fai-boun...@uni-koeln.de] On Behalf Of Ronald 
Steele
Sent: Tuesday, March 15, 2016 1:02 PM
To: fully automatic installation for Linux 
Subject: setting up deb mirror

 

What is the correct way to configure faiserver when the clients are on a 
private, un-routed network?

I’ve run "fai-mirror /srv/mirror" on faiserver.  However it’s not clear to me 
how this gets served to the client. I’ve tried

setting /etc/fai/apt/sources.list to point to faiserver, and that failed.  I’ve 
tried defining

FAI_DEBMIRROR=nfs://faiserver/srv/mirror. This caused the install to stop 
saying it could not perform

the nfs mount.  However, I could perform the mount from the command line so I 
know the file system

is exported properly.  

 

This if FAI 5.0.1

 

Thanks,

Ron

 

 

 



Re: Hooks not working with 4.3.1?

2016-01-29 Diskussionsfäden Bob Apodaca

Brilliant! It worked just as you suggested. Thanks!

On 01/29/2016 12:21 AM, Carsten Aulbert wrote:

Hi Bob

On 01/28/2016 08:31 PM, Bob Apodaca wrote:

I can run the script with an interactive shell and it works. Any ideas?

If I recall correctly, FAI is using run-parts with the "LSB" option,
i.e. your script name does not match the expected regexps:

"
If the --lsbsysinit option is given, then the names must not end in
.dpkg-old  or .dpkg-dist or .dpkg-new or .dpkg-tmp, and must belong to
one  or more   of   the   following   namespaces:   the
LANANA-assigned   namespace   (^[a-z0-9]+$);   the   LSB  hierarchical
and  reserved  namespaces (^_?([a-z0-9_.]+-)+[a-z0-9]+$); and the Debian
cron script namespace (^[a-zA-Z0-9_-]+$).
"

Can you try renaming it to 10-script and check again?

HTH

Carsten




Hooks not working with 4.3.1?

2016-01-28 Diskussionsfäden Bob Apodaca
I am using FAI with Debian 8 ("Jessie") and each time I re-run 
fai-make-nfsroot my hooks are not run. I have them set-up as follows:


# ls -l /etc/fai/nfsroot-hooks/
total 4
-rwxr-xr-x 1 root root 197 Sep 15 09:31 scripts.sh

The scripts.sh has the following:

-
#!/bin/sh

install -g root -o root -m 0644 /etc/dhcp/dhclient.conf 
/srv/fai/nfsroot/etc/dhcp/dhclient.conf

-

I can run the script with an interactive shell and it works. Any ideas?


/etc/resolv.conf with FAI 4.3.1

2015-07-20 Diskussionsfäden Bob Apodaca
During the installation, the /etc/resolv.conf file is not the file I 
expected. The FAI server does have the correct file, but the target has 
2 files:


/etc/resolv.conf
/etc/resolv.conf-installserver

The target is using DHCP, so I suspect the the resolv.conf is written 
when the IP address is acquired. Is there a way to over-ride this? The 
DHCP server does not have the correct search path (and I cannot update 
the DHCP server).


Can I install and use the resolvconf package in the FAI root to fix this?


Re: putting a label on a disk

2015-07-16 Diskussionsfäden Bob Apodaca

On 07/16/2015 09:22 AM, John G Heim wrote:

All,

Question related to those I asked earlier in the week... Can 
setup-storage put a label on a disk partition so that it can be 
mounted via the label rather than the uuid?  I am guessing not 
beccause parted doesn't do that (as far as I can tell). I guess I can 
use e2label and xfs_admin in a script. But But I think I am going to 
have to reproduce some of the logic in setup-storage in order to make 
sure the label matches the partition.



You can use createopts to pass an option to mkfs, like this:

primary / 8192-ext4  rw,errors=remount-ro 
createopts=-L root


Bob



Re: installing to a wiped disk

2015-07-10 Diskussionsfäden Bob Apodaca

On 07/10/2015 07:46 AM, John G Heim wrote:
My setup-storage config is below. I copied it from a working FAI 
setup. Our current FAI server is debian wheezy with FAI 4.3.1. I'm 
setting up an ubuntu vivid server with FAI 4.3.3.


I mentioned in another message that I happen to be blind. But I did 
listen to the setup-storage documentation and I didn't hear anything 
about creating a partition table. It is somewhat tedious listening to 
documentation, as you might imagine, and I may have missed it.


disk_config disk1 bootable:1 align-at:4k
primary  / 64G  ext3   rw,relatime
logical  swap  4G-8G   swap   rw
logical  /home  1%-   ext3  rw,relatime

Hi John,

I am using disklabel:gpt to create a GPT style partition table. You 
can also use disklabel:msdos to make the old style partition table. 
This belongs on your disk_config line before you specify partitions, 
file systems, etc.


Some more information here: http://wiki.fai-project.org/wiki/Setup-storage

Bob



Re: initd error: touch: not found

2015-06-04 Diskussionsfäden Bob Apodaca

On 05/28/2015 02:26 PM, Bob Apodaca wrote:

I am using Debian Jessie (AMD64) and am getting the following message
when the system reboots:

/init: 401: /init: touch: not found

I did a few searches and some seemed to suggest rebuilding the initrd.
I've tried this, but it doesn't seem to help. Anyone else seen this?


If anyone else has this issue, it is not related to FAI but to the 
initramfs-tools package:


https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783291




How do you disable a service with systemd?

2015-05-28 Diskussionsfäden Bob Apodaca
I am using Debian Jessie and things are going well, with a couple 
exceptions. I am installing lightdm, but on some systems I want to 
disable it.  I was trying to do:


systemctl disable lightdm

However, systemd knows this is a chroot environment and the command 
fails. I've also tried the following:


$ROOT_CMD rm -f /etc/systemd/system/display-manager.service
$ROOT_CMD /usr/sbin/update-rc.d lightdm defaults
$ROOT_CMD /usr/sbin/update-rc.d lightdm disable

Any suggestions?


initd error: touch: not found

2015-05-28 Diskussionsfäden Bob Apodaca
I am using Debian Jessie (AMD64) and am getting the following message 
when the system reboots:


/init: 401: /init: touch: not found

I did a few searches and some seemed to suggest rebuilding the initrd. 
I've tried this, but it doesn't seem to help. Anyone else seen this?


Re: fai-installation with static ip-address

2014-07-31 Diskussionsfäden Bob Apodaca

On 07/31/2014 03:50 AM, Werner Pommerer wrote:


Hello,

can anyone give an example, how to do  a fai-installation
with static ip-addresses for the clients? There are no dhcp-servers in
our subnets, where the servers are.


I have done this, though it was not the easiest task. My first step was 
to create a bootable CD-ROM that uses GRUB to load the FAI kernel and 
initrd (if you search the FAI archives I believe I posted the steps 
previously). Next, I created some custom entries where I could specify 
the IP address, similar to:


menuentry 'Wheezy 32 bit FAI using static IP' {
insmod part_msdos
echo'Loading Linux 3.2.0-4-686-pae ...'
linux   /wheezy/vmlinuz-3.2.0-4-686-pae 
ip=192.168.1.222::192.168.1.1:255.255.255.0::eth0:off root=/dev/nfs 
nfsroot=192.169.1.2:/srv/fai/nfsroot:vers=3 aufs boot=live 
FAI_CONFIG_SRC=nfs://192.168.1.2/srv/fai/config 
FAI_FLAGS=verbose,sshd,createvt FAI_ACTION=install 
BOOT_IMAGE=vmlinuz-3.2.0-4-686-pae HOSTNAME=

echo'Loading initial ramdisk ...'
initrd  /wheezy/initrd.img-3.2.0-4-686-pae
}

I've obscured the IP addresses, for your reference:

192.168.1.222 is the IP address of the target system
192.168.1.1 is the network gateway
192.168.1.2 is the IP of the FAI server

and I have to fill-in the HOSTNAME= parameter so FAI will know what type 
of installation to perform.







Re: fai-cd -B gives an error

2014-05-28 Diskussionsfäden Bob Apodaca

On 05/28/2014 12:09 AM, werner.pomme...@uni-hohenheim.de wrote:

Thank you. I am very interested. Could you explain in more detail for me?

Werner I have created a bootable CD-ROM using GRUB, but I do not use 
fai-cd.  I only use the CD-ROM to boot the kernel and load the initrd, 
after those steps the system boots using NFS. I have also successfully 
used a similar process to boot from a USB thumb drive. If this 
set-up would help you I can attempt to explain how to create your own.


Bob



Configure your FAI installation as you would for a normal PXE or DHCP 
boot process.

A some point you will run the command: make-nfs-root
Now create a folder where you will begin to create your CD-ROM, I call 
mine cdroot

Create a boot directory and grub subdirectory: mkdir -p cdroot/boot/grub
Now create a grub.cfg in boot/grub, here's a starting point:

set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
set timeout=30

menuentry 'Wheezy 32 bit FAI using DHCP' {
insmod part_msdos
echo'Loading Linux 3.2.0-4-686-pae ...'
linux   /wheezy/vmlinuz-3.2.0-4-686-pae ip=eth0:dhcp 
root=/dev/nfs nfsroot=192.168.1.166:/srv/fai/nfsroot:vers=3 aufs 
boot=live FAI_CONFIG_SRC=nfs://192.168.1.166/srv/fai/config 
FAI_FLAGS=verbose,sshd,createvt FAI_ACTION=install 
BOOT_IMAGE=vmlinuz-3.2.0-4-686-pae HOSTNAME=fai

echo'Loading initial ramdisk ...'
initrd  /wheezy/initrd.img-3.2.0-4-686-pae
}

You will need to replace 192.168.1.166 with the IP address of your FAI 
server.


Now create a wheezy subdirectory in your cdroot directory and copy 
the kernel and initrd files from $NFSROOT/boot directory to your 
cdroot boot directory.


Now create your ISO image with this command:
grub-mkrescue --modules=linux ext2 fshelp ls boot pc  -o 
grub2-boot.iso cdroot/


For Debian, I had to install the xorriso package to properly build the 
ISO image.


Burn your ISO image.

When the system boots, use Control-x to edit the settings and change 
the hostname from fai to the proper hostname for the target system.


To transfer to a USB thumb drive:
1. Do a search for GRUB bootable USB for instructions on creating a 
bootable GRUB USB stick.
2. Simply copy all your files from your cdroot directory structure to 
the USB stick.


Bob





Re: fai-cd -B gives an error

2014-05-27 Diskussionsfäden Bob Apodaca

On 05/26/2014 05:25 AM, Werner Pommerer wrote:


Hello,

I would like to create a boot only ISO image which does a network 
installation.


fai-cd -B /tmp/test.iso

NFSROOT /srv/fai/nfsroot   mounted

Found dracut inside nfsroot, but booting a FAI CD with dracut inside 
the nfsrroot does not yet work.


Using grub2

preparing grub2 eltorito.img using existing core.img from NFSROOT

no memtest86+.bin found, omit memtest boot option

Writing FAI CD-ROM image to /tmp/test.iso. This may need some time.

re-directing all messages to /dev/null

ERROR: genisoimage failed.

Does anyone have any ideas what might be going wrong?

Regards

Werner Pommerer


I have created a bootable CD-ROM using GRUB, but I do not use fai-cd.  I 
only use the CD-ROM to boot the kernel and load the initrd, after those 
steps the system boots using NFS. I have also successfully used a 
similar process to boot from a USB thumb drive. If this set-up would 
help you I can attempt to explain how to create your own.


Bob



Nagios dependencies not installed

2014-03-21 Diskussionsfäden Bob Apodaca
We are deploying Nagios and I attempted to add it to our base 
installation. The package is installed, but none of the dependencies are 
being installed.


I did not see anything helpful in the installation log nor the error 
log. My package_config/FAIBASE file looks like this:


PACKAGES aptitude DEBIAN
bind9-host
...
nagios-nrpe-server
...
time
update-inetd
[EOF]

Using Debian wheezy:

# dpkg -l | grep fai
ii  fai-client   4.0.8~deb7u1 
 all  Fully Automatic Installation client package
ii  fai-doc  4.0.8~deb7u1 
 all  Documentation for FAI
ii  fai-server   4.0.8~deb7u1 
 all  Fully Automatic Installation server package
ii  fai-setup-storage4.0.8~deb7u1 
 all  automatically prepare storage devices


Thank you for your consideration.


ifclass syntax within if statement

2013-10-16 Diskussionsfäden Bob Apodaca

When installing AMD64 systems, I have created a small script:

#!/bin/sh

if ifclass AMD64 ; then
# https://wiki.debian.org/Multiarch/Implementation
$ROOTCMD dpkg --add-architecture i386
fi

However, when the target system is installed it appears the command has 
not run:


# dpkg --print-foreign-architectures

I would appreciate any suggestions.



Re: Problems with wheezy installation on multi nic servers

2013-08-26 Diskussionsfäden Bob Apodaca

On 08/26/2013 06:05 AM, Steffen Eichler wrote:

Hi,

I've installed a fai server with version 4.0.7.

If I start a installation on a server with more than one network interface the 
following options in pxelinux.cfg

APPEND initrd=initrd.img-3.2.0-4-amd64 ip=dhcp root=/dev/nfs 
nfsroot=XXX.XXX.XXX.XXX:/srv/fai/wheezy/nfsroot aufs rd_NO_LVM 
FAI_CONFIG_SRC=nfs://XXX.XXX.XXX.XXX/srv/fai/wheezy/config/  
FAI_FLAGS=verbose,sshd,createvt root=/dev/nfs boot=live FAI_ACTION=install 
vga=785

DHCP configuration of interfaces fails and fai-client is not able to mount nfs. 
After that installation runs in kernel panic.

I have tried this from grub, not pxelinux.cfg, but I suspect it will work:

ip=eth0:dhcp

Or whatever ethernet device you want it to use. Try that, see if it helps.

Bob



Re: update to wheezy / r8169 card

2013-07-29 Diskussionsfäden Bob Apodaca

Two things for you to check:

1. Perhaps a firmware issue, on Debian I found a package named 
firmware-realtek.


2. I have several systems with 2 network cards and there is an 
approximately 2 minute time-out when the second network card is not 
connected to a network where it can grab an address.  If this is your 
situation, you can ignore the other network card with an option similar to:


ip=eth0:dhcp

in your boot configuration.

Bob

On 07/29/2013 05:44 AM, Michał Dwużnik wrote:

Hi,

I'm in the middle of a big leap to wheezy on my stations.

The faisrv itself is upgraded to wheezy,
I checked booting and installing squeeze from wheezy server, 
everything went fine for the test stations.


Installs on dell optiplex 3010 machines were smooth (r8169 network 
card I was a bit worried about...).




After that I decided to try on a new nfsroot, built for wheezy install 
on the stations


Having built the nfsroot I find stations correctly booting from tftp 
with kernel 3.2


(pxelinux file is
default fai-generated

label fai-generated
kernel vmlinuz-3.2.0-4-amd64
append initrd=initrd.img-3.2.0-4-amd64 ip=dhcp  root=/dev/nfs 
nfsroot=/srv/fai/nfsroot aufs nfsopts=-onfsvers=3

)

Kernel boots ok, initrd seems OK

The boot process  apparently stops when trying to reconfigure the 
network adapter

r8169...
'eth0 link is up'

and this does not proceed to the later stages.

Any hints on that?

Regards
Michal

--
Michal Dwuznik




Use script in /usr/local/bin during install

2013-05-21 Diskussionsfäden Bob Apodaca
Forgive me if this is a repeat, I sent this over 90 minutes ago and have 
not seen it yet.


I need to run a custom script during an FAI install. My first thought 
was to install the script in NFSROOT/usr/local/bin. However, when I 
booted my install target /usr/local/bin was empty.


I'd appreciate any suggestions.



Re: FAI with NFS v4 on Debian Wheezy

2013-05-07 Diskussionsfäden Bob Apodaca
Thank you for the responses and I did not mean to imply this is an issue 
with FAI, just thought some others on the FAI list may have had some 
experience with it.


I do have idmapd running on both the server and install client. It does 
not appear to be helping. I am going to try NFS v3.


Bob

On 05/07/2013 07:33 AM, Toomas Tamm wrote:

Hello!

I think I got it the other (incorrect) way in my original post. Sorry!
In wheezy, FQDN minus hostname is the default (Domain is not set
in /etc/idmapd.conf by default), while in squeeze, it is fixed to
localdomain in the provided /etc/idmapd.conf.

The bottom line is, one must ensure that the domain is identical on the
server and client. Otherwise strange things happen with UIDs and GIDs.

Toomas


On Tue, 2013-05-07 at 13:06 +0200, Andreas B. Mundt wrote:

Hi,

On Tue, May 07, 2013 at 10:23:58AM +0300, Toomas Tamm wrote:
[...]

2) ensure that all idmapd-s have the same value for Domain. Squeeze
defaults to a portion of your fqdn, while wheezy defaults to
localdomain. This is set in /etc/idmapd.conf and better make it
identical across your entire network.

If you do not specify the domain, it will be picked up from the fqdn.

man idmapd.conf:

Domain  The  local NFSv4 domain name.  An NFSv4 domain is a namespace
 with a unique username-UID and groupname-GID mapping.
 (Default: Host's fully-qualified DNS domain name)

I use the following /etc/idmapd.conf:

[General]

Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
# set your own domain here, if id differs from FQDN minus hostname
# Domain = localdomain

[Mapping]

Nobody-User = nobody
Nobody-Group = nogroup

and it works fine here for NFSv4 mounted home directories
(cf. debian-lan project).

Best regards,

  Andi





FAI with NFS v4 on Debian Wheezy

2013-05-06 Diskussionsfäden Bob Apodaca
I have set-up an FAI server and have a client I am using to refine my 
files and scripts.  The issue I am having is file and group ownership:


ls -l /etc/cups/cupsd.conf

-rw-r--r-- 1 4294967294 4294967294 4670 Mar 14 13:51 cupsd.conf

The nfsstat -m shows I am using NFS v4 on the client for the 
/var/lib/fai/config directory.  I have nfs-common installed and 
/etc/idmapd.conf is configured on both the client and server.


More confusing, when I do this command on the client:


# ls -l /var/lib/fai/config/files/
total 24
drwxr-xr-x 22 root   root   4096 May  6 09:59 etc
drwxr-xr-x  3 4294967294 4294967294 4096 Nov  7  2006 home
drwx--  3 4294967294 4294967294 4096 Apr 23 12:15 lib
drwxr-xr-x  5 root   root   4096 Mar 30  2011 root
drwxr-xr-x  3 4294967294 4294967294 4096 Feb  4  2011 usr
drwxr-xr-x  3 4294967294 4294967294 4096 May 22  2007 var

on the server all of these are owned by root:root.

I need some suggestions. Thank you.


Re: Creating GPT BIOS partition with FAI 4.0.6

2013-03-19 Diskussionsfäden Bob Apodaca

On 03/19/2013 11:16 AM, andrew bezella wrote:

unless this has changed in fai4, you would want to use
disklabel:gpt-bios instead of gpt.  the necessary bios_grub
partition should then be created automatically.


That's what I need to know. Thank you.