Sunday, January 7, 2018

12.04 - Install on Second Hard Drive with startup boot option?



In theory, what I want to do is very simple, but I've done some google research and read some posts on this site and I'm still confused.




I want to keep win7 on my primary C:\ drive, and install Ubuntu (12.10) on a secondary drive (that I have yet to buy or install. I just want to be certain that I'm successful when I do this). If at all possible I'd also like it if when I start the computer I have the option to boot either Win7 or Ubuntu, like an account log in type thing where I just pick which drive I'm running with that day. And just to reiterate, I do not want to partition my C:\ drive or alter, change, or affect my Win7 system in any way.



The reason I'm still fairly uncertain about all of this, is that a lot of the guides I've read have been for earlier versions of Ubuntu. Also the vast majority of guides are about partitioning one drive to fit both OS'. I want two separate OS running from two separate drives that I can pick at boot. The guides I did find mentioned that there is some issue with the grub being installed on C:\ but the rest of the OS being installed on the other drive. Is this still the case? How do I avoid that?



Also, if it helps, I've been running 12.04lts on my laptop for a few months now in and out of class and I love it.



Finally, if you could please point me to a guide or write your answer in the form of a guide for a two year old that'd be awesome. I'm still an Ubuntu novice and I don't want to mess up my win7.



How it works




Each partitioned disk contain one small block called MBR. It resides at the beginning of the disk.



Now, the OS inserts their code to MBR to load their own bootloader.
Windows does same, Linux does same.



They insert a small code pointing to actual location of bootloader. Like in Linux, This MBR contains Stage1 of GRUB (GRUB is a bootloader used in Linux) which loads a larger executable Stage2 that may located in other partition.



If you install Windows, and then Linux, GRUB Stage1 sits in MBR. Now other part of GRUB (the actual bootloader) contains the Windows bootloader location. Now when you select Windows from GRUB menu, Windows starts to load. This is called chain loading (GRUB loads first, then GRUB loads the Windows bootloader based on selection).




Coming back to your question



In your case, you have two MBR (because you have 2 hard disks).



Therefore, you have two options:



Easiest Option




  • Create a partition on 2nd disk.


  • Install Ubuntu on that partition & install GRUB on 2nd disk's MBR not on first disk's MBR. Be careful here. See below image (just for demo purpose), you need to do everything in (probably) sdb.


  • You select your already created sdb partition, edit, assign mount point /, and file system type ext4


  • Select boot loader location as sdb , not sda (see red colored section)




bootloaderLocation




  • Once done, reboot and you will be booted to Windows 7.




It happens because, your boot disk priority says to boot from first hard disk (Where we didn't change anything).



So open BIOS, change boot disk priority so that the disk containing Ubuntu comes first.




  • This time, GRUB will be loaded. And you can boot either OS.


  • Remove the disk, Windows 7 will boot directly.


  • Again plugin the 2nd disk, verify boot order from BIOS so that 2nd disk comes first. You can now boot any OS again.





Another Option



You can modify Windows bootloader also to load Ubuntu from 2nd disk. It is a bit harder, and since you don't want to touch Windows 7 at all, I am not recommending it.



Note: All tutorials available here talks about adding Ubuntu from same disk but different partition. I have not done it for across devices, you may need to adopt accordingly.



Here is a tough guide to do so.



There is a great GUI tool to edit boot loader called EasyBCD (It is free for personal use). Their guide about setting up Ubuntu using Windows bootloader.




You can have more resource on it Easy BCD Help: Dual boot Win7 and Ubuntu 11.10 -- "Add new Entry" for Ubuntu



I strongly recommend using GRUB as bootloader, as it is more flexible. May be you can set Windows as default boot option AND/OR reduce timeout value.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...