Ubuntu :: Install GRUB To A Partition Instead Of The MBR?
May 14, 2011
I just installed Windows XP on a seperate partition and now I cant boot from Ubuntu. I have done this before and been able to reinstall grub but this time I cant remember how I did it. I have tried the instructions from here and here but I cant get it to work. I keep getting this error:
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt/ /dev/sda5 /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea../usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged. /usr/sbin/grub-setup: error: if you really want blocklists, use --force.
I'm running Karmic Server with GRUB2 on a Dell XPS 420. Everything was running fine until I changed 2 BIOS settings in an attempt to make my Virtual Box guests run faster. I turned on SpeedStep and Virtualization, rebooted, and I was slapped in the face with a grub error 15. I can't, in my wildest dreams, imagine how these two settings could cause a problem for GRUB, but they have. To make matters worse, I've set my server up to use Luks encrypted LVMs on soft-RAID. From what I can gather, it seems my only hope is to reinstall GRUB. So, I've tried to follow the Live CD instructions outlined in the following article (adding the necessary steps to mount my RAID volumes and LVMs). [URL]
If I try mounting the root lvm as 'dev/vg-root' on /mnt and the boot partition as 'dev/md0' on /mnt/boot, when I try to run the command $sudo grub-install --root-directory=/mnt/ /dev/md0, I get an errors: grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea. grub-setup: error: Embedding is not possible, but this is required when the root device is on a RAID array or LVM volume.
Somewhere in my troubleshooting, I also tried mounting the root lvm as 'dev/mapper/vg-root'. This results in the grub-install error: $sudo grub-install --root-directory=/mnt/ /dev/md0 Invalid device 'dev/md0'
Obviously, neither case fixes the problem. I've been searching and troubleshooting for several hours this evening, and I must have my system operational by Monday morning. That means if I don't have a solution by pretty early tomorrow morning...I'm screwed. A full rebuild will by my only option.
I am still using Lucid with a Luks/dm-crypt setup. I picked up an upgrade today that included grub. It gave me a box that had me choose my location to install the upgrade. I chose /boot. When apt did its upgrade thing, I got the following message: Setting up grub-pc (1.98-1ubuntu ... /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.. /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.. Installation finished. No error reported. I looked in /boot/grub and found no menu.lst file.
I have many partition for many different operating systems. I have Windows 7 on partition 2, and Ubuntu on partiton 3. Previously I could use GParted to set the boot flag for the drive to whichever partition I desired. If I set it to partition 2, I got the Windows bootloader, and if I set it to partition 3, I got the Ubuntu bootloader. Now if I set the boot flag to my Ubuntu partition, I get a message something along the lines of "disk not found". I can't recall its exact message at the moment. When setting up Ubuntu the installer has the "Advanced" button on the last page which gives you the option of which partition to install Grub to. Is there any way I can access this again, or a utility that will do the same thing? I have used the grub program in the following way to restore the Ubuntu bootloader
sudo grub root (hd0,0) setup (hd0)
but the boot flag is still on my Windows partition, suggesting Grub has overwritten Windows' bootloader. How can I tell grub which partition to install to? I'm using 10.04 and Grub2.
I have messed up my partitions really bad and grub refuses to install. Here's how it looks: Code: Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 2432 19430617+ 83 Linux /dev/sda3 2433 60801 468848992+ 5 Extended /dev/sda5 2433 2930 4000153+ 82 Linux swap / Solaris /dev/sda6 2931 53535 406484631 83 Linux /dev/sda7 53536 60801 58364113+ 7 HPFS/NTFS
Initially there was only Linux (Karmic) on this hdd, on what is now sda2 to sda6, current sda2 being the boot partition. Now, I decided to install Windows XP and using GParted I created an NTFS partition at the end, sda7. But it wanted to have his loader on the first one, so (now this is probably stupid what I did) I cut 100MB from Linux root and put it as NTFS at the beginning, making it sda1, boot and letting windows install it's loader there. I figured I can just reinstall grub on it later (think I have missed some tutorials). As you can probably guess, it won't. I formatted sda1 to ext4 now. What I do is run the Live CD (9.10), use terminal, then do
Code: sudo -i mkdir /media/boot mount /dev/sda1 /media/boot grub-install --recheck --root-directory=/media/boot /dev/sda1 and it goes
Code: grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea. grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged. grub-setup: error: Cannot read `/grub/core.img' correctly also, when I do update-grub it says "grub-probe: error: cannot find a device for /." I tried installing grub on sda2 and flagging it as a boot and still no-go.
I want install 10.10 Maverick on a new partition alongside my OS X and 10.04 Lucid installs to see if it works on my machine. I'm a little unsure about some things.
1)Do I need to install the GRUB boot loader on this new partition?
2)Can I use the same swap space or is recommended to create a new swap?
I am trying to dual boot Windows and Linux. I would like to continue using the Windows bootloader in my MBR.
I installed Windows 7 first. During the install I left some unallocated space that I intended to install Linux.
I found this guide: [URL]
It says to install GRUB to the bootsector of the partition that Linux is being installed to and not the MBR of your hard drive.
I am trying to install Linux Mint Debian to the second partition. When the installer gets to where you are asked to install GRUB the only option is to install GRUB to /dev/sda which I believe is the MBR.
I decided just not to install GRUB and proceeded with the installation.
How can I install GRUB to the bootsector of my Linux partition?
My laptop came with a hidden partition for restoring Vista instead of an install disk. I installed Ubuntu 9.04, which had an "Advanced" option that allowed me to install grub in the Ubuntu partition without writing over the MBR. Then I used EasyBCD to add Ubuntu to the Vista boot loader. I wanted to do this so that I can still restore the factory copy of Vista from the hidden partition if I need to. I upgraded the Ubuntu to 9.10, still using grub. When I did a fresh install of Ubuntu 10.04 it went to grub2, and I haven't figured out how to boot into it with EasyBCD yet.But I would like to try Fedora anyway. I will wait a couple of days and get 13.
1. Which grub does Fedora 13 use?
2. Will Fedora 13 allow me to install grub in its own partition without writing over the MBR?
I'm a Windows 7 user attempting to install openSUSE in a partition on a separate hard disk, and am receiving grub error 17 on install. My windows partition is sdb1, and my (hopeful) openSUSE partition is sdc2. When I attempt to redefine the grub config after receiving the error message, there are no mounted drives in my "/dev/" folder to point to, nor can I find the kernel image or RAM disk in my "/boot/" folder.
First upgrade to 11.3 no problem. Then I got a disk issue. so got an old 80 gig sata drive, config new partition table, format etc. Install perfect as ever.
Then grub failed ....no grub menue.
I changed to MRB boot. this worked but initrd takes a long time and sometime hangs ?!? What could be the issue ? Harddrive?!
Windows 7 x64 was the only install with a separate boot partition which was already on the Dell laptop. I then shrunk the partition to allow me to put opensuse on. Then I made the stupid mistake of deleting the opensuse and boot partitions while in Windows. I was going to do this, copy pictures of my new born baby off then reboot and delete all stuff and redo all the partitions and installs again.Now I just get grub rescue with the following when I do ls command:(hd0) (hd0,1) (hd0,2)I would like advise on how to get the data off, I cannot afford to lose my babies pics as there are no other copies. I will then do a normal install of opensuse first then Windows 7 after it.
Where can I install grub? I know it can be installed to the mbr of a hard drive. I also know it can be installed to a /boot partition. Can I install it to a lvm partition? Does it have to be /boot? grub-install --root-directory=/boot /dev/hda Does this command install grub to a partition and link it to a separate /boot? I have fedora, but this is a live cd. I need to learn where I can install grub2 to boot
A few days ago my Laptop wouldn't hibernate in Windows 7, I managed to fix this problem by going into Windows' Disk Management tool and setting the C:/ Partition as the active partition, this fixed my hibernation issue, however I have just noticed that now when I boot my laptop my GRUB menu no longer appears, instead it just loads Windows straight away as if it was the only OS on my laptop.
I've confirmed it's something to do with my recent Disk Management change as I booted up GParted, removed the boot flag from Windows and when a rebooted my GRUB menu reappeared.
Not sure on how I can both have Windows as the active partition while being able to keep GRUB working also.
My Partition Setup is as follows:
/dev/sda1 C:/ Windows 7 (NTFS) (Boot Flag Set) /dev/sda2 D:/ DATA (Documents and stuff) (NTFS) Unallocated 1 MB /dev/sda3 Extended 146.49 GB (LBA Flag Set) /dev/sda5 Linux Swap 2.01 GB /dev/sda6 ext4 20.00 GB /dev/sda7 ext4 124.46 GB Unallocated 10.00 MB
Code: fdisk -l Device Boot Start End Blocks Id System /dev/sda1 1 3724 29912998+ 83 Linux /dev/sda2 29256 30401 9205245 7 HPFS/NTFS /dev/sda3 3725 4271 4393777+ 5 Extended /dev/sda4 * 4272 12104 62918572+ 83 Linux /dev/sda5 3725 4271 4393746 82 Linux swap / Solaris
I want ot install a new opensuse 11.4 as yest another OS. Due to the fact that I already have 4 sda partitions, I have to make some changes. What I am thinking about is to copy the sda2 (windows recovery) data to some folder etc (nevermind), then delete the sda2. Then I want to create a new primary partition for the new suse 11.4 and install it. What is worying me is the grub boot menu. I was planning to edit the new one (the opensuse 11.4), with old data.
Code: ###Don't change this comment - YaST2 identifier: Original name: linux### title Desktop -- openSUSE 11.2 - 2.6.31.5-0.1 root (hd0,3) kernel /boot/vmlinuz-2.6.31.5-0.1-desktop root=/dev/disk/by-id/ata-Hitachi_HTS542525K9SA00_080105BB0F00WDHE41DC-part4 resume=/dev/disk/by-id/ata-Hitachi_HTS542525K9SA00_080105$ initrd /boot/initrd-2.6.31.5-0.1-desktop .....
Now my question is will the settings of (hda0,n), change due to the fact that I have deleted the sda2? I have a lot of unused space at the end of my disk and want to create a new "sda2" there.
I've installed Lenny with no problem, but I tried switching to Squeeze, and grub for some reason didn't pick up on the Windows partition this time - it just shows the two Linux options (debian and debian single-user). I check the menu.lst file (which I've edited under Lenny with no issues), but for some reason it doesn't exist at all in this install. Is it in a different location with Squeeze maybe?
I got ubuntu 10.04 lucid lynx along with windows (dual boot) and using Grub. On my computer, I have my C:/ (programs) and D:/ (data). I've never used my D:/ before that day that I've lost my windows partition on my grub menu. I usually use my D:/ with windows. The first time I used my D:/ to store data with linux, I lost my windows option in my grub menu. I'm not sure what I did wrong but I do want to restore my windows option in my grub menu.
After "fdisk -l",
I checked in /boot/grub and there is no menu.lst to modify. how I can get back my windows option in my grub menu ?
is it possible to use a Windows-based recovery partition on a dual-boot computer to overwrite the Ubuntu partition and remove the GRUB loader? For instance, if you booted up your computer, accessed the hidden recovery partition and used it to reset the computer to it's factory default settings, would that effectively remove the Ubuntu partition and the GRUB loader? Would a completely new installation of Windows overwrite/uninstall Ubuntu and GRUB automatically?
I having a problem getting my grub loader to see one of my hard drives. I added a drive, and my grub loader lost track of where everything was. I couldn't get my old linux (Red Hat 9) so I installed SuSe on my new hard drive. But I need my be able to boot from my old hard drive because it has apps that only run on the earlier version. From /proc/partitions the old hard drive is sdd
major minor #blocks name 8 0 976762584 sda 8 1 2104483 sda1 8 2 20972857 sda2
I don't know if this is possible however would like to know how to move grub from one partition to another.I may not have explainded that very well. I have a computer that i use to checkout different linux distros, however since the introduction of grub2 things have become difficult. I have a number of primary partitions on the one hdd If I install a o/s that uses grub on a partition and another partition has a o/s that uses grub2 then on startup the o/s with grub2 no longer appears on the grub start up screen so I cannot boot into the grub2 o/s. The reverse is ok i.e. if I install a grub2 o/s after a grub o/s all appear on the grub start up screen.
This leaves me in the situation where I have to always reinstall a grub2 o/s after i install a grub o/s. Hope that makes sense! This is why it would be easier (I hope) to be able to move grub from one o/s to another. I must admit I don't really understand it all that well and I know that mbr plays a role in it, however I think it's correct that the mbr can remain on an o/s yet grub is on another?
I tried to install openSUSE 11.3 from the Gnome live CD. I had four partitions set already for /boot, /, /home (ext4 all) and swap from a previous failed Linux Mint installation. I installed into them, and formatted them. The /boot partition is primary and pretty well into the disk. The other partitions are logical and at the end of an extended partition which has several partitions before them. There's also an inactive Windows primary partition at the start, and a second disk with a Windows installation and a lot of logical partitions.
After install, it looks like booting into grub works fine, and I get "Error 22: No Such Partition". I then get to the GRUB menu. If I choose openSUSE from there I get:
Booting 'openSUSE 11.3' root (hd1,2) Error 22: No Such Partition
Booting from the live CD it looks like /boot, / and /home contain data, so they must be formatted fine.
I tried to install openSUSE 11.3 from the Gnome live CD. I have two disks in my system, one with a Windows Vista x64 install, and another with a Vista x86 install which I no longer need and quite a bit of free space. I want to install Linux on it. I switch OS's by switching the boot disk in BIOS, so I don't really need a boot manager, but openSUSE installs GRUB by default, so I used it.
The Vista x86 partition is a primary partition at the start of the disk, and after it there's an extended partition with quite a few logical partitions. At the end of this extended partition I added partitions for swap, / and /home (ext4 all), and a new primary partition at the end for /boot. (I actually created these for a failed Linux Mint install, but I used them and reformatted during the openSUSE install.)
I made the Vista x86 inactive and the /boot partition active, and this works. At least, I get as far as seeing a menu which I guess is GRUB. Before that I get "Error 22: No Such Partition". If I choose openSUSE from the GRUB menu I get:
Booting 'openSUSE 11.3' root (hd1,2) Error 22: No Such Partition
I booted from the live CD again and checked the /boot, / and /home partitions, and they contain data, so they must be formatted fine.
I am currently running a dual boot machine with Ubuntu 11.04 and Windows Vista.Is there any way I can delete the Linux partition and Grub boot loader without affecting the Windows partition at all?I would also like to be able to repartition all of the space that was previously occupied by Linux.
Trying to install Ubuntu (any atm) on my father's HP destop. When i install, the partition manager wont allow me to shrink the windows partition to fit ubuntu in, and when i go to gparted to do it manually, it says that there are damaged sectors. is there a way to force ubuntu to install?