learnings from upgrading a notebook

D. Hugh Redelmeier hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Wed Sep 3 00:39:26 UTC 2008


| From: D. Hugh Redelmeier <hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org>

| | > I don't know the right way to fix that grub.  I tried the technique
| | > that is supposed to work with Fedora:
| | > 
| | > 	- boot live CD
| | > 	- mount /dev/sda3 /tmp/root
| | > 	- cd /tmp/root
| | > 	- chroot /tmp/root
| | > 	- grub-install /dev/sda3
| | > 
| | > This failed because there is no /dev/sda3 in that root filesystem.
| | > Something must build it no the fly.
| | 
| | Using /dev/sda for grub worked great for me.
| 
| I wanted to leave the Lenovo-supplied MBR so I was installing a boot
| sector on /dev/sda3.  Grub would not accept this.  Not actually having
| the /dev/sda3 path seems like a sufficient explanation but perhaps
| there is another.  Other grub behaviour suggests that it cares about
| the filename and not just the device inode.

There is a slightly more intricate procedure outlined here:

  http://ubuntuguide.org/wiki/Ubuntu:Hardy#How_to_restore_GRUB_to_a_partition_or_MBR_with_an_Ubuntu_Live_CD

The idea is to mount more things in the /tmp/root tree before
chrooting.  In particular:

  mount -t proc proc /tmp/root/proc
  mount -t sysfs sys /tmp/root/sys
  mount -o bind /dev /tmp/root/dev

It then goes on to sketch a much simpler approach:

    Alternatively, mount the / and /boot folders you want to boot into and
    just pass the --root-directory argument into grub-install, there is no
    need to chroot anymore. 

I have not tried either procedure.
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list