[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#595218: upgrade-reports: [amd64][lenny->squeeze][20100902] almost successful



Package: upgrade-reports
Severity: important
Justification: renders system unbootable

Today I did a dist-upgrade from lenny to squeeze.
The short version is: it worked, until I ran upgrade-from-grub-legacy.
That left the system in an unbootable state, see the end of the report.

This bug should probably be cloned against 
package: grub-pc, version: 1.98+20100804-2
and closed for d-i, as far as I can tell, d-i its job ok.

Cheers
Vince

My procedure was this:

 ( I would have changed my procedure to match the upgrade guide,
   if I could find it... could we please have a link to the alioth version
   from http://www.debian.org/releases/squeeze/, with whatever caveats are
   necessary ? )


 # <modify sources.list>
 # apt-get update 

 # apt-get install apt
 Reading package lists... 0%
 ... Error!
 E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. Current value: 12500000. (man 5 apt.conf)

 # <set value to 22500000>
 # <remove volatile from sources.list>
 # apt-get update
 # apt-get install apt
 <this works>

 # apt-get upgrade
 <this works>
 # apt-get dist-upgrade
  <this mostly works.

   Somehow, grub-pc failed to install completely. See below.
   It did prompt me about using the 'chainload grub2' option, which I accepted.

   I found that #545292 is still there, after a year.
   It would really help to show what options grub-pc plans to append
   to the boot line, or just show the entire boot line (in readonly form).
   I entered some unneeded options (but removed them later, before rebooting).

   When libc6 is installed, perl starts spamming about locales:
   perl: warning: Setting locale failed.
   perl: warning: Please check that your locale settings:
     etc, etc.
   I guess this is a known issue.

   The upgrade then fails on udev, which is bug #571255.
   md is in a tough spot here, failing at the preinst is reasonable.
   I would like to make it easier for the user to figure out what their
   next action should be. The main thing missing is that one needs to
   boot into a kernel that has CONFIG_SYSFS_DEPRECATED off, before
   attempting to upgrade udev.

 # dpkg -l |grep grub
 ii  grub                                0.97-47lenny2                GRand Unified Bootloader (Legacy version)
 ii  grub-common                         1.96+20080724-16             GRand Unified Bootloader, version 2 (common
 #  dpkg -l grub-pc
  Desired=Unknown/Install/Remove/Purge/Hold
 | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
 |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
 ||/ Name           Version        Description
 +++-==============-==============-============================================
 un  grub-pc        <none>         (no description available)

 # dpkg -l |grep linux-image
 ii  linux-image-2.6-amd64               2.6.26+17+lenny1             Linux 2.6 image on AMD64
 ii  linux-image-2.6.26-2-amd64          2.6.26-24lenny1              Linux 2.6.26 image on AMD64
 iU  linux-image-2.6.32-5-amd64          2.6.32-20                    Linux 2.6.32 for 64-bit PCs

 # apt-get upgrade
 ...
 You might want to run `apt-get -f install' to correct these.
 The following packages have unmet dependencies:
   insserv: Breaks: sysv-rc (< 2.87dsf-3) but 2.86.ds1-61 is installed
 E: Unmet dependencies. Try using -f.

 # apt-get dist-upgrade
 ...
 You might want to run `apt-get -f install' to correct these.
 The following packages have unmet dependencies:
   insserv: Breaks: sysv-rc (< 2.87dsf-3) but 2.86.ds1-61 is installed
 E: Unmet dependencies. Try using -f.

 # apt-get install sysv-rc
 <installs sysv-rc ok. A bunch of other packages get set up as well>

 # apt-get install firmware-bnx2
 # <dpkg -l |grep -v ^ii> shows the installed packages are in ok state

 # apt-get dist-upgrade
 < udev exits again, but more packages get upgraded (eg python-minimal) >
 < the locale spam has gone away >

 # grep CONFIG_SYSFS_DEPRECATED /boot/config*
 /boot/config-2.6.26-2-amd64:CONFIG_SYSFS_DEPRECATED=y
 /boot/config-2.6.26-2-amd64:CONFIG_SYSFS_DEPRECATED_V2=y
 /boot/config-2.6.32-5-amd64:# CONFIG_SYSFS_DEPRECATED_V2 is not set

 # dpkg -l|grep grub
 iU  grub                                0.97-61                      GRand Unified Bootloader (dummy package)
 iU  grub-common                         1.98+20100804-2              GRand Unified Bootloader, version 2 (common 
 iU  grub-pc                             1.98+20100804-2              GRand Unified Bootloader, version 2 (PC/BIOS

 # ls /boot/grub
 default        fat_stage1_5  menu.lst~          stage1
 device.map     jfs_stage1_5  minix_stage1_5     stage2
 e2fs_stage1_5  menu.lst      reiserfs_stage1_5  xfs_stage1_5

 # apt-get dist-upgrade
 <just udev left now, fails at once>
 # dpkg-reconfigure grub-common
 /usr/sbin/dpkg-reconfigure: grub-common is broken or not fully installed
 # apt-get install grub-common
 < already at latest version, but other packages get set up (eg cpio, info) >
 < here linux-image-2.6-amd64 (2.6.32+28) gets set up >
 < also, this:
  ...
  Setting up grub-common (1.98+20100804-2) ...
  Setting up grub-pc (1.98+20100804-2) ...
  Removing update-grub hooks from /etc/kernel-img.conf in favour of
  /etc/kernel/ hooks.

  Creating config file /etc/default/grub with new version
  Generating core.img
  Saving menu.lst backup in /boot/grub/menu.lst_backup_by_grub2_postinst
  Running update-grub Legacy to hook our core.img in it
    Searching for GRUB installation directory ... found: /boot/grub
    Searching for default file ... found: /boot/grub/default
    Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
    Searching for splash image ... none found, skipping ...
    Found GRUB 2: /boot/grub/core.img
    Found kernel: /boot/vmlinuz-2.6.32-5-amd64
    Found kernel: /boot/vmlinuz-2.6.26-2-amd64
    Updating /boot/grub/menu.lst ... done

  Generating grub.cfg ...
  Found linux image: /boot/vmlinuz-2.6.32-5-amd64
  Found initrd image: /boot/initrd.img-2.6.32-5-amd64
  Found linux image: /boot/vmlinuz-2.6.26-2-amd64
  Found initrd image: /boot/initrd.img-2.6.26-2-amd64
  Setting up grub (0.97-61) ...
  Setting up libdevmapper-dev (2:1.02.48-3) ...
  Setting up libparted0debian1 (2.3-1) ...
  ...
  Processing triggers for initramfs-tools ...
  update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64

  # apt-get dist-upgrade
  < fails on udev again >

  # ls -l /boot/grub
  -rw-r--r-- 1 root root    8208 Sep  2 10:55 915resolution.mod
  -rw-r--r-- 1 root root   10484 Sep  2 10:55 acpi.mod
  -rw-r--r-- 1 root root    4580 Sep  2 10:55 affs.mod
  -rw-r--r-- 1 root root    4896 Sep  2 10:55 afs_be.mod
  -rw-r--r-- 1 root root    4880 Sep  2 10:55 afs.mod
  ...
 # dpkg -l |grep grub^M
 ii  grub                                0.97-61                      GRand Unified Bootloader (dummy package)
 ii  grub-common                         1.98+20100804-2              GRand Unified Bootloader, version 2 (common 
 ii  grub-pc                             1.98+20100804-2              GRand Unified Bootloader, version 2 (PC/BIOS

 # dpkg -l |grep udev
 ii  udev           0.125-7+lenny3 /dev/ and hotplug management daemon

 <check grub.cfg looks ok>

 # vi /etc/default/grub  # fix erroneous GRUB_CMDLINE_LINUX
 # update-grub
 Generating grub.cfg ...
 Found linux image: /boot/vmlinuz-2.6.32-5-amd64
 Found initrd image: /boot/initrd.img-2.6.32-5-amd64
 Found linux image: /boot/vmlinuz-2.6.26-2-amd64
 Found initrd image: /boot/initrd.img-2.6.26-2-amd64

 <at this point, everything looks ok with the grub config.
  I kept a copy, if that is helpful>

 # reboot
 <select the 'chainload grub2' item at the top of the grub menu

 # uname -a
 Linux install 2.6.32-5-amd64 #1 SMP Thu Aug 12 13:01:50 UTC 2010 x86_64 GNU/Linux

 # apt-get dist-upgrade
 < udev upgrades >
 Preparing to replace udev 0.125-7+lenny3 (using .../archives/udev_160-1_amd64.deb) ...
 unrecognized command 'log-priority=0'
 Unpacking replacement udev ...
 Processing triggers for man-db ...
 Setting up udev (160-1) ...
 Installing new version of config file /etc/init.d/udev-mtab ...
 Installing new version of config file /etc/init.d/udev ...
 Installing new version of config file /etc/udev/links.conf ...
 Installing new version of config file /etc/udev/udev.conf ...
 update-initramfs: deferring update (trigger activated)
 Processing triggers for initramfs-tools ...
 update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64

 # apt-get update
 # apt-get dist-upgrade
 <nothing to do>

 # reboot
 < select chainload grub2, works >

 # upgrade-from-grub-legacy
 < for some reason I chose /dev/sdc1 instead of /dev/sdc >
 /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR.  This is a BAD idea..
 /usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
 Installation finished. No error reported.
 Generating grub.cfg ...
 Found linux image: /boot/vmlinuz-2.6.32-5-amd64
 Found initrd image: /boot/initrd.img-2.6.32-5-amd64
 Found linux image: /boot/vmlinuz-2.6.26-2-amd64
 Found initrd image: /boot/initrd.img-2.6.26-2-amd64
 done

 GRUB Legacy has been removed, but...

 # upgrade-from-grub-legacy
 < this time, select /dev/sdc >
 Installation finished. No error reported.
 Generating grub.cfg ...
 Found linux image: /boot/vmlinuz-2.6.32-5-amd64
 Found initrd image: /boot/initrd.img-2.6.32-5-amd64
 Found linux image: /boot/vmlinuz-2.6.26-2-amd64
 Found initrd image: /boot/initrd.img-2.6.26-2-amd64
 done

 GRUB Legacy has been removed, but...

 # dd if=/dev/sdc bs=512 count=2 |od -c
 <I can supply this if required>


 # reboot

 GRUB loading stage 1.5.

 GRUB loading, please wait...
 Error 15

 I booted a weekly-snapshot install disk (30-Aug-2010 06:57 md5sum 2728f9018b5e76db1458b946ca139342)
 and attempted to do this in rescue mode:
 <mount /dev/sdb1 as root partition>
 <start a shell in root partition>
 # /etc/init.d/lvm2 start
 # mount /usr
 # sh -x /usr/sbin/grub-install /dev/sdb
 # reboot

 But I get the same error.

Happy to dig into this a bit if someone can help me get the system booting.

-- 



Reply to: