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

Re: lenny->squeeze upgrade - failed with grub-pc upgrade

Lukasz Szybalski wrote:
> In the process of upgrading from debian lenny amd64 to debian squeezy
> amd64 I was able to successfully upgrade to kernel 32 and new udev.
> Then after reboot I followed with apt-get dist-upgrade.

You say "after reboot" and so you must have used grub to reboot,

> Everything went fine, but towards the end I was asked to upgrade to
> grub-pc.

Asked to upgrade by asking you to run upgrade-from-grub-legacy
yourself manually from the command line?  Or by some other means?

> During this choice I was asked to specify mbr to install new
> boot loader. I've selected my "flash" drive that I have used before to
> hold my "boot" partition I believe.

I think the most normal installation is to select your first raw
drive.  That is, if you have /boot on /dev/sda1 and / on /dev/sda5 or
some such then you would install grub on /dev/sda without adding any
partition numbers.

> After restart I can only see "GRUB>".

Grub appears to be installed then.  But the problem would seem to be
that grub's configuration file didn't point to the root filesystem.

At that point you can issue instructions to grub.  You should be able
to get some good information.  It is a little confusing to describe
but the most important thing to know is that TAB will expand and list
your possible options.  Use this to explore your system at that point
and to see what is where.  You can type in "help" to get a list of
commands available but that will produce a lot of output and will
overwhelm you.

At the grub prompt type in "root (" and then hit TAB to have it
complete.  It will look like this:

  grub> root (

Press TAB at that point and it will fill out to the available

  grub> root (hd0,

Press TAB again to have it list them out.

  grub> root (hd0,
  Possible partitions are:
    Partition hd0,sda1
    Partition hd0,sda2

Then select one of them and repeat to list the contents of that

  grub> root (hd0,0)/
  Possible files are:
    lost+found/ System.map-2.6.32-5-686 vmlinuz-2.6.32-5-686 grub/
    config-2.6.32-5-686 initrd.img-2.6.32-5-686

That verifies that on my system hd0,0 (/dev/sda1) is my /boot
partition.  Repeat again with the other partition numbers.

  grub> root (hd0,1)/
  Possible files are:
    bin/ boot/ dev/ home/ lib/ lost+found/ media/ mnt/ opt/ ...

That verifies that on the system I tried that hd0,1 (/dev/sda2) is the
root partition.

So to manually tell grub what it needs to boot I can type in the

  grub> root (hd0,0)
  grub> kernel /vmlinuz-2.6.32-3-amd64 root=/dev/sda2 ro
  grub> initrd /initrd.img-2.6.32-3-amd64
  grub> boot

Use TAB to complete the filenames to ensure that you have the right
location and to save you from typing in all of the details of the
version numbers and architecture type.

If that works then your problem is not your grub install to the boot
partition but rather your configuration for grub in /boot/grub/* that
is the problem.

> While Recovering from grub-pc install failure. I've started from cd
> (rescue) mode.

A debian-installer disk in rescue mode should work okay.

> I then assembled my raid partition (sdb1,sdc1,sdd1) and

Why did you need to assemble the raid?  That points to a different
problem.  The raid should be automatically assembled by the initial
ram disk (initrd) and if it isn't then you are past grub and onto the
initrd phase of boot.

Did you by any chance add a disk to the raid but not rebuild the
initrd image?  The initrd has the UUIDs of every disk in the raid as a
copy of the /etc/mdadm/mdadm.conf file in the initrd.  If you have
added a disk to the raid and it is required for the lvm to start then
this also needs to be added to the initrd copy of the mdadm.conf
file.  Otherwise it will fail to start the raid at boot time.

> executed into shell of my lvm root group mapper_xyz_root. From there I
> run "upgrade-from-grub-legecy" and this time I've selected my usb and
> sda to install grub.

I think you are mixing issues.  I think you mixing up grub with raid
with lvm but really those are all separate.  This is very easy to
become confused about but just the same I think that is what is

> Then I tried "update-grub"
> Now I get "grub loading...
> no module name found"

That I don't know.

> What should I do now? I've logged in with rescue cd again and now my
> /boot partition no longer holds other files except for "/boot/grub/.."
> What happened to my kernel files 26 and 32 that were on the /boot?

Mounted the wrong partition?  They should still be there.  Take a deep
breath.  Remain calm.  Try it again.  They should be there.

If you have somehow wiped them out then you will need to either
recover them or reinstall them from the chroot.

I have upgraded many machines from Lenny to Squeeze and although I
think this upgrade has the more problems of any of the previous
upgrades I have never had any of the problems you have mentioned.

> What are my choices on installing grub-pc? Do I need "boot" partition?


> What should be on it?

Files such as:


> Why did files got removed?

Only you are in a position to know what you did.

> Should I be installing grub on my lvm root group? or sda? or /boot
> flashdrive?

Since you are getting the grub prompt then you have successfully
installed grub and your problem is with a later phase of the boot.


Attachment: signature.asc
Description: Digital signature

Reply to: