Skip to content

Home > GNU/Linux > Mastering Mandriva Rescue mode

Mastering Mandriva Rescue mode

Monday 16 June 2008, by Stéphane Téletchéa

Oops! I did it again ...
You know the story, it is late, you are starting something you are not familiar with (to say the least), and of course, that fails.

This article will help you in using the Mandriva rescue mode to get the situation back to normal...

Most of the time, when you can go to a console and have some knowledge (or a friend to mail to), you can easily roll back from a bad situation. However, in cases where you can even not boot to your system, you are stuck. In fact, not completely, the rescue mode is there for you!

Entering the rescue mode

  1. Boot the installation CD/DVD and select “rescue mode”
  2. select “go to console”
  3. For loading some modules (like for instance the modules needed by a RAID instalation), type:
    modprobe dm-mirror
    modprobe ahci
    dmraid -a y

    Run dmesg, it should display at the end a message concerning your
    partitions.

Examining if the hardware is correctly handled

Run lsparts, it should now correctly display your partitions ...

  1. Type mount /dev/sdXY /mnt, here X is the drive letter (should be a), and Y is the partition number (probably 1)
  2. cd into the partition and copy the appropriate file to a floppy or USB key (you may also need to mount them manually using mount).

Recreating the initrd and/or installing a new kernel

Creation of the initrd has already been detailed in this article.

If you need to install a new kernel, before going to the rescue mode, put on an USB stick the desired RPMs (at least kernel-desktop, kernel-desktop-devel).

- Create a /mnt/usb directorymkdir /mnt/usb and mount the USB stick mount /dev/usb/... /mnt/usb

- Copy the files to the temporary directory: cp /mnt/usb/kernel* /tmp

- Enter in a virtual system (the one where your installation lies):mkdir /mnt/disk ; mount /dev/sdX /mnt/disk; chroot /mnt/disk; mount /proc; mount /boot (optionally)

- Install the new kernel: urpmi kernel-desktop kernel-desktop-devel. This step should create a correct initrd and a new bootloader entry.

- Exit from the virtual system:umount /boot; umount /proc; exit

- Reboot and select the new entry.

If that fails

If that fails, redo the procedure, and specify explicitly the kernel module missing.
For instance for a RAID5 system on Mandriva 2008 Spring (where only the -tmb kernel includes the needed RAID5 modules), you will need on your USB key the rpms:
- kernel-tmb-desktop-2.6.24.4-1mdv-1-1mdv2008.1.i586.rpm
- kernel-tmb-desktop-latest-2.6.24.4-1mdv2008.1.i586.rpm
- kernel-tmb-desktop-devel-2.6.24.4-1mdv-1-1mdv2008.1.i586.rpm
- kernel-tmb-desktop-devel-latest-2.6.24.4-1mdv2008.1.i586.rpm

After entering the rescue mode and the chroot virtual system, just type:

mkinitrd -f /boot/initrd-kernel-tmb-desktop-2.6.24.4-1mdv.img --with dm-raid4-5 kernel-tmb-desktop-2.6.24.4-1mdv

And reboot to the new entry.

You should now be able to boot correctly on your system!

1 Message

Comment on this article