Knowledge Base

 

The Finnix Recovery CD can be used to perform a number of tasks that are otherwise difficult or impossible to do on your Linux VPS. Common uses include:
* Running fsck (file system repair) on your hard disk
* Setting the root password
* Formatting your hard disk with another filesystem type, like XFS
This guide will walk you through booting into the Recovery CD along with how to perform some basic tasks.
Entering Recovery
1. After logging into mPanel, click the "Manage" button next to the VPS you wish to work on.
mpanel.png
1. The bottom right corner of the screen shows the active Kernel and lets you select a new one. Take note of the kernel you are currently using.
kernel.png
1. Change the kernel to 'Finnix Recovery CD' and click Save.
1. A prompt will ask you to confirm that a VPS restart is needed - click OK.
1. Mammoth VPS will begin shutting down your VPS before restarting it with the Recovery CD.
1. From the "Access" menu click "Rescue Console" - the Recovery CD will boot without networking, so you must access it through the console.
menu.png
Once the Finnix Recovery CD has booted, the Rescue Console screen will look like this:
finnix.png
Basic Tasks
Unlike when using your VPS normally, while using the Recovery CD your Mammoth VPS hard drive (either /dev/xvda2 or /dev/xvda) is not mounted as the root partition. In fact, its initially not mounted at all - which is a requirement if you ever need  to repair your filesystem with the fsck command:
fsck.png
If you need to reset your root password, you can mount the hard drive and then use the passwd command incombination with chroot ("change root partition") command:
passwd.png
If you want to use SSH:
-  set a root password (without chroot - you want the password set on the Recovery CD)
-  configure eth0 with your VPS' IP address with ifconfig
- set your default route (its the same as your IP address, but with the last number changed to '1' - eg if your IP address is 110.232.114.23 , then your default route is 110.232.114.1 )
- start SSH via its initialization script
ssh.png
Change Filesystem Types
With Finnix, its possible to reformat your hard disk with a different fylesystem type. However, this will delete all your files (and mPanel's reinstall will convert you back to ext3) so on its own its not that useful. However, In combination with mPanel's "attach backup" feature it is possible to take a backup, immediately drop into Finnix, reformat the disk and then copy everything from your ext3 backup into the new filesystem.
1. After logging into mPanel, click the "Manage" button next to the VPS you wish to work on.
1. Click on the "Backups" menu item.
1. Create a fresh backup. Any changes made after this backup is taken but before the filesystem is converted will be lost, so it is a good idea to shut down your web server, database, and anything else that will modify files. Of course if you have already booted into Recovery CD, then none of those things are running anyway.
1. Return to the "Backups" menu item, select the radio box next to your backup, and click Attach Selected.
attach.png
1. Click "OK" when prompted to reboot your VPS and attach the backup drive.
1. Run through the "Enter Recovery" steps from earlier in this guide to start the Finnix Recovery CD and access the rescue console.
1. The backup is attached as a new device (either /dev/xvdb1 or /dev/xvdk) - confirm you can see it by mounting it and looking at the files. Be sure to unmount it once you're done.
backupmount.png
1. Having verified your backup, reformat your main disk (either /dev/xvda2 or /dev/xvda) - in this example, we use XFS. The -f flag is required to force overwriting the existing filesystem.
1. Now mount both the backup and your normal hard disk simultaneously and copy the files from backup to the normal disk. The -a switch  (archive mode) does a recursive copy and preserves the file modes, owners, timestamps, symbolic links, and so on:
copybackup.png
1. Edit the hard-disk's /etc/fstab and change the filesystem type from ext3 to xfs:
fstab.png
1. Return to the Backups area, and de-attach the backup.
1. Follow the "Leaving Recovery" steps to boot your VPS back up normally.
Leaving Recovery
Once you have finished with your management tasks, you need to simply change back to the kernel you were previously using:
1. After logging into mPanel, click the "Manage" button next to the VPS you wish to work on.
1. Change the kernel setting to its previous value and click Save.
1. A prompt will ask you to confirm that a VPS restart is needed - click OK.
1. Mammoth VPS will begin shutting down your VPS before restarting it with your standard kernel.
1. Wait for the VPS to finish booting, and then confirm you can now access it as normal via SSH.

 

The Finnix Recovery CD can be used to perform a number of tasks that are otherwise difficult or impossible to do on your Linux VPS. Common uses include:

  • Running fsck (file system repair) on your hard disk
  • Setting the root password
  • Formatting your hard disk with another filesystem type, like XFS

This guide will walk you through booting into the Recovery CD along with how to perform some basic tasks.

 

Entering Recovery

1. After logging into mPanel, click the "Manage" button next to the VPS you wish to work on.

mpanel

 

2. The bottom right corner of the screen shows the active Kernel and lets you select a new one. Take note of the kernel you are currently using.

kernel

 

3. Change the kernel to Finnix Recovery CD and click Save.

4. A prompt will ask you to confirm that a VPS restart is needed - click OK.

5. Mammoth VPS will begin shutting down your VPS before restarting it with the Recovery CD.

6. From the "Access" menu click "Rescue Console" - the Recovery CD will boot without networking, so you must access it through the console.

menu

 

7. Once the Finnix Recovery CD has booted, the Rescue Console screen will look like this:

finnix

 

Basic Tasks

Unlike when using your VPS normally, while using the Recovery CD your Mammoth VPS hard drive (either /dev/xvda2 or /dev/xvda) is not mounted as the root partition.

In fact, its initially not mounted at all - which is a requirement if you ever need  to repair your filesystem with the fsck command:

fsck

 

If you need to reset your root password, you can mount the hard drive and then use the passwd command in combination with chroot ("change root partition") command:

passwd

 

If you want to use SSH while Finnix is running:

  1. set a root password (without chroot - you want the password set on the Recovery CD)
  2. configure eth0 with your VPS' IP address with ifconfig
  3. set your default route. Its the same as your IP address, but with the last number changed to '1' - eg if your IP address is 110.232.114.23 , then your default route is 110.232.114.1
  4. start SSH via its initialization script

ssh

 

Change Filesystem Types

With Finnix, its possible to reformat your hard disk with a different filesystem type. However, this will delete all your files (and mPanel's reinstall function would convert you back to ext3) so on its own its not that useful.

In combination with mPanel's "attach backup" feature it is possible to take a backup, and then immediately drop into Finnix to reformat the disk and then copy everything from your ext3 backup into the new filesystem:

1. After logging into mPanel, click the "Manage" button next to the VPS you wish to work on.

2. Click on the "Backups" menu item.

3. Create a fresh backup. Any changes made after this backup is taken but before the filesystem is converted will be lost, so it is a good idea to shut down your web server, database, and anything else that will modify files. Of course if you have already booted into Recovery CD, then none of those things are running anyway.

4. Return to the "Backups" menu item, select the radio box next to your backup, and click Attach Selected.attach

 

5. Click "OK" when prompted to reboot your VPS and attach the backup drive.

6. Run through the "Enter Recovery" steps from earlier in this guide to start the Finnix Recovery CD and access the rescue console.

7. The backup is attached as a new device (either /dev/xvdb1 or /dev/xvdk) - confirm you can see it by mounting it and looking at the files. Be sure to unmount it once you're done.

backupmount

 

8. Having verified your backup, reformat your main disk (either /dev/xvda2 or /dev/xvda) - in this example, we use XFS. The -f flag is required to force overwriting the existing filesystem.

9. Now mount both the backup and your normal hard disk simultaneously and copy the files from backup to the normal disk. The -a switch  (archive mode) does a recursive copy and preserves the file modes, owners, timestamps, symbolic links, and so on:

copybackup

 

10. Edit the hard-disk's /etc/fstab and change the filesystem type from ext3 to xfs:

fstab

 

11. Return to the Backups area, and de-attach the backup.

12. Follow the "Leaving Recovery" steps to boot your VPS back up normally.

 

Leaving Recovery

Once you have finished with your management tasks, you need to simply change back to the kernel you were previously using:

  1. After logging into mPanel, click the "Manage" button next to the VPS you wish to work on.
  2. Change the kernel setting to its previous value and click Save.
  3. A prompt will ask you to confirm that a VPS restart is needed - click OK.
  4. Mammoth VPS will begin shutting down your VPS before restarting it with your standard kernel.
  5. Wait for the VPS to finish booting, and then confirm you can now access it as normal via SSH.

 

 

Preload Preload Preload