0

I have windows 7 and ubuntu installed on my hp pavilion. I partitioned the c: drive by shrink volume and created a simple volume in windows 7 . Then i shut down the laptop. After few minutes i started it and a black window appeared showing grub rescue>. What should i do to save both OS and all my data. Please help.

puneet
  • 1
  • Go on a Ubuntu live system and attach to your question a screenshot of Gparted and the output of ls -l /dev/disk/by-uuid/ – dadexix86 Jul 01 '16 at 07:09

2 Answers2

0

modifying your partition size also caused your partition ID to change. This means grub doesn't know from which partition to boot. Let's say, your /boot directory is on your 2nd partition, aka sda2, then, if your system has traditional BIOS (not UEFI): in the grub rescue do: linux (hd0,2)/boot/linux-image- and hit Tab for autocomlete (since I assume you don't know your kernel version) and enter, then initrd (hd0,2)/boot/initr and again hit Tab and enter. After that enter boot.

once booted, edit /etc/fstab as root and replace the old UUID with the correct UUID for each partition, which you get from the output of blkid. After that run update-grub as root.

0

0h thank god ! The problem is solved by the following commands:- grub rescue>ls (hd0,msdos3) error: bad filename grub rescue>set boot=(hd0,msdos3) grub rescue>set prefix=(hd0,msdos3)/boot/grub grub rescue>insmod normal normal [ hit enter after each command ]. Now after this i expanded c drive by deleting partition and now its working properly.

puneet
  • 1