Debian Configuration :: How To Restore My Debian's Grub After Installing Windows 7
Sep 5, 2010
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.
My computer initially had one hard drive, with Debian Lenny 5.0.4 installed. I haven't done any special configuration, so upon boot, I was presented with the GRUB kernel select menu, then gdm, etc. I think I used the Debian installer's 'use entire drive with LVM' configuration.
I then added a second hard drive, with the intention of installing Windows XP on it. After I installed XP on this second drive, I found out that it had overwritten the MBR on the first drive. (It was my intention do use the BIOS' F8-key boot menu to choose between the two drives, each with their own distinct boot loader. The two drives and OS's would be completely independent.)
Using my Debian installer CD, I think I have GRUB installed on the first drive again. I've found a number of tutorials which say I can use 'set' and 'linux' to boot the system, but the linux command always returns a file not found error.
I think my LVM filesystem is still intact, as the Debian installer's fdisk reports it, it can also chroot to it and my installation appears to be intact. 'ls' within GRUB shows (derek-swap_1) (derek-root) (hd0) (hd0,1) (hd0,2) (hd1) (hd1,1) (fd0) . 'derek' was the hostname I used.
I would like to simply restore the system to the way it was before: with the standard GRUB that comes with Debian 5.0.4, which then boots into the debian with my LVM filesystem. Is there a way to do this from the Debian installer CD? (I was hoping there would be a 'dummy install' command which would install GRUB and configure it properly, but leave all my existing partitions and filesystems intact.)
I have a ~ 2008 notebook (Compaq CQ60-137EL) on which I had Windows 7 only (it was sold with Windows Vista installed).
Later I installed Debian Jessie 8.2.0 Stable ("Graphical expert install" from DVD), along with GRUB as a boot manager (I chose not to install it on the EFI removable media path).
Since then, if I select Windows 7 on the GRUB boot screen, I see "Starting Windows...", and after few seconds the screen flashes for a moment, and then the PC reboots: I see the bios screen, followed by the GRUB screen again. What's even more weird about this is the fact it just happens only in like ~50% of the cases. In the other 50%, Win7 starts flawlessy.
I even tried to install Debian first, then Windows 7, then re-install GRUB, but I got the same issue, even with both system freshly installed.
On 6 attempts, 3 times it worked and 3 times it didn't.
On my desktop PC I'm in the same setting, but I don't have this issue. I think it may be related with the fact I have Win7 on a SSD and I installed Debian on a separate HDD, while on my notebook, as you can imagine, there's just one single HDD.
Im running Squeeze (in VirtualBox on a Win host), and I need to clone my drive to a bigger one and boot from that drive. I used gparted from a live cd for the cloning, and got the following result with fdisk -l:
Disk /dev/sda: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes
have an Intel Core2 Duo system that would dual boot via GRUB between Windows Vista and Fedora 10. I recently attempted to upgrade from Vista to Windows 7, however because the version of Vista I had would not upgrade to Windows7. This has removed the ability to boot into my Fedora 10 installation. After some brief research on the Internet, I created a Live CD of Fedora 12, and booted into that. Accessing the terminal I tried typing:
[liveuser@localhost ~]$ su root [root@localhost liveuser]# grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB
[code]....
Error 15: File not found
What is needed so I can restore GRUB on my system and boot into Fedora again?`
I recently installed Debian, and its great except hardware config, any way already fixed that, I reinstalled windows 7, and it removed Grub I tried reinstalling it, and reconfiguring it no luck I've booted into Debian using a boot CD.
I have 2 HDDs, and under linux, sda is ntfs, sdb is ext4 of debian jessie, the booting order is sdb ( it contains the grub on sdb's MBR) then sda, the windows boot loader on its own MBR.
The sda was win8, but now just formatted it and did a fresh installation of win10. After power off PC and plug the sdb up again. Turn on the power, setup the booting prior as same as above, but, the grub can not realize the windows 10 boot sector, error message is: no such device /dev/sda1... (and following a digit array) 8xxxxxxxxxxxx....
How to config grub in order to make it can dual boot both Operating System?
Upon booting, the existing grub menu shows the Debian OS, but I also have Ubuntu installed on the same hard disk. It does not show in the menu. Previously I had Debian, Ubuntu, and Mint. In Ubuntu config file (menu.lst) I wanted to delete Mint and an old Ubuntu. I did so. In doing this I must have removed the 'full' menu.lst,leaving only Debian. So now I cannot boot into the new Ubuntu. I presently have only two OS on the hard disk: Debian and Ubuntu. I cant see Ubuntu, How do I correct this problem?
I have a Debian Jessie 32 bits machine with standard partitions : one EFI, one for the root system and a swap.
I did a dd image backup of it hard drive thinking i would be easy to restore it or clone to another device... but it seems it is not that simple ! My PC won't boot : no bootable drive found !
I did the same once with a 64 bit Debian Jessie which i fixed using an ubuntu live CD with boot-repair, but here with the 32 bits version it doesn't work : it keeps saying i have an EFI incompatible partition and i should use a 64 bits linux...
Note : i boot-repair from a 64 bits ubuntu live cd. Should i use a 32 bits version ? Because i can"t make a 32 bits Debian live CD to boot, usb key won't show up in boot options (32 bits install CD works fine)
I ha read some things and tried some others but nothing works
Grub and EFI are really obscure for me...
How could i fix my debian 32 boot ?
Or how can i properly clone my debian 32 on other PC ? am i missing something using dd ? should i use another tool ?
After resetting a pc running lenny I get iptables errors at boot ("resource temporarily unavailable", "bad rule" etc). "setting up firewall" (Guarddog) is not followed by any errors and the firewall apparently operates ok.How can I restore my iptables to the default installation values?
A few days ago I installed my first Linux product, which is Debian 6.0, and I installed the GRUB booting device on my main boot record, as it was suggested that it was a harmless step to take. Unfortunately, some quirk in my system made GRUB believe that I had XP when in fact I have Vista, so the options I have now are to boot Debian or to boot XP which is not on my computer. In other words, I have to get rid of GRUB now, but I'm realizing that he's not such an easy customer to kick out. I have moved my Linux installation to another drive, but the old GRUB always stays in place, and my Vista is stuck there frozen for eternity. So after considering all kinds of possibilities, I have come to the conclusion that the easiest way to restore my original boot record would probably be to find its backup copy that I assume the installation program made, and to copy it back into the right address at the beginning of the disk. I don't have the Vista recovery CD, so I really have to do this manually. So now my questions are these: did the installation program make a copy of the boot track, and if so, where did he put it and under what name, and finally, what command can I use from within the Debian terminal, which is now my only tool left, to copy the content of thesaid file into the first 512 bytes of the hard drive? I know that would be a simple matter for any serious geek, I guess I must be a little rusty. Anybody feel up to it?
I had an older PC on which I had two SATA drives and an IDE one and on the latter I had Windows 7 installed (I kept it on that drive since I'm not using Windows 7 that often, I'm primarily using Debian as my daily go-to OS), but since then I got a new PC which has no connectivity for IDE, so I had to decommision the drive, and before I did that, I backed up the Windows 7 partition (and the second partition which I used mostly for storing sofware and stuff that I wouldn't want to get wiped after a fresh Windows install) using dd.
Not reading up on this on the internet, doing so with the intention to restore the partition image on the same spot on the disk, but since the SSD is larger than the IDE drive, I made the partitions on it bigger, so there's no chance the Windows 7 partition to be on the same spot on the disk. I tried booting into Windows 7 from GRUB after it successfully detected the Win7 install on the second partition on the SSD, but it just leaves me with a blank screen with a blinking white cursor, so I'm guessing it's not going to fly again. So my question to you: is it possible to ressurect the Windows 7 installation, avoiding having to reinstall Windows? (which would severly complicate things, having to backup and wipe the Debian install I have on the first partition...)
So far I've tried this to fix the Windows 7 install by pointing at the right disk "coordinates": [URL] ...., but I can't seem to get it to work, all I get is some error in regards to not being able to detect the disk's geometry (I think it was the number heads I couldn't figure out to input in the command line), so I couldn't fix it.
I'm working directly in an Ubuntu Virtual Machine (VM). Some updates (like kernel) were available at the update manager.If I weren't using a VM, I wouldn't update it since it's a risk to break something. Since it's a VM, you can create a Snapshot or export an appliance and restore if something goes wrong.Suppose I'm not using a VM with a Debian/Ubuntu installation. Is there a install-restore approach that doesn't depend in a VM configuration to restore your system exactly before an upgrade (Like a "Restore Point" in Windows), being easy to restore like a VM appliance?
Do i have any chances to restore my windows partition table after tried to install debian and i used the entire disk instead of the free space i had alocated for this
after i figured out what i did i stoped the installation but was to late ... i answered yes at write partition table changes on disk question
i tried win7 automate recovery tool from dvd and manual install of mbr with no successful result
My girlfriend got a 'new' (second hand) laptop, a HP Compaq 6715s. When I tried to install Debian on it, the install went immensely slow - glacial, even. It was a very minimal install but it tooks hours to get to nowhere.
I found out online that this was because of a problem between the current kernel and the hard drive (or HD bus, something hardware-y to do with the disk) which meant file operations were extremely slow. I thought "easy, patiently install Debian and then install newer kernel". Except that after six hours, the install wasn't even halfway.
So I install Arch Linux with the 2.6.35 kernel: no problems with the drive speed at all. After a lot of researching (I only played around with Arch once, more than a year ago) I got the system into a usable state. But now wlan0 has suddenly disappeared, together with some other problems - and a usable laptop wasn't exactly what I had in mind, it was supposed to be awesome (or at least good). Which, with Debian, it would be
So... is it possible to make a Debian installation use a later version of a kernel? I'd want to install Debian with the 2.6.35 kernel, not install Debian and then afterwards update the kernel (because I don't have 24 hours to install an OS, if it'll ever even install).
I've found some stuff online but it might well have been written in the Cyrillic alphabet. All I understand, I think, is that in theory it's possible.
I have downloaded the entire Debian 5-dvd set. I want synaptic, apt-get and aptitude to first check online if there's a new version of the packages selected to install, if there's a new version, then get the packages online and install, if not, then ask to insert the corresponding dvd and install from that. Is there anyway to configure this?
I have a fresh install of Debian Squeeze AMD64 which I'm trying to install KVM on. I have no idea what I'm doing so I figured someone on these forums might be able to explain it. I have already verified VT support and enabled it in the bios. I have googled and read about KVM installation but everything I can find is either confusing or doesn't work. Also I am trying to install it from source because I want to experiment with modifying it later.
I just installed debian squeeze and at finish it asked me if it write the MBR with gurb. I say yes, but after restarintg, squeeze doesnot appear in grub. I also have debian lenny in the same PC. I installed debian squeeze in
When I choose it from grub menu, seems to run, but in 5,6 seconds it stoped and tell me doesnot find some files, like /proc, /etc/fstab, etc... Files I have in /boot (in squeeze particion) are:
I have a Insprion 14R (N4010) and when I hibernate it will usually restore without a problem, but maybe 15% of the time it will reboot while loading. I would like to figure why, since I'd rather not lose anything... My swap space is 5.9GB, I have 4GB RAM (video uses 1gb, so I have 3gb usable)
I have a Knoppix DVD-ROM. I also have its image as k.iso at the second partition of HDD of my laptop. I use the DVD-ROM and write at the boot prompt the cheat code:
knoppix bootfrom=/dev/sda5/k.iso
I also have a folder Knoppix made during bootprompt by using the cheatcode knoppix tohd=/dev/sda5 and I can use the following cheatcode while booting from the DVD-ROM, like knoppix fromhd=/dev/sda5My laptop runs Debian Lenny 5.0.4, installed in the first partition of my HDD. Can Grub be configured to boot from the Knoppix k.iso image, or the knoppix folder, which I use to use the Knoppix OS, so that I am freed from using the DVD, when I want to use the knoppix system?
I am trying to dual boot my system. MS Vista and Debian lenny 5.05. Installed Vista first, need vista for voice recognition software. Installed Lenny second but grub does not see Vista. Installed NTFS-g3 so I can read and write to /dev/sdc1 where my vista is. But grub still does not detect it. Installed grub2 and upgraded from legacy but still grub2 does not see the vista partition.
I have happily been booting debian through grub2 by chain loading it with efi (rEFIt), until today, and now get to begin another learning experience I've been using linux for a while, and kept seeing the guides for splitting up /, /var, /tmp, /usr, and /home, into different partitions, so I did just that when I switched from Ubuntu to Debian (I've realized that this was a little bit pointless because I formated them all as ext4, but at least it acts as a safety for mission critical drives when I overfill /home. I unfortunately didn't give /tmp enough space, and it kept crashing SimpleScan so I decided to use gparted to resize it.
The operation went alright as far as I can tell, and was straight forward because there was some free space behind it so I only had to append the partition. I synced the master boot record through rEFIt as usual, but when I booted the linux partition grub did load, and only a blank screen is presented. I eventually figured out I could use the gparted live cd to boot back into debian, and have been screwing around for a while with grub commands trying to figure out how to allow rEFIt to successfully boot GRUB on its own again. I ran grug-mkconfig to replace my /boot/grub/grub.cfg file and have rebooted but that did not help.
I tried reinstalling grub and grub-common with apt-get, but I didn't purge configuration settings for fear of losing something important. My current focus is on the command grub-install. I think i just need to run this command with the /boot device, like su - root; grub-install /dev/sda1 or some thing like that. wipe out the MBR on /dev/sda1, or screw up what good configuration is left in grub, so I want to make sure that I'm using the right /dev. Currently the gparted output looks like this:
/dev/sda1: fat32 - GPT (gpt from fdisk, gparted shows EFI with the boot flag) /dev/sda2: hfs+ - MacOSx /dev/sda3: ext4 - /root
[code]...
how the gnome live gparted disk would have been able to boot. I have access to a hard drive so I'll probably end up making backup images of as many of the partitions as I can, and then try more drastic bashing around, but if anyone has any suggestions/wisdom they could offer while I'm researching solutions I'd appreciate it. I eventually want to try to axe my osx partition and boot directly from GRUB2-EFI so I figure it is worth the investment in time to get to know grub a little bit more intimately.
I've been following grub-common bug #606845 and in coming to a solution for the issue, these guys are using dd as a brute force means of swapping out master boot records or trampling them, if you prefer. (Background: The issue is related to grub and certain xp installations)
An sample snip of code: dd if=/mbrxp.bin of=/dev/sda bs=512 count=1 1) Is mbrxp.bin a back-up of the mbr taken before installation of squeeze (or grub in general)? 2) Am I fubar if I didn't make a back-up of the mbr before installing grub?
We had a server failure this morning because grub was throwing error 15 (file not found). We discovered that the disk had changed names from hd0,0 to hd1,0. Making the appropriate replacements in menu.lst fixed the problem, but I'm still wondering what could have caused the spontaneous name change.
here are some other possibly related tidbits: * the server had been down because of a power loss, but it is behind a UPS so i doubt there is any electrical damage * eth0 also temporarily failed but the system failed over to eth1
My current theory is that when the bios was configuring the hardware the loss of eth0 shuffled around the addresses of the remaining hardware on the pci bus, which somehow caused the hd0/hd1 confusion. The problem is that everything i've read [URL] says that the drive assignment should be based on the way the disk is connected to the motherboard (which in this case didn't change)
I installed Debian GNU/Linux and Debian GNU/kFreeBSD on the same system. I didn't reinstall grub with kfreebsd, because I figured running grub-mkconfig would modify grub.cfg. But it didn't.It recognized the Debian GNU/kFreeBSD as GNU/Linux (6.0.1):
### BEGIN /etc/grub.d/30_os-prober ### Found Debian GNU/Linux (6.0.1) on /dev/sda3 ### END /etc/grub.d/30_os-prober ###
Installed Debian 6 last night after using Ubuntu for close to 3 years. Couldn't believe how wonderful everything was put together and working, with some minor beginning glitches (like nvidea 3D drivers not working) which were to be expected.
But now I'm sitting back in Ubuntu because I can't get Debian started from Grub anymore. The Grub menu is still there and the selections work fine too. I honestly have no idea what caused this. Last thing I was doing in Debian took place in the Software Center where I was installing some GTK+ themes and looking for some general utilities. I did find a Boot Logo/Login changer, at least that's what I think it was, and when I clicked on install ... I received a message that that application was already installed (must have been by default or through synaptic perhaps).
Anyway, as soon as that message cleared out, perhaps 2 or 3 seconds later the screen crashed and everything went black ... I'm assuming that the xerver crashed. Did a CTRL, ALT, DEL which successfully restarted the system. Got back to the grub menu, selected Debian, and got the black screen again with a login for a user, followed by the password request. Knowing next to nothing about Debian I was obviously stuck at that point. Then I tried the recovery console, and exactly the same thing happened.
Rebooted again, got back into the recovery console, and this time, after adding my user name and password, used CTRL + D which caused a ton of text to appear on the black screen. Near the end of it came a FAILURE message ...
Startpar: service(s) returned failure: gdomap failed: