Re: initramfs on experimental fai-cd

2009-10-28 Diskussionsfäden James S. White
Putting this in config/scripts/FAIBASE/50-mkinitrd is all I needed.
Apparently I over-complicate things


#! /bin/bash
error=0 ; trap "error=$((error|1))" ERR

# create an initrd that will actually boot
TARGETVERSION=$(/bin/ls $target/lib/modules)
mkinitramfs -r $target \
-o $target/boot/initrd.img-${TARGETVERSION} ${TARGETVERSION}

exit $error



initramfs on experimental fai-cd

2009-10-27 Diskussionsfäden James S. White
I am trying to make a custom fai-cd using the experimental builds.

Basically I booted a virtual machine from the gnomehost template using the ISO:
  http://www.informatik.uni-koeln.de/fai/fai-cd/fai-cd-3.2.16.iso

and then updated it to 3.2.23~beta25+experimental1, and then ran fai-setup,
  fai-mirror, and fai-cd, rsynced the 3.2.16 configs into /srv/fai/config
  first. (specifics: http://gist.github.com/219822 )

so basically I have 4 environments I'm using to bootstrap the target system
(well, 3 since my workstation is just a host)

workstation
  |
  +-> gnomehost
   |
   +-> fai-cd (installer/livecd)
|
+-> target-system(chrooted during install)


If I partition with LVM, (the simple-lvm example from the fai wiki) and let
the installer run update-initramfs from the chrooted-install, it results in an
initrd that will time out waiting for the Root FS (even if I generate it
from another tty after the install, and first add dm-mod to
/target/etc/initramfs/modules )

If I try to create one from the installer (livecd) environment, I get:
"update-initramfs is disabled since running in a livecd"

If I create an initrd in the gnomehost environment using:
  TARGETVERSION=$(ls /srv/fai/nfsroot/live/filesystem.dir/lib/modules)
  chroot /srv/fai/nfsroot/live/filesystem.dir\
/usr/sbin/mkinitramfs\
-o /srv/fai/nfsroot/live/filesystem.dir/boot/initrd.img-${TARGETVERSION} \
${TARGETVERSION}

And cp it from /boot /target/boot, at install time (overwriting the one the
installer created) the system boots fine.

un-packing the initrds shows some signifigant differences:
   (specifics: http://gist.github.com/219803 )

So my question is:

"Is there a trick to getting the chrooted target envronment to create a
workable initrd that I am missing, or am I going to have to create the initrds
out-of-band and copy them to /target with a script every time?"




adding modules to the fai-cd initrd

2009-10-26 Diskussionsfäden James S. White
Is there a file somewhere that I can tell fai-cd to add dm_mod, dm_crypt, or
any other kernel module to the fai-cd initrd?



Re: LVM on crypt

2009-10-26 Diskussionsfäden James S. White
Ah, ok. I was using 3.2.20.1, I will try the experimental branches.


> I think it should work ("should", because the crypto stuff is still somewhat
> untested) if you change the sda2 definition to
>
> primary  -:encrypt  4096-   --
>
>
> This is only true, however, for the experimental builds; please see
> http://faiwiki.debian.net/index.php/Main_Page#getting_FAI for more 
> information.
> The crypto-patch will probably still be kept in there for another release or 
> so
> to receive more testing. As such, any kind of feedback is most welcome!
>
> Best,
> Michael
>
>



LVM on crypt

2009-10-23 Diskussionsfäden James S. White
Where would the :encrypt go in this recipe if I wanted to encrypt the partition
before laying down a volume group?

# Simple LVM example
disk_config sda  bootable:1
primary /boot 500 ext3 rw
primary -   4096-   -   -

disk_config lvm
vg my_pvsda2
my_pv-_swap swap2048swapsw
my_pv-_root /   2048ext3 rw



Re: could not read device /dev/lvm

2009-10-23 Diskussionsfäden James S. White
I am an idiot. I forgot to define USE_SETUP_STORAGE=1 in the class/MYBASE.var
file. My apologies...

On Fri, 23 Oct 2009, James S. White wrote:

> I even get the "could not read device /dev/lvm" error when I use the
> cut-n-paste example from the wiki...
>
> 
> # Simple LVM example
> disk_config sda  bootable:1
> primary /boot 500 ext3 rw
> primary -   4096-   -   -
>
> disk_config lvm
> vg my_pvsda2
> my_pv-_swap swap2048swapsw
> my_pv-_root /   2048ext3 rw
>
>
>
> On Fri, 23 Oct 2009, James S. White wrote:
>
> > I'm trying to use 3.2.20.1 on an fai-cd on debian-lenny and I get an:
> >
> > "ERROR: could not read device /dev/lvm"
> >
> > when I use:
> >
> > 
> > disk_config sda bootable:1
> > primary  /boot 250ext3   rw,errors=remount-ro
> > primary  - 1024- -  -
> >
> > disk_config lvm
> > vg vg0 -:encrypt sda2   -  -
> > vg0-swap   swap  2048   swap   sw
> > vg0-root   / 768ext3   rw,errors=remount-ro
> > vg0-home   /home 256ext3   rw
> > vg0-tmp/tmp  1024   ext3   rw
> > vg0-usr/usr  4096   ext3   rw
> > vg0-var/var  1024   ext3   rw
> > vg0-opt/opt  1024-  ext3   rw
> > 
> >
> > I'm sure I'm just not seeing something, or my whole partitioning scheme is 
> > hosed...
> > Can anyone see what I'm doing wrong?
> >
> >
>



Re: could not read device /dev/lvm

2009-10-23 Diskussionsfäden James S. White
I even get the "could not read device /dev/lvm" error when I use the
cut-n-paste example from the wiki...


# Simple LVM example
disk_config sda  bootable:1
primary /boot 500 ext3 rw
primary -   4096-   -   -

disk_config lvm
vg my_pvsda2
my_pv-_swap swap2048swapsw
my_pv-_root /   2048ext3 rw



On Fri, 23 Oct 2009, James S. White wrote:

> I'm trying to use 3.2.20.1 on an fai-cd on debian-lenny and I get an:
>
> "ERROR: could not read device /dev/lvm"
>
> when I use:
>
> 
> disk_config sda bootable:1
> primary  /boot 250ext3   rw,errors=remount-ro
> primary  - 1024- -  -
>
> disk_config lvm
> vg vg0 -:encrypt sda2   -  -
> vg0-swap   swap  2048   swap   sw
> vg0-root   / 768ext3   rw,errors=remount-ro
> vg0-home   /home 256ext3   rw
> vg0-tmp/tmp  1024   ext3   rw
> vg0-usr/usr  4096   ext3   rw
> vg0-var/var  1024   ext3   rw
> vg0-opt/opt  1024-  ext3   rw
> 
>
> I'm sure I'm just not seeing something, or my whole partitioning scheme is 
> hosed...
> Can anyone see what I'm doing wrong?
>
>



could not read device /dev/lvm

2009-10-23 Diskussionsfäden James S. White
I'm trying to use 3.2.20.1 on an fai-cd on debian-lenny and I get an:

"ERROR: could not read device /dev/lvm"

when I use:


disk_config sda bootable:1
primary  /boot 250ext3   rw,errors=remount-ro
primary  - 1024- -  -

disk_config lvm
vg vg0 -:encrypt sda2   -  -
vg0-swap   swap  2048   swap   sw
vg0-root   / 768ext3   rw,errors=remount-ro
vg0-home   /home 256ext3   rw
vg0-tmp/tmp  1024   ext3   rw
vg0-usr/usr  4096   ext3   rw
vg0-var/var  1024   ext3   rw
vg0-opt/opt  1024-  ext3   rw


I'm sure I'm just not seeing something, or my whole partitioning scheme is 
hosed...
Can anyone see what I'm doing wrong?




Re: FAI not picking up hostname from DNS

2008-06-30 Diskussionsfäden James

Thanks Michael,

that worked,
i just thought it would've picked up hostname from DNS when getting the ip.
Redhat kickstart systems i setup didn't need the
option host-name "vm00"
so i didn't think this did.

thanks,
James

Michael Tautschnig wrote:
Hmm, Usually, you can boot very well even if the hostname is not set -  
you just need to tftp server address.
  

well the dns name has been set to that address in BIND
DHCP entry is like:

   group {
  # PXE-specific configuration directives
  next-server tftpserver;
  filename "linux-install/pxelinux.0";
  # You need an entry like this for every host
  # unless you're using dynamic addresses
   host vm00 {
   hardware ethernet 00:0C:xx:xx:xx:xx;
   fixed-address xxx.xxx.xxx.xxx;
   }
   }




Well, you don't set a name here, at least not one for the client to see; try
adding 


host-name "vm00";

after your fixed-address line, that might help.

Best,
Michael

  


Re: FAI not picking up hostname from DNS

2008-06-27 Diskussionsfäden James

okee dokee
thanks for the help

Henning Sprang wrote:

James wrote:
> [...]

pings fine and no funny logs


I'm out of ideas, then.

Only checking if the problem exist with a slightly older fai version 
might be interesting.
As I said, the last one I tested is 3.2.6 - and as long as my wifi 
router who doesn't know the name of some clients is out of the game, I 
have no problems...


Henning


Re: FAI not picking up hostname from DNS

2008-06-27 Diskussionsfäden James


Hmm, Usually, you can boot very well even if the hostname is not set - 
you just need to tftp server address.

well the dns name has been set to that address in BIND
DHCP entry is like:

   group {
  # PXE-specific configuration directives
  next-server tftpserver;
  filename "linux-install/pxelinux.0";

  # You need an entry like this for every host

  # unless you're using dynamic addresses
   host vm00 {
   hardware ethernet 00:0C:xx:xx:xx:xx;
   fixed-address xxx.xxx.xxx.xxx;
   }
   }



also i do an ifconfig and everything to doublecheck before reboot and 
also all the system messages during install and everything seems to 
match up. 

pings fine and no funny logs


Re: FAI not picking up hostname from DNS

2008-06-27 Diskussionsfäden James


So, after the install, before faireboot, the hostname command get's 
you a "host"? Or is the hostname set corectly in the shell


Usually I only see this, if my DHCP doesn't know the system and gives 
it a random ip from the pool.

yeah,
the shell shows
[EMAIL PROTECTED]

i can type hostname and it'll result in "host"

On Etch?

Yes
I have no idea how i would set the hostname since i thought it would 
just know from DHCP + BIND


Are you absolutely sure the host's mac and everything is correct in 
dhcp? Does it really get the intended IP or some random one?
I wouldn't be able to pxeboot it if it weren't. also i do an ifconfig 
and everything to doublecheck before reboot and also all the system 
messages during install and everything seems to match up.


TIA
-James


Re: FAI not picking up hostname from DNS

2008-06-27 Diskussionsfäden James



What's the exact symptom?
System won't pickup classes defined cause it can't define system 
hostname. I noticed it just default sets it to "host" and then choose 
the classes defined in the *) entry in the 50-host-classes file


my hostname is vm00.blahblahblah.com
here's my class entry:

# use a list of classes for our demo machine
case $HOSTNAME in
   vm*)
   echo "FAIBASE DHCPC SETUPSTORAGE"   ;;
   *)
   echo "FAIBASE DHCPC SETUPSTORAGE"   ;;
esac

(ifclass I386 || ifclass AMD64) && echo GRUB
exit 0


the fai and distribution version yo are using?

FAI 3.2.8 June 15

cd or pxe install?

PXE
It sometimes happend, and there was some confusion in hostname 
handling in FAI in some versions - but if you system is iself set to 
some random hostname (things I had at time is "host", "debian" or 
completly empty) \
I have no idea how i would set the hostname since i thought it would 
just know from DHCP + BIND


Sure, you DNS and DHCP should be fully fcuntional, and you shuold be 
very sure that there is no secsond dhcp running...

There's only one DHCP server running

TIA
-James


FAI not picking up hostname from DNS

2008-06-27 Diskussionsfäden James

Hey guys,

i noticed that FAI isn't picking up my system's hostname from my DNS 
servers.
it SHOULD be picking them up right? or do i have to explicity set the 
host address related to hostname in 
/srv/fai/nfsroot/live/filesystem.dir/etc/hosts?


TIA
-James


Re: setup storage can't use % or "G"

2008-06-26 Diskussionsfäden James

that worked great! thanks a bundle

Michael Tautschnig wrote:

ok so i tried not including /dev and it does the same thing
it halts on trying to mount root on startup when i reboot

i've attached the log




Oh yes ... please add

$ROOTCMD update-initramfs -k all -u 


to one of your scripts, maybe LAST/50-misc or add some script named
SETUPSTORAGE; we'll add that in the in examples.

The problem is that lvm2 is installed _after_ your kernel packages, and thus the
necessary scripts and modules don't make their way into the initramfs.

HTH,
Michael

  


Re: setup storage can't use % or "G"

2008-06-26 Diskussionsfäden James

also this was in my error.log:

fai.log:  Couldn't find device with uuid 
'RzED90-LUoi-ZuI2-1GD5-STv5-urmq-boFk3z'.

fai.log:  Couldn't find all physical volumes for volume group VolGroup00.
fai.log:  Couldn't find device with uuid 
'RzED90-LUoi-ZuI2-1GD5-STv5-urmq-boFk3z'.

fai.log:  Couldn't find all physical volumes for volume group VolGroup00.
fai.log:  Volume group "VolGroup00" not found
fai.log:(STDOUT)   WARNING: Wiping physical volume label from /dev/sda2 
of volume group "vg0"

fai.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
fai.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
fai.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
fai.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
fai.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
fai.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
fai.log:W: GPG error: http://www.informatik.uni-koeln.de etch Release: 
The following signatures couldn't be verified because the public key is 
not available: NO_PUBKEY DC13E54EAB9B66FD

fai.log:WARNING: /etc/aliases exists, but does not have a root alias.
fai.log:SERVER not defined. Can't change network boot configuration
format.log:  Couldn't find device with uuid 
'RzED90-LUoi-ZuI2-1GD5-STv5-urmq-boFk3z'.

format.log:  Couldn't find all physical volumes for volume group VolGroup00.
format.log:  Couldn't find device with uuid 
'RzED90-LUoi-ZuI2-1GD5-STv5-urmq-boFk3z'.

format.log:  Couldn't find all physical volumes for volume group VolGroup00.
format.log:  Volume group "VolGroup00" not found
format.log:(STDOUT)   WARNING: Wiping physical volume label from 
/dev/sda2 of volume group "vg0"

format.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
format.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
format.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
format.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
format.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found
format.log:(STDERR) Warning - device mapper device, but no dmsetup(8) found

I don't have a VolGroup00 defined anywhere
it should be "vg0" as the volumegroup name

-James

Michael Tautschnig wrote:

[...]
  

changed the SETUPSTORAGE.var file to enable and debug
used a disk_config as follows:

disk_config sda  bootable:1
primary /boot   500 ext3defaults
primary -   6096-   -   -

disk_config lvm
vg vg0   sda2
vg0-swap swap10%swap   sw
vg0-dev  /dev10%xfsdefaults
vg0-var  /var10%xfsdefaults
vg0-home /home   10%-30%xfsdefaults
vg0-root /   10%xfsdefaults

it installs but i get some funny messages and then on reboot it just  
stops at either trying to start syslog or mount root

I'll try and get a log in a little bit and post here.




I don't think that defining /dev is a good idea. udev will do that for you. I
might be wrong, but please give it a try without that line.

Best,
Michael

  


Re: setup storage can't use % or "G"

2008-06-26 Diskussionsfäden James

ok,
so apparently i was accidently using the older version of FAI that's why 
it couldn't parse

i can choose to NOT USE SETUPSTORAGE and i can do an fai install fine

but now i'm having problems on the reboot with a setupstorage install
after FAI finishes the system hangs on boot

i need to get the log still but i noticed it's looking for volgroup-00 
or something and i haven't defined any vg by that name and also is 
trying to setup mdadm when i don't have a raid configuration setup.


i just went to my host-classes-50

added "SETUPSTORAGE" to that host class

changed the SETUPSTORAGE.var file to enable and debug
used a disk_config as follows:

disk_config sda  bootable:1
primary /boot   500 ext3defaults
primary -   6096-   -   -

disk_config lvm
vg vg0   sda2
vg0-swap swap10%swap   sw
vg0-dev  /dev10%xfsdefaults
vg0-var  /var10%xfsdefaults
vg0-home /home   10%-30%xfsdefaults
vg0-root /   10%xfsdefaults

it installs but i get some funny messages and then on reboot it just 
stops at either trying to start syslog or mount root

I'll try and get a log in a little bit and post here.

TIA,
James



Thomas Lange wrote:

On Wed, 25 Jun 2008 13:24:23 -0700, James <[EMAIL PROTECTED]> said:



> Here's the log snippet:
> Using config file: /var/lib/fai/config/disk_config/SETUPSTORAGE
> SYNTAX ERROR in config file line 12, size: 500-3G
> logical  /usr  500-3Gext3  rw   
> tuneopts="-c0 -i0"

> Mapping disk name disk1 to sda
> setup_harddisks version 0.42fai
You are using the old setup_harddisks partitioning tool inseat of the
new setup-storage.

Please add the class SETUPSTORAGE to your host name or define the
variable USE_SETUP_STORAGE=1. Then the new tool is used.
  


Re: setup storage can't use % or "G"

2008-06-25 Diskussionsfäden James

Here's the log snippet:

Using config file: /var/lib/fai/config/disk_config/SETUPSTORAGE
SYNTAX ERROR in config file line 12, size: 500-3G
logical  /usr  500-3Gext3  rw   
tuneopts="-c0 -i0"

Mapping disk name disk1 to sda
setup_harddisks version 0.42fai
Probing disks:  /dev/sda /dev/sdb
Disks found: sda sdb

Using config file: /var/lib/fai/config/disk_config/SETUPSTORAGE
Mapping disk name disk1 to sda
setup_harddisks did not create /var/log/fai/current/disk_var.sh file.
bash: no job control in this shell


It will throw the same error if i change that to a % value as well

Michael Tautschnig wrote:

i just used the example file in FAI

/usr/share/doc/fai-doc/examples/simple/disk_config/SETUPSTORAGE

i didn't edit anything




I'm sorry, but I fail to reproduce this, the file parses properly. Could you
please provide the log files generated by setup-storage?

Thanks,
Michael

  


Re: setup storage can't use % or "G"

2008-06-25 Diskussionsfäden James

i just used the example file in FAI

/usr/share/doc/fai-doc/examples/simple/disk_config/SETUPSTORAGE

i didn't edit anything


Michael Tautschnig wrote:

I've upgraded to the latest FAI with SETUP_STORAGE

i tried using the default SETUP_STORAGE disk layout but it doesn't like  
the lines that define like "4G" for 4 Gigabytes or 10% for 10% of disk
FAI will throw an error and says there's a problem with disk_setup  
configuration on the lines that contain those type of disk descriptions.


So i have to hard define disks like 500-4000 instead of 500-4G
or 500-4000 instead of 500-10%




Hmm, this is definitely not intended and unexpected. Could you please send
- your original (non-working) disk_config file
- a log file or relevant parts of the log output

Thanks a lot,
Michael

  


setup storage can't use % or "G"

2008-06-25 Diskussionsfäden James

I've upgraded to the latest FAI with SETUP_STORAGE

i tried using the default SETUP_STORAGE disk layout but it doesn't like 
the lines that define like "4G" for 4 Gigabytes or 10% for 10% of disk
FAI will throw an error and says there's a problem with disk_setup 
configuration on the lines that contain those type of disk descriptions.


So i have to hard define disks like 500-4000 instead of 500-4G
or 500-4000 instead of 500-10%

TIA,
James


Re: FAI with LVM

2008-01-25 Diskussionsfäden James

Michael Tautschnig wrote:

Hi James,

[...]

Please update your SVN checkout to revision 4838, that should hopefully fix your
LVM problem. Still, I've no idea about the mdadm-thing, I'll try to debug this
some time time in February (sorry, quite busy ATM).

Best,
Michael

  

Michael,

I checked out the new setup-storage and it still has the same problem. 
The output of fai.log looks identical to before.
I can send you the new one but it'll look exactly the same as the last 
one i sent you.


I tried three different configurations with volumes inside of volume 
groups as follows


disk_config sda bootable:1
primary /boot 500 ext3 defaults
primary -   4900-   -

_*Not-Working: - Multiple Growing Volumes*_
disk_config lvm
vg lvmtest  sda2
lvmtest-swap swap400 swap   sw
lvmtest-home /home   1000-xfsdefaults
lvmtest-var  /var 1000-   xfsdefaults
lvmtest-vmware   /vmware 1000-xfsdefaults
lvmtest-root /  1000-xfsdefaults

_*Not-Working: - Single Growing Volume*_
disk_config lvm
vg lvmtest  sda2
lvmtest-swap swap400 swap   sw
lvmtest-home /home   1000xfsdefaults
lvmtest-var  /var 1000xfsdefaults
lvmtest-vmware   /vmware 1000xfsdefaults
lvmtest-root /  1000-xfsdefaults

_*Working: - Static Volumes*_
disk_config lvm
vg lvmtest  sda2
#vg lvmtest  hda2
lvmtest-swap swap400 swap   sw
lvmtest-home /home   1000xfsdefaults
lvmtest-var  /var 1000xfsdefaults
lvmtest-vmware   /vmware 1000xfsdefaults
lvmtest-root /  1000xfsdefaults

Regards
-James


Re: FAI with LVM

2008-01-22 Diskussionsfäden James

James wrote:

Michael Tautschnig wrote:

[...]
 

Concerning Volume Groups:

I'd suggest adding in your documentation that something like the 
following won't work because of "-" after the volume group sizes.
And saying that volume group sizes must be EXACT or you'll get a 
generic error from parted saying that /dev/sda has a bad label

Bad disk_config file:


[...]

Oh, this is not intended behavior, that's a bug. Could you re-run 
that with the

bad config and debug=1 and mail the output?

Thanks,
Michael

  

here's the output for the error attached in a .log file

-James

Oh i also noticed one thing.
Without mdadm installed in the client packages it won't mount 
/dev/mapper/volume-*

dunno if that's a bug or not.

Error =

  Check root=bootarg cat /proc/cmdline
  or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/mapper/lvmtest-root does not exist. dropping to shell!

But it seems that the lvm setup turns things into some type of raid array?
I'm not installing a raid setup by the way i'm using the same lvm setup 
from configs in the previous messages in the thread


Hope this helps some debugging

-James




Re: FAI with LVM

2008-01-22 Diskussionsfäden James

Michael Tautschnig wrote:

[...]
  

Concerning Volume Groups:

I'd suggest adding in your documentation that something like the following 
won't work because of "-" after the volume group sizes.
And saying that volume group sizes must be EXACT or you'll get a generic 
error from parted saying that /dev/sda has a bad label

Bad disk_config file:


[...]

Oh, this is not intended behavior, that's a bug. Could you re-run that with the
bad config and debug=1 and mail the output?

Thanks,
Michael

  

here's the output for the error attached in a .log file

-James
 -
   Fully Automatic Installation  -  FAI

   FAI 3.1.8, 13 Mar 2007  Copyright (c) 1999-2006
   Thomas Lange  <[EMAIL PROTECTED]>
 -

Calling task_confdir
Kernel parameters: root=/dev/nfs  ip=LVM::dhcp 
nfsroot=127.0.0.1:/srv/fai/nfsroot
Reading /var/log/fai/current/boot.log
FAI_FLAGS: 
Configuration space mirror:/srv/fai/config mounted to /var/lib/fai/config
Can't connect to monserver on  port 4711. Monitoring disabled.
Calling task_setup
FAI_FLAGS: 
rdate: connect: Connection refused
Calling task_defclass
10-base-classes  OK.
* Skipping Module agpgart. It's already loaded.
* Skipping Module piix. It's already loaded.
* Skipping Module mptscsih. It's already loaded.
Video card detected: vmware
20-hwdetect.source   OK.
50-host-classes  OK.
List of all classes:  DEFAULT LINUX I386 FAIBASE LVMTEST GRUB LVM LAST
Calling task_defvar
++ FAI_ALLOW_UNSIGNED=1
++ CONSOLEFONT=
++ KEYMAP=us-latin1
++ UTC=yes
++ TIMEZONE=US/Pacific
++ ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
++ MODULESLIST='usbkbd ehci-hcd ohci-hcd uhci-hcd usbhid psmouse'
++ FAI_ACTION=install
++ VIDEODRIVER=vmware
Loading keymap(s) us-latin1 ...done.
Calling task_action
FAI_ACTION: install
Performing FAI installation. All data may be overwritten!

Calling task_install
Source hook: partition.LVMTEST.source
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.0173695 seconds, 59.0 kB/s
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.00437112 seconds, 234 kB/s
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.00379742 seconds, 270 kB/s

/dev/sda:
disklist was:
sdaInput was:
disk_config sda  bootable:1
primary /boot 500 ext3 defaults
primary -   6000-   -

disk_config lvm
vg lvmtest  sda2
lvmtest-swap swap1048 swap   sw
lvmtest-root /   1048-xfsdefaults
lvmtest-var  /var1048-xfsdefaults
(CMD) parted -s /dev/sda unit TiB print 1> /tmp/XEm3PdGPhj 2> /tmp/V4C8tD22uX
Parted could not read a disk label
(STDERR) Error: Unable to open /dev/sda - unrecognised disk label.
(CMD) parted -s /dev/sda mklabel msdos 1> /tmp/wtfJy83VNq 2> /tmp/EWvVHAd6Qc
(CMD) parted -s /dev/sda unit TiB print 1> /tmp/Cc62x68LdA 2> /tmp/2nGUc7T0Gi
(STDOUT) 
(STDOUT) Disk /dev/sda: 0.01TiB
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) 
(STDOUT) Number  Start  End  Size  Type  File system  Flags
(STDOUT) 
(CMD) parted -s /dev/sda unit B print free 1> /tmp/uCYPESeGaF 2> /tmp/EzuagKmBtA
(STDOUT) 
(STDOUT) Disk /dev/sda: 8589934591B
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) 
(STDOUT) Number  Start  End  Size Type  File system  Flags
(STDOUT) 0B 8589934591B  8589934592BFree Space
(STDOUT) 
(CMD) parted -s /dev/sda unit chs print free 1> /tmp/b5tCfdj5Qn 2> 
/tmp/l2gKwH7FaP
(STDOUT) 
(STDOUT) Disk /dev/sda: 1044,85,0
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) BIOS cylinder,head,sector geometry: 1044,255,63.  Each cylinder is 
8225kB.
(STDOUT) Partition Table: msdos
(STDOUT) 
(STDOUT) Number  Start  EndType  File system  Flags
(STDOUT) 0,0,0  1044,85,0Free Space
(STDOUT) 
Finding all volume groups
  No volume groups found
(CMD) mdadm --detail --scan --verbose -c partitions 1> /tmp/SnWMXz2RVv 2> 
/tmp/VbfD0Hsef7
INTERNAL ERROR in setup-storage:
end < start
Please report this error to the Debian Bug Tracking System.
Current disk layout
$VAR1 = {
  '/dev/sda' => {
  'bios_heads' => '255',
  'disklabel' => 'msdos',
  'partitions' => {},
  'bios_cylinders' => '1044',
  'size' => '8589934591',
  'sector_size' => '512',
  'begin_byte' => 0,
  'end_byte' =&g

Re: FAI with LVM

2008-01-21 Diskussionsfäden James

James wrote:

Carsten Aulbert wrote:



James wrote:

Oh also on top of the error i pass the entire installation and get 
the following as well.
I boot into the new installation and it searches for ROOT filesystem 
but fails.


Error =

   Check root=bootarg cat /proc/cmdline
   or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/mapper/lvmtest-root does not exist. dropping to shell!

Blind guess: You are booting a kernel which is not LVM aware? I.e. 
you are using an initrd without LVM support.


HTH

Carsten
ok yeah i guess i installed the required pre-req packages in the wrong 
place of the nfsroot.

My bad.

Thanks much.
-James

Concerning Volume Groups:

I'd suggest adding in your documentation that something like the 
following won't work because of "-" after the volume group sizes.
And saying that volume group sizes must be EXACT or you'll get a generic 
error from parted saying that /dev/sda has a bad label

Bad disk_config file:
#
disk_config sda  bootable:1
primary /boot   500 ext3defaults
primary -   6096-   -   -

disk_config lvm
vg lvmtest   sda2
lvmtest-swap swap1048-swap   sw
lvmtest-root /   1048-xfsdefaults
lvmtest-dev  /dev1048-xfsdefaults
lvmtest-var  /var1048-xfsdefaults
lvmtest-home /home   1048-xfsdefaults

Good disk_config file:
#
disk_config sda  bootable:1
primary /boot   500 ext3defaults
primary -   6096-   -   -

disk_config lvm
vg lvmtest   sda2
lvmtest-swap swap1048swap   sw
lvmtest-root /   1048xfsdefaults
lvmtest-dev  /dev1048xfsdefaults
lvmtest-var  /var1048xfsdefaults
lvmtest-home /home   1048xfsdefaults


This is just something that gave me some trouble for an hour or two.
Thought it could save a few people some trouble.

-James


Re: FAI with LVM

2008-01-21 Diskussionsfäden James

Carsten Aulbert wrote:



James wrote:

Oh also on top of the error i pass the entire installation and get 
the following as well.
I boot into the new installation and it searches for ROOT filesystem 
but fails.


Error =

   Check root=bootarg cat /proc/cmdline
   or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/mapper/lvmtest-root does not exist. dropping to shell!

Blind guess: You are booting a kernel which is not LVM aware? I.e. you 
are using an initrd without LVM support.


HTH

Carsten
ok yeah i guess i installed the required pre-req packages in the wrong 
place of the nfsroot.

My bad.

Thanks much.
-James


Re: FAI with LVM

2008-01-21 Diskussionsfäden James



oh also here's my disk_config layout:

# Simple LVM example
disk_config sda  bootable:1
primary /boot 500 ext3 defaults
primary -   4096-   -   -

disk_config lvm
vg lvmtestsda2
lvmtest-swap swap1048swapsw
lvmtest-root /   1048xfsdefaults
lvmtest-var  /var2048xfsdefaults


Oh also on top of the error i pass the entire installation and get the 
following as well.
I boot into the new installation and it searches for ROOT filesystem but 
fails.


Error =

   Check root=bootarg cat /proc/cmdline
   or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/mapper/lvmtest-root does not exist. dropping to shell!


Re: FAI with LVM

2008-01-21 Diskussionsfäden James

James wrote:

Christoph Kluenter wrote:

On Monday 14 January 2008 21:58:31 James wrote:
 

Hi Will,

I'm not in any hurry but the config files would be nice anyway if it's
not inconvenient.
I'm still playing with the whole thing in general so it'd be nice to 
see

a working config.

The wiki-Page describes everything. And I have put a working config 
for LVM there.


Regards,
 Christoph


 

Thanks
-James





  

I'm having a problem when trying to setup LVM
i get and error saying this doesn't exist :  *disk*_*var*.*sh

i setup everything according to the instructions.

partition.LVMTEST.source =

#!/bin/sh
#clean drives, BAD BAD HAX wipe the drive before lvm is loaded.
dd if=/dev/zero of=/dev/sda2 bs=1k count=1
dd if=/dev/zero of=/dev/sda1 bs=1k count=1
dd if=/dev/zero of=/dev/sda bs=1k count=1
hdparm -z /dev/sda

# load the device mapper module for LVM support
modprobe dm_mod

#debug=1 /srv/fai/config/store/setup-storage
debug=1 /var/lib/fai/config/store/setup-storage -X

# skip the original parititioning
. $LOGDIR/disk_var.sh
skiptask partition



50-host-classes=

#! /bin/bash

# assign classes hosts

# use a list of classes for our demo machine
case $HOSTNAME in
   LVM)
   echo "FAIBASE LVMTEST" ;;
   *)
   echo "FAIBASE DHCPC" ;;
esac

(ifclass I386 || ifclass AMD64) && echo GRUB
exit 0


any ideas?

TIA
-james

*

oh also here's my disk_config layout:

# Simple LVM example
disk_config sda  bootable:1
primary /boot 500 ext3 defaults
primary -   4096-   -   -

disk_config lvm
vg lvmtestsda2
lvmtest-swap swap1048swapsw
lvmtest-root /   1048xfsdefaults
lvmtest-var  /var2048xfsdefaults



Re: FAI with LVM

2008-01-21 Diskussionsfäden James

Christoph Kluenter wrote:

On Monday 14 January 2008 21:58:31 James wrote:
  

Hi Will,

I'm not in any hurry but the config files would be nice anyway if it's
not inconvenient.
I'm still playing with the whole thing in general so it'd be nice to see
a working config.

The wiki-Page describes everything. And I have put a working config for LVM 
there.


Regards,
 Christoph


  

Thanks
-James





  

I'm having a problem when trying to setup LVM
i get and error saying this doesn't exist :  *disk*_*var*.*sh

i setup everything according to the instructions.

partition.LVMTEST.source =

#!/bin/sh
#clean drives, BAD BAD HAX wipe the drive before lvm is loaded.
dd if=/dev/zero of=/dev/sda2 bs=1k count=1
dd if=/dev/zero of=/dev/sda1 bs=1k count=1
dd if=/dev/zero of=/dev/sda bs=1k count=1
hdparm -z /dev/sda

# load the device mapper module for LVM support
modprobe dm_mod

#debug=1 /srv/fai/config/store/setup-storage
debug=1 /var/lib/fai/config/store/setup-storage -X

# skip the original parititioning
. $LOGDIR/disk_var.sh
skiptask partition



50-host-classes=

#! /bin/bash

# assign classes hosts

# use a list of classes for our demo machine
case $HOSTNAME in
   LVM)
   echo "FAIBASE LVMTEST" ;;
   *)
   echo "FAIBASE DHCPC" ;;
esac

(ifclass I386 || ifclass AMD64) && echo GRUB
exit 0


any ideas?

TIA
-james

*


Re: FAI Classes

2008-01-18 Diskussionsfäden James

Toomas Tamm wrote:

On Thu, 2008-01-17 at 13:49 -0800, James wrote:
  

Christian Meissner wrote:


On Thu, Jan 17, 2008 at 11:14:58AM -0800, James wrote:
  
  
Is there anyway for me to set the hostname manually on the bootfloppy so it 
knows to pull the certain class definitions without a dns record?



afaik you can append HOSTNAME=foobar to grub command line

br

Chris
  
  
well that set the hostname alright but it didn't pull the class 
definition... i'm a bit confused now.


i set grub to append the ip=:dhcp nfsroot=127.x.x.x:/srv/fai/nfsroot 
HOSTNAME=TEST



Some time ago I had success with the following:
(this goes into three lines in menu.lst on the boot floppy):

title FAI-HOST01 2.6.8-fai
kernel (fd0)/vmlinuz-2.6.8-fai root=/dev/nfs ip=host01::dhcp 
nfsroot=192.168.104.228:/usr/lib/fai/nfsroot  
FAI_FLAGS=verbose,sshd,createvt,syslog
savedefault

The hostname would be "host01" in this case. DHCP assigned an IP
address, but no other support from the university data center was
needed.

I had a bootfloppy with similar three-line sets for all the hosts in the
computer classroom, and chose an appropriate hostname at boot time. This
worked.

More than a year has passed, and new versions of almost everything came
out, so things may have changed. Give it a try.
  
Thanks for the tip with the manual ip= directive. That definately 
worked. I might just edit the make-fai-bootfloppy script to make it 
easier to edit


-James


Re: FAI Classes

2008-01-17 Diskussionsfäden James

Christian Meissner wrote:

On Thu, Jan 17, 2008 at 11:14:58AM -0800, James wrote:
  
Is there anyway for me to set the hostname manually on the bootfloppy so it 
knows to pull the certain class definitions without a dns record?


afaik you can append HOSTNAME=foobar to grub command line

br

Chris
  
well that set the hostname alright but it didn't pull the class 
definition... i'm a bit confused now.


i set grub to append the ip=:dhcp nfsroot=127.x.x.x:/srv/fai/nfsroot 
HOSTNAME=TEST


and yeah i changed the line to look like

#! /bin/bash

# assign classes hosts
# use a list of classes for our demo machine
case $HOSTNAME in
   TEST)
   echo "TEST DHCPC" ;;
#*)
#   echo "FAIBASE DHCPC" ;;
esac

(ifclass I386 || ifclass AMD64) && echo GRUB
exit 0



it still tries to pull whatever *) is set to



Re: FAI Classes

2008-01-17 Diskussionsfäden James

Henning Sprang wrote:

James wrote:
  

do i just do a
#> make-fai-bootfloppy -s TEST ip=::dhcp
nfsroot=127.x.x.x:/srv/fai/nfsroot

cause that's my understanding now. if not please let me know



Hmm, I didn't use the bootfloppy in that way(i just use a proper dns and
dhcp setup) - at least, the test must be lowercase then.

The assignment of your classes is done if you install a host which is
correctly configured (ip/dns-wise) to have the hostname "test" - that's
the name you have in your case statement...

Henning
  
ok so the name test would have to be in my dns record with an ip address 
already set to it right?
So is there a way to set a hostname to a host without having refer to 
dns just for the sake of pulling the class definitions?


For me setting up dns records ahead of time would be kind of cumbersome.
I want to be able to setup a generic host with defined packages and then 
assign it a dns record later.
but i already have a network dhcp setup which i also would rather not 
have to mess with since it would take longer for me to deploy a computer 
if i have to go gather mac addresses and insert records.


Is there anyway for me to set the hostname manually on the bootfloppy so 
it knows to pull the certain class definitions without a dns record?


Thanks Much
-James


Re: FAI Classes

2008-01-17 Diskussionsfäden James

Henning Sprang wrote:

Look at the simple examples in /usr/share/fai-doc/examples/simple -
you're welcome to ask further questions, but please look at the guide
again, and tell us more which sections are too hard to understand... and
if it is a language problem, or just understanding.

Henning
  

Ok i think i'm starting to understand all this now.

Last thing i need to figure out is this.

So now i have the entire class called TEST

i've created a line in config/class/50-host-classes
like :

case $HOSTNAME in
   test)
   echo "FAIBASE DHCPC TEST" ;;


i created a disk profile at config/disk_config/TEST

disk_config disk1
primary  / 150-300  rw,errors=remount-ro ; -c -j ext3
logical  swap  40-500  rw
logical  /var  90-1000 rw   ; -m 5  -j xfs
logical  /tmp  50-1000 rw   ; -m 0 -j xfs
logical  /usr  200-4000rw   ; -j xfs
logical  /home 50- rw,nosuid; -m 1 -j xfs
# logical /homepreserve9   rw,nosuid; -m 1 -j ext3


i created a config/package_config/TEST

PACKAGES aptitude
postfix



that's about it because i just want to test it as simply as possible 
right now.


So how do i get the bootfloppy to call the "TEST" class?

do i just do a
#> make-fai-bootfloppy -s TEST ip=::dhcp 
nfsroot=127.x.x.x:/srv/fai/nfsroot


cause that's my understanding now. if not please let me know


On a side not it's not the actual english in the documentation that's 
hard to understand.
It's just how to narrow down some of the information and filter out what 
i didn't need.
In a more complex setup i imagine i'll be using most to all of the info 
but right now things are pretty simple i just need a few custom packages 
here and there and how to instruct a boot floppy/cd to grab that class.
Maybe a guide for the impatient on creating a class by example and cut 
out the big details.

i personally would find that useful. :D

Thanks
-James



FAI Classes

2008-01-16 Diskussionsfäden James
Hi Everyone i've just started using FAI recently and am having a pretty 
hard time understanding the classes to create different computer profiles


My Setup:
First off I'm NOT using PXE BOOT with DNS and DHCP.
I'm creating boot cds and just using those to do installations
i'm having to set the ip=:dhcp and nfsroot= manually when creating 
the boot disks
I do however already have an existing DHCP server and client machines 
should be able to grab on to them like that.


So i want to be able to create a different classes for different 
machines say like


1. PROFILE1 - BAREBONES
2. PROFILE2 - LAMP
3. PROFILE3 - GUI

I've tried reading the wiki and documentation but it sounds like german 
to me (i'm not german).


i don't understand where in the /srv/fai/config folders that i need to 
define these classes

i'm assuming it would be under /srv/fai/config/class
Also which scripts attach to those classes.

so if i create a file /srv/fai/config/class/PROFILE1
how do scripts or hooks under /srv/fai/config/scripts/ or 
/srv/fai/config/hooks relate back to that class?
Also how do i define which /srv/fai/config/disk_config file is gonna be 
read?


Also for instance when booting on floppy i don't exactly have a choice 
of which class to boot.


I don't comprehend text as well as examples.
So the more examples of actual config scenarios the better for me.
Appreciate the help

Thanks
-James



Re: FAI with LVM

2008-01-14 Diskussionsfäden James

Hi Will,

I'm not in any hurry but the config files would be nice anyway if it's 
not inconvenient.
I'm still playing with the whole thing in general so it'd be nice to see 
a working config.


Thanks
-James


FAI with LVM

2008-01-14 Diskussionsfäden James
Hi guys i am a newbie with FAI and was wondering if there's an easy 
setup example for disks to use LVM


Is it built in to the disk_config setups or do i have to use a custom 
hook for it?

And if i have to use a custom hook can someone give me any examples?

Appreciate it.
Thanks,
James