Package: yaird Version: 0.0.12-20 Followup-For: Bug #340759
Hi, I've just spent a few hours to find out why my Linux installation I copied from one partition to the other was still booting from the old one, and refused to boot from the new one, even though I'd edited grub and fstab. I've read the thread, and I suggest to add at least the attached patch etc_yaird_Templates.warn.diff in order to let people know where the problem might lie... The patch is untested but it looks simple enough to me. I attach a 2nd patch, untested as well, which might fix the issue, assuming no special module is required, obviously (hence I added a message). Having the first fix would have already helped me a lot, having the 2nd one working would be even greater! ;-) Thanks, Eric -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (990, 'testing'), (500, 'testing-proposed-updates'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.18-4-k7 (SMP w/1 CPU core) Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages yaird depends on: ii cpio 2.7-1 GNU cpio -- a program to manage ar ii dash 0.5.3-7 The Debian Almquist Shell ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries ii libhtml-template-perl 2.9-1 HTML::Template : A module for usin ii libparse-recdescent-perl 1.94.free-4 Generates recursive-descent parser ii perl 5.8.8-7 Larry Wall's Practical Extraction yaird recommends no packages. -- no debconf information
--- /etc/yaird/Templates.cfg 2007-03-31 16:50:50.000000000 +0200 +++ etc_yaird_Templates.cfg 2007-05-05 20:04:23.000000000 +0200 @@ -203,6 +203,11 @@ ! ip=*|nfsaddrs=*) ! ip="$ip $i" ! ;; + ! root=*) + ! root=${i#root=} + ! echo "WARNING: KERNEL 'root=$root' PARAMETER IGNORED. MIGHT BE OK BUT:" + ! echo " USE YAIRD TO FIX INITRD IF WRONG PARTITION IS BOOTED." + ! ;; ! nfsroot=*) ! nfsroot="$i" ! ;;
--- /etc/yaird/Templates.cfg 2007-03-31 16:50:50.000000000 +0200 +++ etc_yaird_Templates.cfg 2007-05-05 20:35:44.000000000 +0200 @@ -183,6 +183,7 @@ !# !ro=-r !ip= + !root= !nfsroot= !noresume= !resume= @@ -203,6 +204,9 @@ ! ip=*|nfsaddrs=*) ! ip="$ip $i" ! ;; + ! root=*) + ! root=${i#root=} + ! ;; ! nfsroot=*) ! nfsroot="$i" ! ;; @@ -221,6 +225,14 @@ !done !if [ "$INIT_DEBUG" != "" ] !then + ! echo ro=$ro + ! echo ip=$ip + ! echo root=$root + ! echo nfsroot=$nfsroot + ! echo noresume=$noresume + ! echo resume=$resume + ! echo resume2=$resume2 + ! echo init=$init ! set -x !fi END SCRIPT @@ -513,12 +525,25 @@ BEGIN SCRIPT "/init" BEGIN + !<TMPL_IF NAME=isRoot> + !if [ -n "$root" ] + !then + ! echo "NOTE: Using kernel 'root=$root' parameter at your own risks." + ! /bin/mount -n $ro -t auto "$root" \ + ! '<TMPL_VAR NAME=target>' + !else + ! /bin/mount -n $ro \ + ! -t <TMPL_VAR NAME=fsType> \ + ! <TMPL_VAR NAME=options> \ + ! '<TMPL_VAR NAME=device>' \ + ! '<TMPL_VAR NAME=target>' + !<TMPL_ELSE> !/bin/mount -n \ - ! <TMPL_IF NAME=isRoot>$ro</TMPL_IF> \ ! -t <TMPL_VAR NAME=fsType> \ ! <TMPL_VAR NAME=options> \ ! '<TMPL_VAR NAME=device>' \ ! '<TMPL_VAR NAME=target>' + !</TMPL_IF> END SCRIPT END TEMPLATE