Jump to content

[Tutorial] Recovering GRUB in HC2


Recommended Posts

Hello.

 

I wanted post it here: https://forum.fibaro.com/forum/129-other-solutions/ but i have no rights for it.

 

First of all I want to say that it is totally not recommended to do it. If you have similar problems - ask for support first!
DO IT ON YOUR OWN RISK! Probably this will end your warranty (but my already ended).

 

Two days ago a need to do some electric works and I shutdown my HC2 by pressing power button.

Then, when I finished - I switch it on leds start to blinking... but nothing hapened. I tried to boot to recovery but it did not boot also.

 

I unscrewed left panel of HC and attach monitor to see whtats hapening. And I sawed that it is immediatly reboot after selcecting a boot device. 

 

It was a GRUB problem. This tutorial is for linux users.

Btw, my HC2 version is  4.550.

 

1. You need:

>=1Gb flash drive

Keyboard

Monitor with VGA connector

Linux PC (you can prepare USB drive on Windows, but I do not know how, sorry)

 

2. Preparing flash drive

Download Debian 6 image:

https://cdimage.debian.org/mirror/cdimage/archive/6.0.10-live/amd64/usb-hdd/debian-live-6.0.10-amd64-rescue.img

And flash it to usb drive (this will erase all your data on flash drive):

dd if=debian-live-6.0.10-amd64-rescue.img of=/dev/sdc

/dev/sdc - is your USB Flash.

 

3. Boot with prepared flash drive

Power off HC2.

Insert USB Flash.

Remove fibaro recovery usb-drive.

Press F10 like crazy after power on.

Select your USB flash in menu.

 

4. Fixing grub

When GRUB of flash drive appering - select failsafe mode and press enter

After boot sequence will compleate you have about 5 minutes to fix your problem (after sometime something will reboot your HC2).

 

Determine system drive device:

ls -al /dev/disk/by-label

 

You will see something like: 

...
lrwxrwxrwx 1 root root  10 Nov  9 14:38 SystemFS -> ../../sdb2
...

So, sdb is your target drive.

 

Mount SystemFS with write permissions:

sudo mount /dev/disk/by-label/SystemFS /mnt -rw

Install GRUB to your target device.

sudo /usr/grub/grub-install --root-directory=/mnt /dev/sdb

Now you need to fix grub.cfg

vi /mnt/boot/grub/grub.cfg

grub.cfg should become like this:

set default="0"
set timeout="5"

menuentry "Buildroot" {
        set root=(hd0,msdos2)
        linux /boot/bzImage
        initrd /boot/initramfs
        boot
}

5. Reboot

Do not forget to remove your flash drive.

It shodl boot normaly now.

  • Like 3
  • Thanks 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...