Docs/SysAdmin/GrubInodeTransition

From Mandriva Community Wiki

Jump to: navigation, search


Contents

Introduction

With Mandriva 2008.1, the format for representing files on disks has been slightly modified: 2008.1 uses inodes with a size of 256 bytes rather than the 128-byte inodes of earlier systems. That may create difficulties on multi-partition systems when booting from a non-2008.1 Linux partition (that still uses 128-byte inodes) into 2008.1, possibly also vice versa.

The boot-sector that is written by Mandriva 2008.1 can handle both sizes of inodes: normally there should be no problem when using the 2008.1 bootloader to boot into pre-2008.1 system partitions. But the bootloaders of these earlier systems cannot deal with 256-byte nodes. Booting into 2008.1 will therefore fail if the boot-sector has been written by most pre-2008.1 systems. Currenly this is the case for Mandriva 2008.0 and older releases, and also for most other Linux distributions.

Normally the user does not need to explicitely specify what bootloader is to be installed, he accepts the bootloader that is written by default - for instance when a system is installed or when an updated kernel is put in place. During the transition period while partitions with 128-byte and with 256-byte inodes coexist, management of multi-partition systems may require some precautions. The present note explains some items that have resulted from recent forum discussions.


Sequence to be observed installing systems in a multi-partition environment

Normally, the boot-sector present when a system is booted is the one written when the last system partition had been installed. Therefore there is a very simple precaution for having the 2008.1 bootsector installed: make sure that the 2008.1 partition is installed last if you have several co-existing system partitions.


Re-writing the 2008.1 boot-sector

It may happen, that the 2008.1 boot-sector is overwritten by the boot-sector of a pre-2008.1 system - for instance after an update of the kernel of such a system. If that happens, it will not be possible to boot back into 2008.1.

The bootsector of 2008.1 can be re-installed by the following sequence of operations:

  • Boot into any the pre-2008.1 system.
  • Make sure that this system has a mountpoint for the 2008.1 partition and that the 2008.1 partition is mounted.
  • Open a root shell console.
  • Type chroot  /2008.1-linux (assuming that /2008.1-linux is the mountpoint where the 2008.1 partition has been mounted)
  • Type /boot/grub/install.sh

This sequence makes your non-2008.1 system switch to the root of the 2008.1 partition (chroot is a particular kind of cd instruction), and than runs the install.sh script of 2008.1 - which installs the desired bootsector as if it were installed by a running 2008.1 system.


Bootstrap menus on multi-partition installations with Mandriva 2008.1

In a multi-partition system with 2008.1, the actions tied to the different menu items of the grub loader must respect certain constraints.

This menu is automatically created when the 2008.1 system is installed and should normally support booting into all system partitions without any problem - Mandriva Linux, other distribution Linux, Windows. Under particular conditions it may become necessary to manually correct the file that defines the bootstrap menu, i.e. the file /boot/grub/menu.lst of the 2008.1 system partition.

Here are examples of boot-menu items as they appear in /boot/grub/menu.lst - all of these examples have been extracted from menu.lst files automatically generated by Mandriva, all of them are reported to - in the environment they are provided for - work perfectly

  1. title Linux-test8
    kernel (hd0,7)/boot/vmlinuz BOOT_IMAGE=linux
    root=/dev/sda8 splash=silent resume=/dev/sda6 vga=788
    initrd (hd0,7)/boot/initrd.img

  2. title Linux-extra
    root (hd0,6)
    configfile /boot/grub/menu.lst

  3. title Win2kAS
    root (hd1,0)
    map (0x81) (0x80)
    map (0x80) (0x81)
    makeactive
    chainloader +1

<textual explanation still to be provided>


More information; related Mandriva forum threads

  • This article contains an explanation of the transition to 256-byte inodes].
  • info grub provides access to the grub manual - however, I found this manual difficult to read without knowing beforehand precisely what I was looking for. Better: use the GRUB Manual
  • Problems related to this issue are frequently reported in Mandriva forum discussions, the following two threads are the ones from which most information in this summary has been drawn [1] and [2].
Personal tools