Debian Installation :: Grub 2 Not Setting Boot Record?
Mar 21, 2011
I've been using squeeze for a year or two now, on a PC dual booting with windows xp. Not long ago I thought that, as it's now become the stable release version, I'd do a fresh install, which I've been trying to do with the first two dvds. The installation proceeds as expected, up to and including setting grub. However, although grub saysthat it has detected windows xp, and I tell it to set up the dual boot, the computer on reboot goes straight into windows xp, with no on-scrteen option shown for choosing debian.
I have recently installed Debian alongside Vista on the same boot menu using the GRUB booting device. Only problem is, I couldn't boot Vista at all any more, so I removed my Debian installation from that drive. But the GRUB boot record persists, I don't have the Recovery disk to restore my old system, so I have to find a way to manually remove the GRUB track and put the old record in its place. I assume there was a copy made of it by the installation program, now my only problem is to find that file and copy the content back in place (at the address at the very beginning of the drive) all that by using Linux code, since that is all I have left. Being new to this game, I have no idea how to begin writing the right command for a job like this
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 think I managed to corrupt my master boot record, or have a very intractable problem with Grub.
I'm not sure how I did this, but my desktop will boot Ubuntu fine from a USB, but every time I try to install it, the install seems to go fine, but when I finish the install and the machine tries to boot the OS from it's hard drive, it does not work. The monitor does not get a signal and it just goes to sleep.
I tried posting here to resolve the problem before, tried everything on this thread: [URL]
But nothing worked.
I have even tried running the system from a USB, running a "shred" command for the hard drive and then reinstalling - my theory was that the shred command would destroy all the data on the hard drive anyway, and allow a "clean" install from whatever was corrupt on it, but no luck - when I installed Ubuntu on the hard drive, same problem.
I'm not clear where the problem lies now, I'm assuming there is something up with it's master boot record, but there are no partitions on it's hard drive and I started with a completely blank, unformatted drive.
i installed ubuntu inside windows but someone instead of uninstalling it directly deleted the ubuntu folder inside windows ,thinking that the partition will be deleted. but when i restarted the system and command prompt came and said unable to find boot record and i couldn't boot windows as well and a grub prompt came like grub>, then i inserted the windows boot cd and repair the boot record error but my problem is , instead of doing this way, can i do so by grub prompt directly without using winidows cd.
I was installing sqeeze i386 on my laptop VOSTRO 1400 and got this the 'grub-pc' package failed to install into /target/. without the GRUB boot loader, the installed system will not boot.
Im finally deleting vista from my disk, but as I am game addict I will re-install it afterwards just for games. Now I assume that will overwrite GRUB, so how do I restore boot record and at same time keep my grub config?
Is there a way to re-install grub on the master boot record of a hard disk using a live cd?If so will i have to configure it?I'm trying to install a linux distro on my ao751h(with poulsbo ) but i after installing it i can't boot.I get an error 15 or a flashing underscore.I have already tried ubuntu,debian,mint and slackware(LILO isn't compatible with poulsbo).Also,does anybody experience problems with the ubuntu 10.04 and 10.10 installers or is it only me?when i choose the language and keyboard settings the installation stop as it is and i get a crash report.
I rebooted, and got a new GRUB error: recordfail=1 if [ -n ${have_grubenv} ]; then save_env recordfail; fi set quiet=1 insmod ext2 set root=(hd0,2) search --no-floppy --fs-uuid --set 7b4afbe0-28fe-4403-bd86-c4364bf10f98 linux /boot/vmlinuz-2.6.31-16-generic root=UUID=7b4afbe0-28fe-4403-bd86-c4364bf10f98 ro single initrd /boot/initrd.img-2.6.31-16-generic
I am new to Debian but have some basic experience with Linux and am currently trying to triple boot Windows 7, Fedora 16, and Debian on an HP Pavilion dv7. I have the Windows Boot Loader on my MBR because I've heard that Windows updates can cause boot issues if GRUB is installed there. This means that I've been installing GRUB in the /boot partition for each Linux distro and creating corresponding entries in the Windows boot menu.
This has worked in the past with both Fedora and Ubuntu, but I have not been able to work around it with Debian. When I choose my Debian option in the Windows boot loader, it loads GRUB but hangs after it prints "Welcome to GRUB!", and I have to restart the computer. I would like to hear what more experienced Linux users have to say both about why this isn't working for Debian and about if keeping the WIndows boot loader is the right way to go.
Also, here is my partition layout:
Partition 1: SYSTEM (HP pre-installed) (209 MB) Partition 2: Windows Partition (472 GB) Partition 3: Extended (160 GB) 1: /boot for Fedora (524 MB) 2: Physical Volume for other Fedora partitions (79 GB) 3: /boot for Debian (749 MB) 4: Physical Volume for other Debian partitions (80 GB) 118 GB free space Partition 4: HP_TOOLS (HP pre-installed) (108 MB)
I'm trying to configure GRUB to boot XP preferentially- my wife insists. Having looked up the GRUB manual I see that I can set this using the default command.
The problem is, when I go to my grub command line default is not a recognized command. If I hit TAB for a list of commands, it isn't there.
I think I'm using some 0.9x version of GRUB, since the partitions etc seem to be numbered starting at 0, not 1.
While I'm at it, I was just going to play around and figure this out, but: the menu interface lists five versions of Ubuntu (all those weird kernel variations) then XP. So would XP be default 1 or default 5?
I Just updated my 10.04 LTS system, which dual boots Windows XP. Prior to the update the default was to boot to XP, now it is to Memtest.
I tried to edit /etc/default/ grub and make the default be 14 instead of 12, which would be XP, but Ubuntu, (using gedit), refused to accept my change.
I don't have a problem scrolling around to pick XP, or the latest Linux kernel to boot, but my wife sure does. How can I make Ubuntu/Grub default to to XP ?
I have an hp pavilion 15-b106ed with UEFI. I disabled secure boot and installed debian jessie form the CD1 iso (RC1 installer) burned to an USB key. Installation went smoothly, but after rebooting I get grub's terminal-like screen saying:
"GNU GRUB version 2.02 beta2-9ubuntu1. Minimal BASH-like line editing is supported... etc"
The problem is that as soon as I turn on the computer that grub screen shows up and I can't boot from USB anymore nor access the BIOS settings, no matter how fast I press F9, F10 and such. I guess I have to tell him to boot from the USB using the grub terminal...
I just netinstalled Squeeze to a netbook with Windows7. The installation went well without any problem. Linux is also working OK. When I boot now, grub does not show Windows7. I took default settings during installation. I mean I did not do anything special. What should i do to fix it? Should I run osprober and grub-update?
I recently bought a netbook on which Windows 7 Start Edition was installed. I partitioned the disk to install 2 other linux distributions : Backtrack 4 and Debian Lenny. Here is my partition scheme :
Disk /dev/sdb: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xc6a9bf3e [Code]...
Partition table entries are not in disk order During both of the installs, I chose to install Grub. Unfortunately, when I start my netbook, it launches Windows 7 automatically and I do not see grub...
There are lots of OSs and Linux dists to install on your netbook, and I want to make it as easy as possible to install, remove and switch between them.
Just installing a dist and then another one after it will replace the GRUB boot screen every time, and some dists might override previous GRUB menus entirely.
On a previous machine I created a GRUB partition which chain-loads GRUB for each dist, but now I can't remember how I did it.
The hard drive is currently empty, since I started playing around with repartitioning. What is the easiest way to install GRUB to a partition? Links are welcome, but please no generic "install GRUB" guides because the ones I've found haven't been relevant to my particular situation (empty hard drive, multi boot environment, no CD/floppy)..
Since I have been using grub-legacy in quite an unorthodox manner, and ironically, getting benefits that an otherwise obedient user wouldn't even dream of getting, this question may, most probably, pose a challenge to all those who don't understand the filthy tricks of grub. So, here I am, trying to install grub, in a manner, that makes it independent of all operating systems on my computer. As I understand it, a bootloader is so important, especially when it is used to boot multiple OSs, that I deem it mandatory for it to be installed in a manner making it independent of all operating systems it is used for.
What I did till now:I have a 24 Mega Byte partition to which I copied /boot/grub/*I run the command: # grub-install --root-directory=/mounted-partition-holding-the-copied-files '(hd0)'Grub boots, but the menus are not displayed presenting me with a cute shell with limited commands. My next strategy in this battle, is to copy the device.map and grub.cfg files from a working installation - a sort of a heart transplant.
My Toshiba Satellite C870-198 has Debian 7.7 installed in UEFI mode alongside Windows 8.1. The GRUB menu no longer displays, but the machine boots straight into Windows.
I can boot into Debian or Windows from rEFInd installed on a USB stick. The rEFInd menu has the following entries:
The Debian entry actually launches the GRUB menu which was installed with Debian.
Code: Select allBoot Microsoft EFI boot (Boot Repair backup) from Basic data partition. Boot supposed Microsoft EFI boot (probably GRUB) from Basic data partition. Boot EFIubuntugrubx64.efi from Basic data partition. Boot EFIdebiangrubx64.efi from Basic data partition. Boot bootootx64.efi from Basic data partition. Boot vmlinuz-3.2.0-4-amd64 from boot.
In an attempt to fix GRUB I executed the commands in the 'Reinstalling grub-efi on your hard drive' section of: [URL] ....
Code: Select allmount /dev/sda1 /boot/efi ... surprisingly returned: Code: Select all$LogFile version 2.0 is not supported. (This driver supports version 1.1 only.) $LogFile version 2.0 is not supported. (This driver supports version 1.1 only.) Did not find any restart pages in $LogFile and it was not empty. The file system wasn't safely closed on Windows. Fixing. Code: Select all[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
... returned "EFI boot on HDD".
[Code] ....
... Where is Debian?
FULL HISTORY .... =============================
The laptop came with Windows 8 preinstalled. I switched off Secure Boot and installed Ubuntu for UEFI dual boot. I recall having to use Boot Repair to get the GRUB boot manager working properly for both systems.
Recently I decided to replace Ubuntu with Debian 7.7 and first cloned the entire hard drive to a USB drive (The Clone Drive). This drive successfully boots into Ubuntu in UEFI mode.
Following this I took the opportunity to update Windows to 8.1, which broke GRUB as expected, so that the machine would only boot straight into Windows.
I installed Debian from a live USB stick in the mistaken belief that it would be bootable in UEFI mode. It did boot OK in legacy mode.
I then burned the full Debian 'DVD' image to a USB stick, booted it in UEFI mode and reinstalled Debian. In UEFI mode GRUB allowed me to boot into both Debian and Windows.
At this point I tested The Clone Drive. It was still able to boot into Ubuntu as previously, but after powering down, unplugging The Clone Drive and rebooting, the GRUB menu failed to appear and the machine booted straight into Windows. This is its current state.
I'm inexperienced in Debian. I have a dual-boot machine (64-bit, Debian 7.3, Windows 7, legacy boot) and encouter a problem at boot ever since I completed the installation of Debian 7.3 alongside the exising Windows 7. This machine has six hard drives: two are intended for ntfs storage of general data (raided together by RAID1); two more are intended for ext4 storage of general data (also raided together by RAID1); the fifth contains the Windows OS files and the sixth contains the Debian OS files. The problem is that I arrive to the grub_rescue each time at boot, seeing the message:
GRUB loading. Welcome to GRUB!
error: no such device: e081517b-3399-4067-9294-8f0686f753ca. Entering rescue mode... grub_rescue>
I've been using Debian for a few years but always on dedicated boxes and/or VMs.
Finally decided to dual boot Debian and Windows on my main Desktop PC.
Installed as I normally would using, however this time using a seperate drive (one for the existing Windows 10 install and the other for Debian), Debian install detects that windows has an EFI partition and sticks an entry in there, which is fair enough, and everything working fine. Then I spent some time configuring all my software and set it all up just the way I like it. I've rebooted Debian a few times to check it's working correctly and it is.
The issue arrives when I reboot and load into Windows 10. It boots fine.
However after a further reboot GRUB no longer loads... and the machine just boots directly into Windows 10.
After doing some further digging into my EFI partition (and reinstalling various times) it would appear that after a reboot Windows 10 deletes the entry GRUB creates in my EFI partition after EVERY reboot.
Done some googling and most people advise turning off 'fast boot' in Windows as it locks certain partitions to facilitate the machine going into hibernation, only to find that it's always been turned off on my machine (I recall due to a driver issue with my graphics card this had to be turned off when I installed Windows 10).
I've found this article on the Ubuntu forums : [URL] .... however I've tried their steps and windows is still doing a hostile takeover of my EFI partion after a reboot!
Any way to stop Windows 10 from interfering with my EFI files after a reboot? (without doing the obvious thing and kill Windows off).
I've had to give up trying to install linux. It just won't work on my machine, a Presario 6370us that has been upgraded over the years such that it is not compatible with linux, apparently. (You can read my travails elsewhere on this board; thanks very much to all who tried to help.)
Now, how do I remove the GRUB boot loader from my system? I need the system to boot directly to Windows XP.
I can't start linux in any way, shape, or form, so I need to either edit GRUB inside the GRUB environment itself, or to do so from Windows.
Ideally, I'd like to remove GRUB entirely. Failing that, I'd like to edit the GRUB config file so that only Windows is an option. Failing that, I need to make Windows the default OS.
I am running a 14 disk RAID 6 on mdadm behind 2 LSI SAS2008's in JBOD mode (no HW raid) on Debian 7 in BIOS legacy mode.
Grub2 is dropping to a rescue shell complaining that "no such device" exists for "mduuid/b1c40379914e5d18dddb893b4dc5a28f".
Output from mdadm: Code: Select all # mdadm -D /dev/md0 /dev/md0: Version : 1.2 Creation Time : Wed Nov 7 17:06:02 2012 Raid Level : raid6 Array Size : 35160446976 (33531.62 GiB 36004.30 GB) Used Dev Size : 2930037248 (2794.30 GiB 3000.36 GB) Raid Devices : 14
[Code] ....
Output from blkid: Code: Select all # blkid /dev/md0: UUID="2c61b08d-cb1f-4c2c-8ce0-eaea15af32fb" TYPE="xfs" /dev/md/0: UUID="2c61b08d-cb1f-4c2c-8ce0-eaea15af32fb" TYPE="xfs" /dev/sdd2: UUID="b1c40379-914e-5d18-dddb-893b4dc5a28f" UUID_SUB="09a00673-c9c1-dc15-b792-f0226016a8a6" LABEL="media:0" TYPE="linux_raid_member"
[Code] ....
The UUID for md0 is `2c61b08d-cb1f-4c2c-8ce0-eaea15af32fb` so I do not understand why grub insists on looking for `b1c40379914e5d18dddb893b4dc5a28f`.
**Here is the output from `bootinfoscript` 0.61. This contains alot of detailed information, and I couldn't find anything wrong with any of it: [URL] .....
During the grub rescue an `ls` shows the member disks and also shows `(md/0)` but if I try an `ls (md/0)` I get an unknown disk error. Trying an `ls` on any member device results in unknown filesystem. The filesystem on the md0 is XFS, and I assume the unknown filesystem is normal if its trying to read an individual disk instead of md0.
I have come close to losing my mind over this, I've tried uninstalling and reinstalling grub numerous times, `update-initramfs -u -k all` numerous times, `update-grub` numerous times, `grub-install` numerous times to all member disks without error, etc.
I even tried manually editing `grub.cfg` to replace all instances of `mduuid/b1c40379914e5d18dddb893b4dc5a28f` with `(md/0)` and then re-install grub, but the exact same error of no such device mduuid/b1c40379914e5d18dddb893b4dc5a28f still happened.
[URL] ....
One thing I noticed is it is only showing half the disks. I am not sure if this matters or is important or not, but one theory would be because there are two LSI cards physically in the machine.
This last screenshot was shown after I specifically altered grub.cfg to replace all instances of `mduuid/b1c40379914e5d18dddb893b4dc5a28f` with `mduuid/2c61b08d-cb1f-4c2c-8ce0-eaea15af32fb` and then re-ran grub-install on all member drives. Where it is getting this old b1c* address I have no clue.
I even tried installing a SATA drive on /dev/sda, outside of the array, and installing grub on it and booting from it. Still, same identical error.
I've set up a dual boot system with Debian and Windows 8, both installed on their own drive, with their own boot partition. I installed eveything in UEFI-Mode with fast- and secure boot turned off. Both installations are working, as I can access them by changing the boot priority in the Bios. What I cannot achieve is to let grub boot my windows installation.
This is the output of parted -l:
Code: Select allModel: ATA Samsung SSD 840 (scsi) Disk /dev/sda: 128GB Sector size (logical/physical): 512B/512B Partition Table: gpt
Number Start End Size File system Name Flags 1 1049kB 512MB 511MB fat32 boot 2 512MB 111GB 111GB ext4 3 111GB 128GB 17,0GB linux-swap(v1)
[Code] ....
As you can see, my linux install is on sda, my windows install on sdc (sdb beeing a data disk). This is the entry I made in the 40_custom file in etc/grub.d:
I think this should be fine, but if I choose the windows entry wehen grub is booting, it says: error: no such partition. It's my first debian installation, and I am stuck here. Not too much of Linux experience in general.
now I've re-installed W7 so grub was overwritten. I've tried the procedure which worked for me previously:booting with the netinst usb in rescue mode, choosing a root partition to mount, using grub-install to reinstall the grub:
Now I'm on Jessie (stable), and this time this fails, and I am able to mount only sda3.grub-install doesn't exit so I'm assuming it has been replaced by `grub-installer'. also '/boot' doesnt exist so I created it manually.
I cannot count how many times I have re-installed squeeze, and do all kinds of fixes to grub, but no joy. Every time, there is this ntoskrnl.exe error, and to re-install it. I thought my WIN XP may be corrupted, so I reinstalled it, and updated it with sp3 and all updates. Then I re-installed squeeze (reformatting all partitions). At the end, the installer ask if I want to install grub to mbr. I replied yes. After reboot, only the 2.6.32.3-amd64 and the recovery kernels show up on the grub screen, no winxp.OK, I booted into squeeze kernel and looked at the /boot/grub/grub.cfg file, and there winxp is not included in /etc/grub.d/30_os-prober section. In terminal, I typed
#os-propber and it found winxp in /dev/sda1 then I typed #update-grub
and now /etc/grub.d/30_os-prober now show winxp.I rebooted, and winxp shows on the grub screen, and I chose winxp.It came back with "ntoskrnl.exe ...error... re-install ntoskrnl..."Here are the details:
I have been following this tutorial [URL]. When I get to the end of the installation and try to install GRUB to the /boot partition I have set up it throws a fatal error at me. No explanation other than it can't write to the specified location. I double checked all the partition settings which were the same as the tutorial then skipped the GRUB installation and finished. The only thing I can think of that might be wrong is that the 250MB partition size specified for /boot in the tutorial is too small.
I wrote a GRUB multi-boot configuration so I can boot multiple distributions and have storage space on one 32GB flash drive.
set imgdevpath="/dev/disk/by-label/multiboot"
Code: Select allmenuentry 'Debian Jessie amd64' { set isofile='/iso/debian-8.0.0-amd64-DVD-1.iso' loopback loop $isofile linux (loop)/install.amd/vmlinuz initrd (loop)/install.amd/initrd.gz }
This works in virt-manager when I boot the physical usb device a virtual disk with a usb bus and it works flawlessly, but when I plug it into a physical machine the cdrom detects fails to mount /dev/sdb1 as fstype=iso9660.
Im trying to do a frugal install off the hard drive (no usb,cdrom) with unetbootin. It installs grub and then will boot the installer but is still tries to find the removable media. Whats going on????
I had Ubuntu installed, i installed Debian and there was no dual boot. So i formated all the hard disk to install only Debian. It installed but at boot i get error: no such device and the grub rescue> prompt. i googled for a solution and nothing worked:
- i tryed reinstalling grub, not worked - i did the windows cd fixmbr trick, not worked - reinstalled debian with fixmbr the first step and nothing - tryed deleting with dd the mbr, not worked - reinstalled grub from debian rescue, not worked
what should i do? i can't access my computer? please tell me how should i fix it? the google guys will kill me because i put their servers on fire