Replacing boot loader with GRUB !?!

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Replacing boot loader with GRUB !?!

Postby GusGF on Tue Jan 15, 2013 8:15 pm

I have a dual boot with Windows 7 64 bit and Linux Mint 13 Mate 64.

The Windows boot loader is on the MBR and GRUB 1.99 is I believe in the boot partition.

I have noticed that when Windows has been hibernated the Windows boot loader does not even come up and I am taken straight into Windows. The only way to then get back into Linux is to shut down windows fully.

My question is how do I replace the Windows boot loader with GRUB so I can boot either OS hibernated or not?
Linux Knowledge: Beginner
Mint 16 64-bit
Samsung 400B Core i3 6GB
Windows 7 64-bit
GusGF
Level 1
Level 1
 
Posts: 27
Joined: Sun Sep 02, 2012 9:02 am

Linux Mint is funded by ads and donations.
 

Re: Replacing boot loader with GRUB !?!

Postby rprego on Wed Jan 16, 2013 2:46 am

If you've got Mint installed, chances are that you've got GRUB as your bootloader (it is usually installed during the installation process for Mint).

As for hibernation, if you hibernate and shut down, then select Windows when you boot, everything should be okay (this sounds like the situation you're in already). If you hibernate, then boot into Linux, and restart and try to boot into Windows, Windows will complain and be unable to restore. To put that simply, what you're trying to do has nothing with GRUB, it won't work because of a restriction with Windows.
Linux Mint 13 Cinnamon 64-bit on Custom Build (AMD Phenom II X6 1090T Black Edition, Asus M4A78T-E MB, 8GB RAM, 120GB SSD, 2TB HDD, NVIDIA GTX 550 Ti)
Linux Mint 13 Cinnamon 64-bit on Lenovo U300S Ultrabook (Intel i7, 4GB RAM)
rprego
Level 1
Level 1
 
Posts: 32
Joined: Fri Nov 11, 2011 4:15 pm
Location: New Jersey, USA

Re: Replacing boot loader with GRUB !?!

Postby srs5694 on Wed Jan 16, 2013 2:05 pm

GusGF wrote:I have noticed that when Windows has been hibernated the Windows boot loader does not even come up and I am taken straight into Windows. The only way to then get back into Linux is to shut down windows fully.


Given the way most users implement cross-OS file access, this is probably for the best. The problem is that hibernating a computer usually leaves disk access in a "used" state -- that is, the data structures on the disk are not necessarily internally consistent. This is OK if the computer is booted straight back into the original hibernated OS, since the missing information is originally held in memory, then stored on disk for hibernation, and then restored. Thus, after hibernating and returning from hibernation, the OS can still manage the disk and shut it down correctly. If, on the other hand, you reboot into another OS, and if you then attempt to access any filesystems that the first OS had open, the disk will look as if the computer had crashed. Depending on the filesystems and OSes involved and the specific details of what files were being accessed, etc., this could result in an inability to access the disk, in a successful disk "repair" being performed, or even in damage to the filesystem. When the first OS is rebooted, it may end up being confused about the state of the disk, so there's further risk of damage at that point.

Of course, all of this is an issue only if you mount shared filesystems across your OSes. Most Linux users do this on dual-boot configurations, though, so chances are this isn't really an "out." OTOH, the last time I checked, Linux's NTFS drivers tended to refuse to mount an NTFS volume that wasn't properly unmounted, so the risk of damage to an NTFS volume is likely to be fairly low. Still, I prefer to play it safe when it comes to cross-OS filesystem access.

So in sum, if you hibernate, you really should plan on booting back to the original OS the next time you power on. If your boot loader enforces such an action, then that's a good thing, since it makes it less likely that you'll end up trashing your disk through an accidental boot into the wrong OS.
srs5694
Level 6
Level 6
 
Posts: 1020
Joined: Mon Feb 27, 2012 1:42 pm

Re: Replacing boot loader with GRUB !?!

Postby GusGF on Wed Jan 16, 2013 7:49 pm

rprego wrote:If you've got Mint installed, chances are that you've got GRUB as your bootloader (it is usually installed during the installation process for Mint).

As for hibernation, if you hibernate and shut down, then select Windows when you boot, everything should be okay (this sounds like the situation you're in already). If you hibernate, then boot into Linux, and restart and try to boot into Windows, Windows will complain and be unable to restore. To put that simply, what you're trying to do has nothing with GRUB, it won't work because of a restriction with Windows.



Sorry rprego not sure what post you were reading but I did state windows bootloader is the first loader since its in the MBR!

if you hibernate and shut down
What?????????

If you hibernate, then boot into Linux
........ eh thats what I'm trying to do :shock: and no it won't complain because other people have done it and done it using more than 2 OS. Please see here
Linux Knowledge: Beginner
Mint 16 64-bit
Samsung 400B Core i3 6GB
Windows 7 64-bit
GusGF
Level 1
Level 1
 
Posts: 27
Joined: Sun Sep 02, 2012 9:02 am

Re: Replacing boot loader with GRUB !?!

Postby GusGF on Wed Jan 16, 2013 7:57 pm

Hi srs5694,
Thank you for your informative post and for highlighting issues with dual booting systems. It certainly is a concern I will keep in mind and was aware of it though I certainly don't know the ins and outs of it.

But I still do want to have a dual boot post Win7 hibernation which I can do if I can only figure out how to move GRUB to the MBR, but I do need some help and guidance :D

So hopefully someone can chime in with some help.

Cheers

srs5694 wrote:
GusGF wrote:I have noticed that when Windows has been hibernated the Windows boot loader does not even come up and I am taken straight into Windows. The only way to then get back into Linux is to shut down windows fully.


Given the way most users implement cross-OS file access, this is probably for the best. The problem is that hibernating a computer usually leaves disk access in a "used" state -- that is, the data structures on the disk are not necessarily internally consistent. This is OK if the computer is booted straight back into the original hibernated OS, since the missing information is originally held in memory, then stored on disk for hibernation, and then restored. Thus, after hibernating and returning from hibernation, the OS can still manage the disk and shut it down correctly. If, on the other hand, you reboot into another OS, and if you then attempt to access any filesystems that the first OS had open, the disk will look as if the computer had crashed. Depending on the filesystems and OSes involved and the specific details of what files were being accessed, etc., this could result in an inability to access the disk, in a successful disk "repair" being performed, or even in damage to the filesystem. When the first OS is rebooted, it may end up being confused about the state of the disk, so there's further risk of damage at that point.

Of course, all of this is an issue only if you mount shared filesystems across your OSes. Most Linux users do this on dual-boot configurations, though, so chances are this isn't really an "out." OTOH, the last time I checked, Linux's NTFS drivers tended to refuse to mount an NTFS volume that wasn't properly unmounted, so the risk of damage to an NTFS volume is likely to be fairly low. Still, I prefer to play it safe when it comes to cross-OS filesystem access.

So in sum, if you hibernate, you really should plan on booting back to the original OS the next time you power on. If your boot loader enforces such an action, then that's a good thing, since it makes it less likely that you'll end up trashing your disk through an accidental boot into the wrong OS.
Linux Knowledge: Beginner
Mint 16 64-bit
Samsung 400B Core i3 6GB
Windows 7 64-bit
GusGF
Level 1
Level 1
 
Posts: 27
Joined: Sun Sep 02, 2012 9:02 am

Re: Replacing boot loader with GRUB !?!

Postby GusGF on Mon Feb 04, 2013 8:13 pm

Okay an update.....

I now have a system in which my dual boot LM/Win7 can hibernate either way or BOTH! and boot up either way...hurrah!

My problem was the MS boot manager was in the MBR and lonely old GRUB was cast out to the boot partition. MS boot manager controlled the booting process in so far as if it knew MS had previously hibernated it would ignore all other OSs installed and go straight back into Windows.

I started off using Boot Repair usually distributed with Ubuntu and actually ended up creating a Live Mint 14 USB to which I added Boot Repair. I had great hopes and installed GRUB using Boot Repair to the MBR from the Live USB. Now after a certain sequence of events which I'm not blaming on Boot Repair but more to my poor memory :oops: i.e. not sure what I did but all I know was I had got to a point where nothing was booting Windows or LM13 and I was getting error ....

File: \Boot\BCD
Status: 0xc000000f
Info: An error occurred while attempting to read the boot configuration data.

PANIC :roll:

At this point my priority became rescuing MSWin7 since this is where I had most to lose. I tried Boot Repair many times, Win7 recovery tools, all manner of MS console commands until I came across this little gem...

1. Start from recovery disc
2. Go to command line
3. Execute "bcdboot c:\windows /s c:"
4. Boot manager should be fixed now
(gratitude to this link Windows 7 Boot\BCD file is corrupt)

YES! :lol: crazily

Now I had my Win7 installation back booting fine with no data loss I decided to install and move up to Linux Mint 14 since I now had it on a Live USB, to hell with it I thought, so I deleted all existing linux partitions from within Win7. Rebooted from the LM14 live usb resized the Win7 partiton sda1 (increased), moved the contents of the ntfs partition sda3 to sda2 and deleted sda3 so MSWin7 was now in the first two partitions. (I guess I just like to be organised)

I then set about installing LM14 but during the installation process it would not recognise my MSWin7 installation no matter what I did, ARRGHHHH!! :evil: So I manually created the necessary partitions (no need for boot) and installed LM14 to them making sure this time I installed GRUB to the sda1 partition. I then prayed, rebooted and to my relief GRUB came up offering me a choice of installed OSs, allowing me to hiberate to my hearts content.

I have set up a separate NTFS data partition which at some point will probably be shared between LM and W7. But for now simply having the convenience of being able to save the OS's state for the next boot is a blessing.

Sorry if this reads like a garbled mess from a novice (...and lets face it, it is) if it helps just one person it will have been worth it.

:D
Linux Knowledge: Beginner
Mint 16 64-bit
Samsung 400B Core i3 6GB
Windows 7 64-bit
GusGF
Level 1
Level 1
 
Posts: 27
Joined: Sun Sep 02, 2012 9:02 am


Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Untmos and 34 guests