Skip navigation

To mount a  “.iso ” file from the terminal type the following at the  prompt

sudo mount -o loop /path_to_file.iso /mnt

Note:

  1. The full path of the iso file has to be there unless you are already in the directory of the file itself.
  2. The /mnt is part of the file system but you can use any folder of your choice provided its not in use.

You can type echo $? immediately after the mount command has executed to see the exit state. A Zero (0) exit state means successful execution otherwise an error occurred.

Once the exit status is 0, you can issue nautilus /mnt & to open nautilus and display the data.

Before you umount the volume, make sure you close all processes on the data and type
sudo umount /mnt at the terminal.

Restoring your grub boot loader after an XP or Vista re-Installation can be a bit difficult if you have quite a number of partitions.

This post assumes that a multi-boot setup was previously existing before Ms-Windows re-installation and that an entry of Ms-Windows is already in grub’s “menu.lst”. If your situation is different you can get answers from the How-To Geek.

Now, the first step is to boot with a Live-CD preferably Ubuntu or one Distro of your choice.

Once you are at the desktop. Go to Applications>Accessories>Terminal…
At the Prompt, type

sudo grub

Like the one Below and press Enter

If you are unsure about the Linux partition, go to “Places>Computer”. Nautilus will load displaying all detected partitions on your system. Double-click on the volume containing your Linux files except for the volume labeled “FileSystem” (if still not sure which is it, double-click on each volume till you find the desired disk)

If you are quite an expect with “fdisk”, you could do an

fdisk -l

to display the volumes in the terminal and you can go ahead and resolve “sd” to “hd”

Once you do, navigate to “_LinuxDisk_/boot/grub/” and open the “menu.lst” file.

The default editor will open the file upon double-clicking.
Locate the entry of the Linux distribution that you were running. In my case, I was running Ubuntu so I located my entry like the one below.

(All lines with "#" are comments so you shouldn’t search there)

Now, look at the first entry of your Linux OS boot entry and take note of the second line which in my case is

root (hd0,4)

We now know which hard disk and partition our Linux OS is installed on, go back to the terminal and type the following series of commands.

Note : Be mindful of the spaces between commands and parameters. For the first command “root” replace the “(hd0,4)” with your entry.

-------------------------------------------------------------
root  (hd0,4)      Press The Enter key

then..

setup  (hd0)      press The Enter Key to finalize
------------------------------------------------------------

Note : For the command “setup” the parameter “hd0″ specifies the first hard disk of your system and It is often the active boot disk on your system and It will be searched first unless you have explicitly specify anther disk using “fdisk” and the like.

You should have an output that looks like the one below.
This was done for “root (hd0,3)” which is Fourth partition on first hard disk

Note : Check The yes entries against three critical lines (check in the snapshot below) and the two succeeded  against the last two lines.

type quit to exit grub and restart the machine.


This post is actually for a good friend of mine.
Hope it helps anybody with this problem.

Follow

Get every new post delivered to your Inbox.