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!
/dev/sda (298 GB)
and/dev/sdb (14 GB)
– Jatin Nov 07 '13 at 14:35ext4 filesystem
,but there was no ext4 filesystem,and dev/sdb is your bootable disk. – Avinash Raj Nov 07 '13 at 14:38grub rescue
error and then I usedboot-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/dev/sda2
ubuntu partition,and by using thechroot
method they go into the ubuntu installation files and then they update the grub.But you don't have anyext4 partition
.From the linkdev/sda2
is an ext4 partition.This method works if you mount a ext4 partition. – Avinash Raj Nov 07 '13 at 15:04