Hi,
I have installed Windows 7 on my laptop . Now, it directly boot from Windows 7 . I think the MBR overwrote my grub . I have found two methods by google , but still does work .
1: boot from debian install CD, Alt +F2 switch to the console. "grub " "root (hd0,0)" "setup (hd0,0)".
2:boot from CD, mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt ; chroot /mnt ; grub-install /dev/sda.
I wonder if someone can help me , thanks very much.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
How to restore my debian's grub after installing Windows 7
Re: How to restore my debian's grub after installing Windows 7
Boot from your installer disk, in the bootloader-menu choose Advanced and System Rescue, answer the questions and choose Repair bootloader, done.
-
- Posts: 1740
- Joined: 2009-05-04 15:56
- Been thanked: 1 time
Re: How to restore my debian's grub after installing Windows 7
I usually use SysrescueCD for this. It has an option that lets you boot right into your installation so you can fix it from within using or Just use the boot command "rescuecd root=/dev/sda1" or whatever your root is. It will even work with LVM Volumes, like "rescuecd root=/dev/mapper/my_root_volume".
Code: Select all
grub-install /dev/sda
Code: Select all
aptitude reinstall grub
Re: How to restore my debian's grub after installing Windows 7
Download Super Grub Disk from here, burn it to a CD, and then boot from that. It will fix the problem.
AMLJ**0-1-47
Re: How to restore my debian's grub after installing Windows 7
smallchange wrote:I usually use SysrescueCD for this. It has an option that lets you boot right into your installation so you can fix it from within usingorCode: Select all
grub-install /dev/sda
Just use the boot command "rescuecd root=/dev/sda1" or whatever your root is. It will even work with LVM Volumes, like "rescuecd root=/dev/mapper/my_root_volume".Code: Select all
aptitude reinstall grub
thanks for your help . Its works.
However , there's still have one problem . that's is win7 keeps changing the boot flag! https://bbs.archlinux.org/viewtopic.php?id=88604
then , I reinstall my grub from my current /boot partition to MBR by doing as follows:
grub>root (hd0,0)
grub>setup (hd0)
when I reboot , I enter into grub bash line instead of boot menu.
I don't find menu.lst file in /boot/grub .
How could I fix it ?
by the way , I can only boot my system by inputing mass of command line such as kernel /vmlinuz-2.6......
Re: How to restore my debian's grub after installing Windows 7
If you use squeeze or sid, you will not have a menu.lst, because you they use grub 2. In this case boot in your system and do, as root,
If you use lenny, just create a menu.lst.
Code: Select all
update-grub
Re: How to restore my debian's grub after installing Windows 7
I do create a menu.lst in my /boot/grubTobiSGD wrote:If you use squeeze or sid, you will not have a menu.lst, because you they use grub 2. In this case boot in your system and do, as root,If you use lenny, just create a menu.lst.Code: Select all
update-grub
but after I installed it into MBR as follows:
grub>root (hd0,0)
grub>setup (hd0)
I reboot my laptop , it enter into grub bash console instead of grub menu .
I use find command to look for menu.lst
grub>find /boot/grub/menu.lst
there's no found file.
so , I don't know how to do with it . How to create menu.lst in grub.
Re: How to restore my debian's grub after installing Windows 7
In this case I would try to reinstall grub. Boot into your system and try this,as root:
This should generate a valid menu.lst in /boot/grub.
Code: Select all
apt-get --purge remove grub
apt-get install grub