Re: live-initramfs
On Thu, Jan 08, 2009 at 07:43:23PM +0100, Thomas Lange wrote: On Thu, 8 Jan 2009 19:36:35 +0100, Henning Fehrmann henning.fehrm...@aei.mpg.de said: I guess, a proper initrd has to come already with the kernel. not really, because dpkg-reconfigure linux-image... should be called, which creates the initrd. Ok, I am stepping forward. In fact, the aufs module has been missing. Sorry, my fault. Actually, compiling the aufs modules is not really straight forward since one needs the right combination of aufs sources and kernel sources. I took the debian patched 2.6.26 kernel sources and the 0+20080719-4 aufs source. make-fai-nfsroot is finishing without error messages. There have been some warning about the md issues which are not important for us right now. The client boots, reads the initrd and ends up in the a-shell with the following message: Gave up waiting for root device. Common problems: - Boot args (cat /proc/cmdline) - Check rootdelay= (did the system wait long enough?) - Check root= (did the system wait for the right device?) - Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/nfs does not exist. Dropping to a shell! The nic is up and running: (initramfs) ifconfig eth1 eth1 Link encap:Ethernet HWaddr inet addr:10.10.16.79 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:9000 Metric:1 RX packets:6152 errors:0 dropped:0 overruns:0 frame:0 TX packets:13 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:456240 (445.5 KiB) TX bytes:1746 (1.7 KiB) Memory:ee20-ee22 (initramfs) ping -c 1 10.10.16.78 PING 10.10.16.78 (10.10.16.78): 56 data bytes 64 bytes from 10.10.16.78: seq=0 ttl=64 time=0.099 ms --- 10.10.16.78 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max = 0.099/0.099/0.099 ms (initramfs) mount -t nfs 10.10.16.78:/srv/fai/nfsroot/live/filesystem.dir /root mount: mounting 10.10.16.78:/srv/fai/nfsroot/live/filesystem.dir on /root failed: Invalid argument NFS support is compiled into the kernel. I would guess the problem is the missing /deb/nfs in the intrd. If I omit the initrd the nfs-export is being mounted in the installation environment, but unfortunately, readonly. Any hints? Thank you, Henning Fehrmann
Re: live-initramfs
On Wed, 14 Jan 2009 11:39:46 +0100, Henning Fehrmann henning.fehrm...@aei.mpg.de said: Actually, compiling the aufs modules is not really straight forward since one needs the right combination of aufs sources and kernel sources. I took the debian patched 2.6.26 kernel sources and the 0+20080719-4 aufs source. If you are using the plain Debian kernel, you can use the Debian package aufs-modules-2.6-486 for e.g. and do not need to compile the aufs modules. Gave up waiting for root device. Common problems: You can add the parameter debug to see more messages. I would guess the problem is the missing /deb/nfs in the intrd. In my initrd, there's no /dev at all. I think udev will create this. I can give you access to my nfsroot (a tarball), to see if the boot process is working. For fast help, please join the IRC channel #fai on irc.debian.org -- regards Thomas
Re: live-initramfs
On Wed, 14 Jan 2009 18:48:02 +0100, Henning Fehrmann henning.fehrm...@aei.mpg.de said: like v3, tcp, rsize=.. or wsize=.. prevents the mount. These options are not needed any more. More crucial, we need to mount the nfsroot via eth1. I think it's possible to give a parameter to the live scripts inside initrd to specify the network device. Let me see: # man 7 live-initramfs (inside the nfsroot) . . ip=[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]:[DEVICE]:[AUTOCONF] [,[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]:[DEVICE]:[AUTOCONF]]* Let you specify the name(s) and the options of the interface(s) that should be configured at boot time. Do not specify this if you want to use dhcp (default). It will be changed in a future release to mimick official kernel boot param specification (e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:eth1:dhcp). . . This was a thread on the debian-live mailing list before it was implemented. See for e.g. http://www.mail-archive.com/debian-live-de...@lists.alioth.debian.org/msg01288.html http://www.mail-archive.com/debian-live-de...@lists.alioth.debian.org/msg01296.html -- regards Thomas
fai.diff discussion - fai package for Ubuntu 8.10 (both server and client)
diff -urN original/conf/make-fai-nfsroot.conf modificado/conf/make-fai-nfsroot.conf --- original/conf/make-fai-nfsroot.conf 2008-12-30 22:10:10.0 +0100 +++ modificado/conf/make-fai-nfsroot.conf 2009-01-08 15:53:47.0 +0100 @@ -12,7 +12,8 @@ # on the clients. This line(s) will be added to $nfsroot/etc/hosts. #NFSROOT_ETC_HOSTS=192.168.1.250 yourinstallserver -FAI_DEBOOTSTRAP=hardy http://archive.ubuntu.com/ubuntu; +#FAI_DEBOOTSTRAP=hardy http://archive.ubuntu.com/ubuntu; +FAI_DEBOOTSTRAP=intrepid file:/home/ubuntu_mirrors/us.archive.ubuntu.com/ubuntu I need to fix this. I meant, of course: FAI_DEBOOTSTRAP=intrepid http://archive.ubuntu.com/ubuntu; # the encrypted (with md5 or crypt) root password on all install clients during # installation process; used when log in via ssh; default pw is: fai @@ -24,9 +25,9 @@ # directory of hooks to be sourced at the end of make-fai-nfsroot, # i.e they have to be shell scripts. -#NFSROOT_HOOKS=/etc/fai/nfsroot-hooks/ +NFSROOT_HOOKS=/etc/fai/nfsroot-hooks/ In my opinion if a nfsroot-hooks file was created is meant to be sourced. I have not checked if it works without the file. I remember that some read-write errors happened because of unionfs filesystem this is why I included this by default. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # following lines should be read only for most of you -FAI_DEBOOTSTRAP_OPTS=--exclude=dhcp-client,info +FAI_DEBOOTSTRAP_OPTS=--exclude=dhcp-client,info --include=language-pack-en-base,aptitude,fontconfig,defoma,anthy,belocs-locales-bin This avoids the perl warning errors and many others, taken from Achim. diff -urN original/conf/sources.list modificado/conf/sources.list --- original/conf/sources.list2008-12-30 22:10:10.0 +0100 +++ modificado/conf/sources.list 2008-12-30 22:38:32.0 +0100 @@ -1,12 +1,12 @@ -# These lines should work for installations of ubuntu hardy +# These lines should work for installations of ubuntu intrepid # please adapt the following entries if you are using another distribution # make sure that a recent version of live-initramfs is available # (e.g. feisty doesn't ship live-initramfs at all, therefore the ppa is needed!) # A more comprehensive example is at /usr/share/doc/fai-doc/examples/etc -deb http://archive.ubuntu.com/ubuntuhardy main restricted universe multiverse -deb http://security.ubuntu.com/ubuntu hardy-security main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntuintrepid main restricted universe multiverse +deb http://security.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse -deb http://ppa.launchpad.net/fai/ubuntu hardy main restricted universe multiverse +deb http://ppa.launchpad.net/fai/ubuntu intrepid main restricted universe multiverse diff -urN original/debian/changelog modificado/debian/changelog --- original/debian/changelog 2008-12-30 22:10:10.0 +0100 +++ modificado/debian/changelog 2009-01-06 23:05:04.0 +0100 @@ -1,3 +1,9 @@ +fai (3.2.4+svn4838-0ubuntu2) intrepid; urgency=low + + * Updated fai for serving Ubuntu intrepid How can I improve this (I am not very good at English)? + + -- Adrian Gibanel adrian.gibanel.lo...@gmail.com Tue, 06 Jan 2009 11:05:34 +0200 + fai (3.2.4+svn4837-0ubuntu2) hardy; urgency=low * upload to hardy diff -urN original/debian/.directory modificado/debian/.directory --- original/debian/.directory1970-01-01 01:00:00.0 +0100 +++ modificado/debian/.directory 2008-12-30 22:54:58.0 +0100 @@ -0,0 +1,3 @@ +[Dolphin] +Timestamp=2008,12,30,22,54,58 +ViewMode=1 I thought I had removed this. I am sorry. diff -urN original/debian/fai-server.dirs modificado/debian/fai-server.dirs --- original/debian/fai-server.dirs 2008-02-14 10:49:35.0 +0100 +++ modificado/debian/fai-server.dirs 2008-12-30 23:17:01.0 +0100 @@ -4,3 +4,4 @@ usr/bin usr/sbin usr/share/fai/pixmaps +etc/fai/nfsroot-hooks I suppose that it was needed to edit this file although I am not expert on Debian packages. diff -urN original/debian/fai-server.install modificado/debian/fai-server.install --- original/debian/fai-server.install2008-02-14 10:49:35.0 +0100 +++ modificado/debian/fai-server.install 2008-12-30 23:02:28.0 +0100 @@ -12,3 +12,4 @@ etc/fai/NFSROOT etc/fai/apt/sources.list etc/fai/make-fai-nfsroot.conf +etc/fai/nfsroot-hooks/10-unionfs-workaround Unionfs patch. Commented above. diff -urN original/examples/simple/hooks/faiend.FAIBASE.source modificado/examples/simple/hooks/faiend.FAIBASE.source --- original/examples/simple/hooks/faiend.FAIBASE.source 1970-01-01 01:00:00.0 +0100 +++ modificado/examples/simple/hooks/faiend.FAIBASE.source2009-01-06 20:06:41.0 +0100 @@ -0,0 +1,20 @@ +#! /bin/bash + +# Create /var/lock and /var/run in / folder. +#
initramfs-tools discussion - fai package for Ubuntu 8.10 (both server and client)
diff -urN original/debian/changelog modificado/debian/changelog --- original/debian/changelog 2008-10-01 17:02:39.0 +0200 +++ modificado/debian/changelog 2009-01-05 17:56:48.0 +0100 @@ -1,3 +1,9 @@ +initramfs-tools (0.92bubuntu17) intrepid; urgency=low + + * Adapt initramfs-tools so that Fully Automatic Installation serves an Ubuntu 8.10 ok. Any improvement for my English? + + -- Adrian Gibanel adrian.gibanel.lo...@gmail.com Wed, 03 Jan 2009 01:50:37 +0100 + initramfs-tools (0.92bubuntu15) intrepid; urgency=low [ Dan Munckton ] diff -urN original/init modificado/init --- original/init 2008-08-14 00:10:09.0 +0200 +++ modificado/init 2008-12-30 19:16:51.0 +0100 @@ -197,8 +197,8 @@ [ $quiet != y ] log_end_msg # Move virtual filesystems over to the real filesystem -mount -n -o move /sys ${rootmnt}/sys -mount -n -o move /proc ${rootmnt}/proc +mount -n --move /sys ${rootmnt}/sys || mount -n -o move /sys ${rootmnt}/sys +mount -n --move /proc ${rootmnt}/proc || mount -n -o move /proc ${rootmnt}/proc This is the eternal problem about -o option (old mount versions) and --option (new mount versions). As I have already said the elegant solution might be to modify ubuntu's busybox's mount command which I do not know how. # Check init bootarg if [ -n ${init} ] [ ! -x ${rootmnt}${init} ]; then diff -urN original/scripts/local modificado/scripts/local --- original/scripts/local2008-07-29 08:27:53.0 +0200 +++ modificado/scripts/local 2008-12-30 19:43:57.0 +0100 @@ -152,7 +152,7 @@ fi mkdir -p /host - mount -o move ${rootmnt} /host + mount --move ${rootmnt} /host || mount -o move ${rootmnt} /host Idem. while [ ! -e /host/${LOOP#/} ]; do panic ALERT! /host/${LOOP#/} does not exist. Dropping to a shell! @@ -183,7 +183,7 @@ mount ${roflag} -o loop -t ${FSTYPE} ${LOOPFLAGS} /host/${LOOP#/} ${rootmnt} if [ -d ${rootmnt}/host ]; then - mount -o move /host ${rootmnt}/host + mount --move /host ${rootmnt}/host || mount -o move /host ${rootmnt}/host Idem. fi fi -- Firma Automática 1: - Adrian Gibanel Lopez Estudiante de Ingenieria de Informatica de Sistemas en la Universitat de LLeida. Firma Automática 2: - Participante en el III Concurso Universitario de Software Libre. Proyecto: Desdeslin. http://desdeslin.wordpress.com
live-initramfs.diff discussion - fai package for Ubuntu 8.10 (both server and client)
diff -urN original/hooks/live modificado/hooks/live --- original/hooks/live 2008-06-01 09:30:02.0 +0200 +++ modificado/hooks/live 2008-12-20 20:34:38.0 +0100 @@ -135,3 +135,6 @@ then copy_exec /usr/bin/wget /bin fi + +# Program: wc +copy_exec /usr/bin/wc /bin Somewhere in the FAI installation boot there were complaints about wc not being found. I think that I did not only add these lines but I added the dinamic version of wc command to the live-initramfs package (or was it the initramfs-tools package? I do not remember). diff -urN original/scripts/live modificado/scripts/live --- original/scripts/live 2008-06-01 09:30:02.0 +0200 +++ modificado/scripts/live 2008-12-30 19:40:43.0 +0100 @@ -323,9 +323,9 @@ url=*) location=${ARGUMENT#url=} - mount -n -o bind /sys /root/sys - mount -n -o bind /proc /root/proc - mount -n -o bind /dev /root/dev + mount -n --bind /sys /root/sys || mount -n -o bind /sys /root/sys + mount -n --bind /proc /root/proc || mount -n -o bind /proc /root/proc + mount -n --bind /dev /root/dev || mount -n -o bind /dev /root/dev --bind and --remount already explained in other emails. mkdir -p /root/var/run/network chroot /root dhclient eth0 @@ -615,7 +615,7 @@ cd ${copyto} tar zxf ${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH}) rm -f ${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH}) - mount -r -o move ${copyto} ${rootmnt} + mount -r --move ${copyto} ${rootmnt} || mount -r -o move ${copyto} ${rootmnt} Idem. cd ${OLDPWD} else if [ -n ${MODULETORAMFILE} ] @@ -627,7 +627,7 @@ livefs_root umount ${copyfrom} - mount -r -o move ${copyto} ${copyfrom} + mount -r --move ${copyto} ${copyfrom} || mount -r -o move ${copyto} ${copyfrom} fi rmdir ${copyto} @@ -1066,7 +1066,7 @@ fi exposedrootfs=${rofslist%% } - mount --bind ${exposedrootfs} ${rootmnt} || \ + mount --bind ${exposedrootfs} ${rootmnt} || mount -o bind ${exposedrootfs} ${rootmnt} || \ Idem. panic bind mount of ${exposedrootfs} failed cow_dirs='/var/tmp /var/lock /var/run /var/log /var/spool @@ -1084,6 +1084,11 @@ mount -t ${UNIONTYPE} -o noatime,dirs=/cow=rw:${rofsstring} \ ${UNIONTYPE} ${rootmnt} || panic mount ${UNIONTYPE} on \ ${rootmnt} failed with option noatime,dirs=/cow=rw:${rofsstring} + /root/sbin/ldconfig.real + chmod 600 /root/etc/fstab + chmod 600 /root/etc/live.conf + chmod 600 /root/etc/environment + chmod 600 /root/etc/network/interfaces The ldconfig.real call is because at this point the commands no longer were looking at its libraries as it was set up in ld.so.conf. I suppose that there is a problem of mount (I do not know if it is actually a bug or not). The Chmod 600 of these files is because some read-only errors happened at boot. It is kind of a unionfs-hack. Should I rewrite these chmods in a more elegant way? Are there any other files that might needed this chmoding also? fi # tmpfs file systems @@ -1122,7 +1127,7 @@ ;; *) - mount -o move ${d} ${rootmnt}/live/${d##*/} + mount --move ${d} ${rootmnt}/live/${d##*/} || mount -o move ${d} ${rootmnt}/live/${d##*/} Already explained. ;; esac done @@ -1130,7 +1135,7 @@ # shows cow fs on /cow for use by live-snapshot mkdir -p ${rootmnt}/live/cow - mount -o move /cow ${rootmnt}/live/cow + mount --move /cow ${rootmnt}/live/cow || mount -o move /cow ${rootmnt}/live/cow Idem. } check_dev () @@ -1152,7 +1157,7 @@ if [ -d ${devname} ] then - mount -o bind ${devname} $mountpoint || continue + mount -o bind ${devname} $mountpoint || mount --bind ${devname} $mountpoint || continue Idem. if is_live_path $mountpoint then -- Firma Automática 1: - Adrian Gibanel Lopez Estudiante de Ingenieria de Informatica de Sistemas en la Universitat de LLeida. Firma Automática 2: - Participante en el III Concurso Universitario de Software Libre. Proyecto: Desdeslin. http://desdeslin.wordpress.com