Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hiiiiii everybody!!!
i had ubuntu 11.10
today i insatlled windows 7 and the follwed the following steps from a website to recover the grub after installation 1. Create NTFS partition using gparted.
2. Backup MBR using dd command e.g. “dd if=/dev/sda9 of=/mbr.bin bs=446 count=1″.
3. Boot Windows installation CD and install it onto newly created NTFS partition.
4. Boot into Linux live CD e.g. Ubuntu Live CD.
5. Restore MBR using dd e.g. “dd if=/media/sda9/mbr.bin of=/dev/sda bs=446 count=1″.
6. Reboot.
the problem is that when i start my system neither of windows and ubuntu start and system gets stuck showing something like |bes.|bes.
i have to use the live cd to use my pc....,
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855
Rep:
I have to ask why did you go through such elaborate steps when ubuntu could have installed grub on itself (and perhaps would have even located the windows partition and made it bootable? Why did you not install the grub from ubuntu? You can still install grub from the ubuntu cd/dvd and get things working.
As far as I understand 'dd' - I tend _not_ to use it very often I believe the if=/dev/sda (someone correct me if I am wrong) as I belive windozed mbr is on the sda and not sdax.
Hope this helps.
i am not able to do that from live cd however this is output of sudo bash boot_info_script.sh
Code:
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for on this drive.
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /bootmgr /Boot/BCD /Windows/System32/winload.exe
sda2: __________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 1232. But according to the info from fdisk,
sda5 starts at sector 62461952.
Operating System:
Boot files:
sda6: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda6 starts
at sector 63.
Operating System:
Boot files:
sda7: __________________________________________________________________________
File system:
Boot sector type: -
Boot sector info:
Mounting failed: mount: unknown filesystem type ''
sda8: __________________________________________________________________________
File system: ext4
Boot sector type: Grub2 (v1.99)
Boot sector info: Grub2 (v1.99) is installed in the boot sector of sda8
and looks at sector 129576144 of the same hard drive
for core.img, but core.img can not be found at this
location.
Operating System: Ubuntu 11.10
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
sda9: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
sda10: _________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: According to the info in the boot sector, sda10
starts at sector 63.
Operating System:
Boot files:
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 160.0 GB, 160041885696 bytes
240 heads, 63 sectors/track, 20673 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 * 63 62,460,719 62,460,657 7 NTFS / exFAT / HPFS
/dev/sda2 62,461,950 312,560,639 250,098,690 f W95 Extended (LBA)
/dev/sda5 62,461,952 107,354,111 44,892,160 7 NTFS / exFAT / HPFS
/dev/sda6 229,204,143 312,560,639 83,356,497 7 NTFS / exFAT / HPFS
/dev/sda7 186,329,088 190,326,783 3,997,696 82 Linux swap / Solaris
/dev/sda8 107,356,160 144,375,807 37,019,648 83 Linux
/dev/sda9 190,328,832 229,197,823 38,868,992 83 Linux
/dev/sda10 144,376,218 186,321,869 41,945,652 7 NTFS / exFAT / HPFS
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 7910F5E72B92A211 ntfs windows7
/dev/sda10 66B08088B0806103 ntfs
/dev/sda5 BE4837424836F92B ntfs Movie
/dev/sda6 84083AF3083AE3B8 ntfs Aagam
/dev/sda8 9ed5964e-61ff-4785-a755-bd2d60483b87 ext4
/dev/sda9 a2ef5948-9d8f-4530-9241-0a9fc022c9c6 ext4
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sda10 /media/66B08088B0806103 fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sda1 /media/windows7 fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sda5 /media/Movie fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sda6 /media/Aagam fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sda8 /mnt ext4 (rw)
/dev/sda9 /media/a2ef5948-9d8f-4530-9241-0a9fc022c9c6 ext4 (rw,nosuid,nodev,uhelper=udisks)
/dev/sr0 /cdrom iso9660 (ro,noatime)
=========================== sda8/boot/grub/grub.cfg: ===========================
it shows that grub2 is present in mbr in /dev/sda but i am not able to boot....
hmmm thats fine i got it.i used this in terminal and ubuntu started working with next reboot.... grub-install --root-directory=/mnt/ /dev/sda
THNX EVEYONE
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.