From Mageia wiki
Jump to: navigation, search


Drakconf multiflag.png
Other languages
Deutsch ; English ; Français ; Nederlands ;
Synopsis:
The purpose of this document is to provide a general rescue method without the need for the Mageia boot medium.

This procedure will interrupt the boot process in a very early stage, and starts a rescue environment. This method can be used to repair things, reset your password etc.

Of course, it only works if the boot-loader is still available and you can select a working kernel (if one fail, try another in the menu).

Mageia Boot Menu

Boot your system. In the Mageia Boot menu, press e to edit the Mageia entry. Move your cursor to the line that starts with:

linux16 /boot/vmlinuz....

Remove the words "splash" and "quiet" and add:

rd.break

Press ctrl+x to boot

Root Filesystem

You are now in the rescue shell, press ctrl+l to clear the screen.

Execute: findmnt /sysroot

Normally the root filesystem of your installation is mounted on this directory. But it's mounted read-only, remount it:

mount -o remount,rw /sysroot

Check if there is content in /sysroot/boot. If not: you have to mount the filesystem that contains your kernel and bootloader configuration. This is probably on /dev/sda1. The command cat /proc/partitions can give you some hints, it is normally located on a small filesystem.

mount /dev/sda1 /sysroot/boot

Binds

In the rescue environment, you'll probably need access to devices, filesystems, hardware information, and processes. Bind the /dev, /sys and /proc directories in /sysroot

mount --bind /dev /sysroot/dev mount --bind /sys /sysroot/sys mount --bind /proc /sysroot/proc

Chroot

Now you can change from the root filesystem of the rescue shell to the root filesystem of your installation

chroot /sysroot

And you have full access to your installation

Example: reset root password

As an example of what you can do now, execute:

passwd

Your root password is changed!

Exit

Press ctrl+d to exit to the root filesystem of the rescue shell

Press ctrl+d again to reboot the system.