Difference between revisions of "Rescue System"

From BubbaWiki
Jump to navigation Jump to search
 
Line 1: Line 1:
If you messed up some config and your Bubba doesn't boot or isn't reachable via network anymore, your only hope is to boot a rescue system, mount the root disk and fix your error. Here is how:
If you messed up some config and your Bubba doesn't boot or isn't reachable via network anymore, your only hope is to boot a rescue system, mount the root disk and fix your error. Here is how:


First you need a USB stick. That stick needs to have a partition table with a FAT32 system in the first primary partition. Most sticks come without a partition table, so you need to create one first.
First you need a USB stick. That stick needs to have a partition table with a FAT32 system in the first primary partition. Most sticks come without a partition table, so you need to create one first. Here are instructions to do this on a Linux box :


   $ sudo cfdisk /dev/sdc
   $ sudo cfdisk /dev/sdc
Line 14: Line 14:
Now download the B3 Install image from http://install.excito.org/latest/b3/ and unzip the ZIP file to the USB stick (it should create a /install directory).
Now download the B3 Install image from http://install.excito.org/latest/b3/ and unzip the ZIP file to the USB stick (it should create a /install directory).


Inside the /install directory is a file called ''bubba.cfg''. Edit that file and make sure you disable installing (This is '''important''', if you forget this your B3 will be completely reinstalled):
Inside the /install directory is a file called ''bubba.cfg''. Edit that file (If you're on Windows DO NOT use notepad as it will mess newlines in the file ; instad use a smart text editor as [https://notepad-plus-plus.org/download/ Notepad++]) and make sure you disable installing (This is '''important''', if you forget this your B3 will be completely reinstalled):


   # Should we install at all?
   # Should we install at all?

Latest revision as of 15:00, 2 September 2015

If you messed up some config and your Bubba doesn't boot or isn't reachable via network anymore, your only hope is to boot a rescue system, mount the root disk and fix your error. Here is how:

First you need a USB stick. That stick needs to have a partition table with a FAT32 system in the first primary partition. Most sticks come without a partition table, so you need to create one first. Here are instructions to do this on a Linux box :

 $ sudo cfdisk /dev/sdc
 create a new primary partition
 make it bootable
 change it to type W95 FAT32

Now create a FAT32 system:

 $ sudo mkfs.vfat /dev/sdc

Now download the B3 Install image from http://install.excito.org/latest/b3/ and unzip the ZIP file to the USB stick (it should create a /install directory).

Inside the /install directory is a file called bubba.cfg. Edit that file (If you're on Windows DO NOT use notepad as it will mess newlines in the file ; instad use a smart text editor as Notepad++) and make sure you disable installing (This is important, if you forget this your B3 will be completely reinstalled):

 # Should we install at all?
 # If set to 0. Installer will halt leaving a running "rescue system"
 DO_INSTALL=0

Next, connect your B3's WAN port to any network with a running DHCP server (like your router) and disconnect any external drives.

Put your USB stick in one of the USB ports. To tell the B3 to run the rescue image you need to unplug the power cord, hold the power button and plug the power cord back in while holding the button. The B3 LED will light up green and you can release the power button.

Now check your DHCP leases to find the IP your B3 got and login via SSH using root/excito as user/password.

Once you're in mount your B3 root disk:

 # mount /dev/sda1 /mnt

Now fix what ever you broke. When done, shutdown:

 # halt

Pull the power plug and your USB stick, reconnect any external drives, check your network cables and boot up your fixed B3.