0

I have dual booted windows and Ubuntu 12.10 but Windows boot loader takes over grub and I can't boot ubuntu. I tried following instructions here: How can I repair grub? (How to get Ubuntu back after installing Windows?) but it requires knowing the partition in which ubuntu is installed.

I booted using a live cd and ran a couple of commands mentioned in that link:

The output of sudo fdisk -l is:

Warning: ignoring extra data in partition table 6
Warning: ignoring extra data in partition table 6
Warning: ignoring extra data in partition table 6
Warning: invalid flag 0xa9c7 of partition table 6 will be corrected by w(rite)

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe07a620e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      411647      204800    7  HPFS/NTFS/exFAT
/dev/sda2        10667160   441482264   215407552+   7  HPFS/NTFS/exFAT
/dev/sda3       441482265   594196479    76357107+   f  W95 Ext'd (LBA)
/dev/sda4       594198528   625142447    15471960    2  XENIX root
/dev/sda5       441482328   535382189    46949931    7  HPFS/NTFS/exFAT
/dev/sda6   ?  3966535220  2853430321  1590931199   98  Unknown

Disk /dev/sdb: 15.6 GB, 15606349824 bytes
116 heads, 52 sectors/track, 5053 cylinders, total 30481152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        8064    30481151    15236544    c  W95 FAT32 (LBA)

and the output of df -Th is:

Filesystem     Type       Size  Used Avail Use% Mounted on
/cow           overlayfs  1.9G  122M  1.8G   7% /
udev           devtmpfs   1.9G   12K  1.9G   1% /dev
tmpfs          tmpfs      384M  836K  383M   1% /run
/dev/sdb1      vfat        15G  794M   14G   6% /cdrom
/dev/loop0     squashfs   758M  758M     0 100% /rofs
none           tmpfs      4.0K     0  4.0K   0% /sys/fs/cgroup
tmpfs          tmpfs      1.9G  1.1M  1.9G   1% /tmp
none           tmpfs      5.0M  4.0K  5.0M   1% /run/lock
none           tmpfs      1.9G  144K  1.9G   1% /run/shm
none           tmpfs      100M   32K  100M   1% /run/user

I am not sure in which partition(sda1? sda2? sdb1?) is ubuntu installed. It would be great if someone could help me with this!

Jatin
  • 191

2 Answers2

0
  • Boot ubuntu live cd, and choose Try Ubuntu,then connect to the internet and type the following commands in terminal to install boot-repair.

    sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
    sudo apt-get install -y boot-repair && boot-repair

  • Click Recommended Repair.

Reboot the pc,you should get the grub menu with access to ubuntu.

Avinash Raj
  • 78,556
  • I tried that. It still loads windows 8 boot menu and not grub. – Jatin Nov 07 '13 at 14:22
  • please upload gparted screenshot on imgur.com and post the link here. – Avinash Raj Nov 07 '13 at 14:24
  • Here's the screenshot: http://i.imgur.com/JLvXLnj.png – Jatin Nov 07 '13 at 14:28
  • what are the options in the drop down list(located in top right corner of gparted)? – Avinash Raj Nov 07 '13 at 14:31
  • Two options: /dev/sda (298 GB) and /dev/sdb (14 GB) – Jatin Nov 07 '13 at 14:35
  • You doesn't have ubuntu installed on your hard-disk.Normally Ubuntu os was installed in ext4 filesystem,but there was no ext4 filesystem,and dev/sdb is your bootable disk. – Avinash Raj Nov 07 '13 at 14:38
  • But I have been using Ubuntu for more that a year on this system. It was only sometime back when I got the grub rescue error and then I used boot-repair but then it doesn't show the grub and shows windows 8 boot loader. It should be on the hard-disk! – Jatin Nov 07 '13 at 14:42
  • it was not in the hard-disk,i'm sure about that.I think you accidentally deleted the ubuntu partition. – Avinash Raj Nov 07 '13 at 14:46
  • okay... what will happen if I mount the wrong partition? – Jatin Nov 07 '13 at 14:48
  • i can't understand your question. – Avinash Raj Nov 07 '13 at 14:52
  • The top answer here: http://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows requires to mount the correct partition. I was wondering what'll happen if I mount the wrong partition. – Jatin Nov 07 '13 at 14:54
  • http://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows in this they boot up the live cd,mount the correct /dev/sda2 ubuntu partition,and by using the chroot method they go into the ubuntu installation files and then they update the grub.But you don't have any ext4 partition.From the link dev/sda2 is an ext4 partition.This method works if you mount a ext4 partition. – Avinash Raj Nov 07 '13 at 15:04
0

I couldn't start ubuntu 12.04.4 with XP, it was not found. I got my XP, nothing else. I installed grup2win and edited the grup list. The problem still was there. After consultinng Ease Partition Master I understood, I have my ubuntu on partition 6 (not 2 or 3 or 4...). After editing grup2win again, I got my Ubuntu.