1

Recently i hard disk crash in my system. To recover from that disaster below are the steps i followed

  1. Has a master backup created using FSARCHIVER
  2. In a new hard disk created required partitions

Partition Info

Number  Start   End     Size    Type      File system     Flags
 1      2097kB  271MB   268MB   primary   ext4            boot
 2      273MB   2420MB  2147MB  primary   linux-swap(v1)
 3      2422MB  23.9GB  21.5GB  primary   ext4
 4      23.9GB  320GB   296GB   extended
 5      23.9GB  77.6GB  53.7GB  logical   ext4
 6      77.6GB  320GB   242GB   logical   ext4
  1. Booted system using GRML USB boot.
  2. Restored FS using fsarchiver.

fsarchiver restfs master.fsa id=0,dest=/dev/sda1 id=1,dest=/dev/sda3 id=2,dest=/dev/sdb5 id=3,dest=/dev/sda6

  1. I tried to install GRUB using following command, But the sytem did not boot:

grub-install --target=i386-pc --root-directory=/mnt/ --recheck --debug /dev/sda

I tried /mnt mounted in /dev/sda1 and /dev/sda5.

I'm worried whether the GRUB method i am using is correct

FSTAB info

    proc            /proc           proc    defaults        0       0
    # / was on /dev/sda5 during installation
    UUID=9e890f7b-dda0-41e2-9a38-fc409212b9b1 /               ext4    rw,data=journal,journal_checksum 0 1
    # /boot was on /dev/sda1 during installation
    UUID=213cc4e2-ead2-4be0-81d5-104b4ee525b0 /boot           ext4    ro       0       2
    # /opt was on /dev/sda6 during installation
    UUID=2df2a103-0cd3-4d0c-bc35-5f9d0b2104ac /opt            ext4    rw,data=journal,journal_checksum 0 1
    # /usr was on /dev/sda3 during installation
    UUID=6c6bfee0-bfda-4b45-ba2d-63d0d38cd920 /usr            ext4    defaults        0       2
    # swap was on /dev/sda2 during installation
    UUID=ac842cd1-9655-4890-9409-0e9c1d8ed58e none            swap    sw              0       0
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

Request guidance in addressing issue

  • 2
    Shouldn't the grub option be --boot-directory=/mnt? You've used --root-directory. – garethTheRed Nov 4 '14 at 14:45
  • @garethTheRed a: u can post that as an answer, it worked ;) – Ragav Nov 5 '14 at 5:12
1

The --root-directory option was used on the older Grub 0.97 - it's not used on version 2, which most distros use these days.

The option you need is --boot-directory. From the man page:

   --boot-directory=DIR
          install  GRUB images under the directory DIR/grub instead of the
          boot/grub directory

A Google search for man grub-install brings up the old version at the top of the list unfortunately.

Searching for man grub2-install returns a better man page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.