0

I recently tried to install Linux Mint on my PC having installed Windows 7, after that what I noticed, one partition of my hard drive is invisible, means Linux has been installed, but when I try to boot up my PC it starts up the Windows 7, but now is neither booting into Windows nor Linux, because I think due to my madness, I have done something wrong while in LiveBoot from Pen Drive, I typed something into terminal from the web, I don't know what, but it was regarding partition and one command I know was something, grub-update.

So, what to do now, please anyone tell me

[I think I should be install again Linux Mint(from liveboot) by choosing the first option, (i.e. By formating whole hard drive)]

7
  • When you install grub, was it to /dev/sda or /dev/sda1 (you may have something similar)? Grub need to be installed to sda (without the number at the end). sda refers to the HDD itself. sda1 refers to the 1st partition in sda. I'm not sure how to FIX it (ie. installing grub loader and making it working with the current partitioning without reinstalling Mint), but fully reinstalling and taking note of the grub install path will put the grub loader correctly. Maybe try googling for "fix grub from livecd" or similar
    – Darius
    Commented Aug 4, 2017 at 12:51
  • hey bro, I just choose to install Linux Mint by formatting whole drive, will it install grub automatically? Commented Aug 4, 2017 at 12:52
  • If you format whole drive, your windows partition will go away.. are you sure that is what you want? (and on that note, let me fire up Virtualbox and try to install Mint.. I never install mint in particular - so kinda curious if there are something different about it) - In regards to installing grub automatically - it may still ask you about "where you want to install grub" - but again I never do Mint installation so I can't say for sure if that is your experience.
    – Darius
    Commented Aug 4, 2017 at 12:53
  • Oops, it shows an error, errno. 30 Commented Aug 4, 2017 at 12:54
  • and now when I try to reinstall it is saying, Error fsyncing/closing /Dev/sda1:Input/Output error? Commented Aug 4, 2017 at 12:55

1 Answer 1

0

The usage is basically very simple. You only need to specify one argument to the program, namely, where to install the boot loader. The argument can be either a device file (like `/dev/hda') or a partition specified in GRUB's notation. For example, under Linux the following will install GRUB into the MBR of the first IDE disk:

 # grub-install /dev/hda

Likewise, under GNU/Hurd, this has the same effect:

 # grub-install /dev/hd0

If it is the first BIOS drive, this is the same as well:

 # grub-install '(hd0)'

Or you can omit the parentheses:

 # grub-install hd0

But all the above examples assume that GRUB should use images under the root directory. If you want GRUB to use images under a directory other than the root directory, you need to specify the option --root-directory. The typical usage is that you create a GRUB boot floppy with a filesystem. Here is an example:

 # mke2fs /dev/fd0
 # mount -t ext2 /dev/fd0 /mnt
 # grub-install --root-directory=/mnt fd0
 # umount /mnt

Another example is when you have a separate boot partition which is mounted at /boot. Since GRUB is a boot loader, it doesn't know anything about mountpoints at all. Thus, you need to run grub-install like this:

 # grub-install --root-directory=/boot /dev/hda

By the way, as noted above, it is quite difficult to guess BIOS drives correctly under a UNIX-like OS. Thus, grub-install will prompt you to check if it could really guess the correct mappings, after the installation. The format is defined in Device map. Please be quite careful. If the output is wrong, it is unlikely that your computer will be able to boot with no problem.

Note that grub-install is actually just a shell script and the real task is done by the grub shell grub (see Invoking the grub shell). Therefore, you may run grub directly to install GRUB, without using grub-install. Don't do that, however, unless you are very familiar with the internals of GRUB. Installing a boot loader on a running OS may be extremely dangerous.

4
  • this is not what I'm asking Commented Aug 4, 2017 at 12:06
  • Then please be elaborate!
    – Sayan
    Commented Aug 4, 2017 at 12:07
  • I just want to know how to fix it, or else I should have to install Linux by fully formating hard disk? Commented Aug 4, 2017 at 12:08
  • please get into the whatsapp group of super user, chat.whatsapp.com/IxSJ4bHwZd77psVp4ymzGN Commented Aug 4, 2017 at 12:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .