My Weblog

WELCOME TO MY BLOG-TECHNOGEEK

Linux Issues ?? September 16, 2008

Some Common Linux Problems and Ways To Resolve Those Issues

Problem1 :

Mounting NTFS drive in Debian/Ubuntu.

Do This :”fdisk -l” to list your drives and there partitions.

then look for the NTFS ones you want, and to mount them first

make a folder to mount it to

“sudo mkdir /media/windows”

then mount

“sudo mount /dev/hda5 /media/windows -t ntfs”

note: replace /dev/hda5 with what ever fdisk says is your ntfs partition is

Theres a better way of mounting it if you bothered to check the ubuntu guide.

edit fstab to make them mount on boot up “sudo vi /etc/fstab”

For More Information :

Ubuntu Guide: How to mount NTFS on startup:

www.ubuntuguide.org/#automountntfs

Prob 2:

How to restore GRUB to a partition or MBR with an Ubuntu Live CD

Sometimes, if an Ubuntu installation goes wrong, or a Windows NT bootloader overwrites MBR and doesn’t recognise the Linux installation, we have to restore our GRUB bootloader that is, generally, very flexible.

First of all, we burn a Hardy Heron (Ubuntu 8.04) ISO (on a CD(R , RW) or DVD (+R , +RW)) or make sure that we have one already.

Then, we change, in the BIOS, the boot load sequence and we put the CD/DVD option first.

After that, we boot the Live CD, we choose the first option and in a few minutes we have arrived at the Live CD Desktop.

So, we go :

 Applications --> Accessories --> Terminal

Then, we have to remember which is our Ubuntu installation partition.

In our example, it is the second one (/dev/sda2), formatted as ext3, in the first HDD of a SATA controller. We suppose that it is the second one, since, in case we have Windows that demand to be in the first partition (/dev/sda1), this one is occupied.

Now, you have to be really careful. You have to enter the right partition, instead of sda2 (unless it is the same) In the terminal :

  cd /

  sudo -s -H
  mount -t ext3 /dev/sda2 /mnt
  mount -t proc proc /mnt/proc
  mount -t sysfs sys /mnt/sys
  mount -o bind /dev /mnt/dev
  chroot /mnt  /bin/bash

And now, you are actually “running” Ubuntu within the Hard Drive but through Live CD’s terminal.

Now we restore GRUB like that:

1) Restoration to MBR

  grub-install /dev/sda

2) Restoration to partition (example: /dev/sda2)

  grub-install /dev/sda2

In the first case (that is the most usual) you have certainly installed GRUB on MBR after you receive, in the terminal, the message that there are no errors.

After you reboot, you have your favorite bootloader restored.

Alternatively, mount the / and /boot folders you want to boot into and just pass the –root-directory argument into grub-install, there is no need to chroot anymore.

 

One Response to “Linux Issues ??”


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.