Results 1 to 6 of 6
The term "Dual-mode dual-boot" refers to a single physical copy of OS which can run both in Virtual Machine or on its own standalone. You can launch it by either ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-13-2012 #1
- Join Date
- Jul 2010
Dual-mode dual-boot Ubuntu x64 with Windows 7 x64 without burning a CD
Dual-booting Ubuntu with Win7 is no longer a big problem for many people. Just a bit of googling will give you dozens of solutions. However, to install dual-mode dual-boot Ubuntu on the same harddisk of the currently running Win7 is kind of headache especially for 64-bit windows because of the new restriction on raw disk access from Vista onwards ( support.microsoft.com/kb/942448 ) as well as Windows 7 64-bit forbids loading kernel drivers without Microsoft digital signature (this can be solved by enabling testsigning in boot config using bcdedit).
I have cracked my head and eventually managed to install Ubuntu 12.04 64-bit on Windows 7 Ultimate 64-bit using VirtualBox 4.2.4 using a Ubuntu ISO image without burning a physical CD. The copy of Ubuntu is installed using VirtualBox but can run not only inside Windows 7's virtualBox but also on its own (restart computer and boot directly into the same copy of Ubuntu). However, I am skeptical about the repeatability of my installation procedures, hope other people can have a try and to figure out whether it works and to make the procedure clearer and simpler.
Warning: DO NOT try this if you are NOT an expert in OS boot principle and harddisk partition, attempting things without understanding what exactly it does may result total loss of your harddisk data and at the same time rendering your current system unbootable.
Here're the required stuffs you need to prepare:
1. VirtualBox 4.2.4
2. EasyBCD 2.2 (in case needed)
3. EaseUS Partition Master (in case needed)
4. Ubuntu CD (12.04 I used)
5. basic knowledge in Command Prompt and Windows disk management
6. in BIOS, enable Intel virtualization technology, otherwise, 64-bit OS cannot be emulated in virtual machine, only 32-bit OS can be emulated
To get started:
1. Make sure you are in administrator mode with UAC disabled, so each operation has admin privilege;
2. run the following command in command prompt to enable test signing mode so that some kernel drivers can be loaded (I'm not sure if it's neccesary)
Bcdedit.exe -set TESTSIGNING ON
3. in "Windows disk management" (by right-click Computer -> Manage -> Storage -> Disk Management), make sure you have 2 empty partitions prepared for Ubuntu, 1 for system (suggest >=8GB), 1 for swap (total memory size). Your current harddisk type must be a basic disk (not a 'dynamic disk' or a 'GPT disk').
For example, in the figure above, Drive X is for Ubuntu OS and Y is for swap area (optional but strongly recommended unless you don't need virtual memory in Ubuntu).
Take note that the Ubuntu OS better to be installed on a primary partition, swap can be either on primary or extended partition.
4. The two Ubuntu partitions must be unformatted by Win7, if formatted, delete and recreate; moreover, you MUST assign letters to the two partitions but don't use it in Win7. In addition, all other partitions must also have be assigned a letter, including the system reserved partition M in my case.
5. Create the disk image. In command prompt, goto virtual box folder,
C:\Program Files\Oracle\VirtualBox in my case, run this:
VBoxManage internalcommands createrawvmdk -filename C:\rawdisk0.vmdk -rawdisk "\\.\PhysicalDrive0" -partitions 0,1,2,3,4,5,6
The image file 'disk0.vmdk' can be put anywhere you want with folder names not containing space. The actual number of partitions "0,1,2,3,4,5,6" depends on your harddisk. There must be no errors in running this command, if there's an error, delete the possibly wrongly created disk0.vmdk and disk0-pt.vmdk file and change parameters and retry.
6. Create a new virtual machine in VirtualBox, use this C:\disk0.vmdk as the disk and load Ubuntu ISO image into CD-DVD drive as shown below.
Make sure you select Linux -> Ubuntu (64 bit) when creating the VM and have no other warnings in VirtualBox manager on this VM.
7. Launch the created virtual machine, press F12 to boot into Ubuntu CD, perform normal install, make sure you install into the right partition and set correct swap area. For the boot loader I install into the Ubuntu partition, not MBR.
Here comes tricky! I often encounter the problem when either 1. Ubuntu installer cannot find any partition or 2. cannot write into the partition or 3. cannot write boot-loader. If you encounter so, try fiddling around by removing drive letters, reassigning drive letters (trying using only the 2 partitions instead of putting all 0,1,2,3,4,5,6), deleting VM in virtualBox completely and recreating disk0.vmdk and VM. You may even try running EasyBCD 2.2 or EaseUS Partition Master to make raw disk operations doable. That's the part which I suspect to be non-repeatable.
If the boot-loaders fail to install, you can still force to boot into Ubuntu using EasyBCD by adding a new entry and setting the drive to be the Ubuntu partition (i.e. X in my case) as shown below (it will be changed back to C by EasyBCD for some unknown reason):
8. The installation eventually complete successfully and the resultant copy of Ubuntu 64-bit can be run both inside Win7's virtualBox and upon machine reboot.
Unfortunately, you cannot run the same copy of Win7 both on its own or in Linux's virtualBox because too many hardware changes will require another windows activation.
Warning: DO NEVER reboot into the same copy of Win7 from Win7's virtualBox although you can do so in the boot option above. Doing so may result in file system corruption or rendering existing operating systems unbootable.
To prevent doing so, I strongly encourage you to set default system to Ubuntu in the boot option.
The good thing is that the Ubuntu in virtualBox is able to access windows partitions in read-only mode or full-access if they are unmounted, to unmount a volume E:, run in command prompt:
mountvol E:\ /D
Here are some of my food-for-thoughts:
1. Although the new restriction in Vista/Win7 forbids full access to \\.\PhysicalDrive0, it does allow full access to individual mounted but unlocked raw partitions, this installation procedure does not violate this rule as long as you don't install grub loader into MBR
2. Win7 has some harddisk I/O flush delay, updating MBR or partition boot sector takes a long time (say 20 minutes) unless you reboot Win7. That might possibly cause the tricky part I mentioned above.
3. In Win7, assigning a drive letter to a partition causes it to be mounted. Every time you make changes to your harddisk, i.e. mount/unmount some partitions, you must delete the entire VM in virtualBox manager together with the .vmdk files, otherwise, it seems not working.
For those people who are interested you may have a try and help me figure out a better/clearer way of doing so. Be very careful throughout, bear in mind that you may blow out your system and data anytime.
Last edited by xuancong; 11-13-2012 at 07:47 AM.
- 11-17-2012 #2
- Join Date
- Sep 2012
You got to be kidding:
The easy way is to have two hard drives in your PC, but only connect one HD and install Win7 on one drive, then disconnect that HD and connect the 2nd HD and install Linux on that drive. When finished installing Win7 and then Linux on each drive with only one HD connected at a time during each OS installation, then you can plug in both HD's and enter the BIOS during boot and choose which drive/operating system you want to boot to. This is the safe and easy way to do things. In my experience, forget all about the word Dual-Boot. It will save you a lot of grief and protect both the Win7 and Linux OS's from corruption or one wiping out the other if something goes wrong.
Experimenting and learning multiple operating systems is great, as long as you put each operating system on its own hard drive by unplugging the other hard drives during each new operating system you want to install, then when finished plug them all back in and enjoy the freedom and security of each by choosing which hard drive to boot to in the BIOS Drive Boot Order. Of course if you do not have a newer motherboard/BIOS that allows that, you might just want to buy a motherboard that does have this capability and save yourself a lot of grief.
This is the way I did it and I enjoy both worlds with a huge safety net built in. If you can not afford a 2nd hard drive then you probably should not be messing around with two operating systems in the first place.
Hope this helps all those wanting to follow a book on how to dual-boot and avoid crashing both Windows and Linux. Better to lose just one operating system if a HD fails than lose them both! Using two hard drives will save you from trying to remember the Don't Do This and the Don't Do That rules.
- 11-18-2012 #3
Either you must enjoy corrupting this or that, nothing better to do than complicate things by even using dual boot, or you do not know the easy way to do things that will protect both Win7 and Linux.
- Join Date
- Jul 2010
The easy way is to have two hard drives in your PC, but only connect one HD and install Win7 on one drive, then disconnect that HD and connect the 2nd HD and install Linux on that drive.
I'm just proposing an possibility, a better option for advanced users. You may choose to do it if you think your skills are ready. Or if you can make my steps clearer and simpler, that's even better.
- 11-18-2012 #4
- Join Date
- Sep 2012
Based on my experience and working through the pitfalls associated with Dual-Booting Operating Systems, I will choose and stick to keeping my Operating Systems installed on separate hard drives over dual-boot any day. I know this, since I have chose this philosophy over dual-boot, I have spent a lot more time enjoying my computer than fixing it. Since I am the type of person who rarely re-installs Windows Operating Systems, and chooses to fix the operating system if something goes wrong, I rarely have to reinstall my programs, and my computer keeps humming along nicely and is very fast. I feel by keeping the operating systems limited to one per hard drive, I can fix any problems that occur fairly quickly using various software tools I have carefully selected from my BETA Testing over the years.
Eventually, and over time of using Linux, my Linux skills will grow and I will feel more comfortable with Linux problems and fixing them. I am not an advanced user of Linux yet, but I will be if I keep the operating systems on separate hard drives and deal with the problems as they crop up, thus not subjecting myself to crashing multiple operating systems at the same time. I feel that this is what gives users of Linux a sour taste in their mouth for the people wanting to try Linux.
At ITT Tech, we only had 2 courses in Linux at the Administrator Level. This was a lot to chew with limited exposure to Linux, but it also afforded me the motivation to keep trying various distributions of Linux for comparisons without the risk of crashing my prize Windows Operating System where I do my most work on because I chose not to use Dual-Boot. Windows and Linux do not play nicely with each other. The partitions are totally different and each operating system uses their partitions in a far different method, with one eventually corrupting the other.
Although I agree with your view regarding a laptop and having only one hard drive, thus making it necessary in one viewpoint of using dual-boot, I also can see the other side of the coin and can re-think my philosophy and find another method so I do not have to use dual-boot. External Hard Drives of today can easily fit into your shirt pocket with fast connection of the USB Cable to ensure that dual-boot is no longer necessary.
While there are always two or more ways to skin a cat, one way may just leave a sour taste in your mouth, thus deciding to use other methods that are less apt to cause corruption.
Again back in college, I experienced this corruption and I was not the only student with this problem of corrupting both the Windows and the Linux using Dual-Boot, but I am the only student who went to the bookstore and came back with another hard drive and chose to install each operating system separately on each hard drive and ended the crap of corrupting both operating systems after many crashes which served only to waste my time of having to reinstall each operating system over and over again to keep dual-boot. Presto, my solution, at the amazement of both instructors to my dedication of solving the problem at a cost of $70 for a second hard drive. For me, this was a very satisfactory method to end the turmoil we were experiencing. It was hard enough for me to keep up with the demands of full-time college, being a caregiver to my dying grandmother of cancer, and cooking all the meals and moving her lawn without wasting additional time having to spend reinstalling the operating systems. While I do not tout as being the best problem solver in the world, I do praise myself in the ability to know how to end dual-boot problems once and for all by not choosing to use Dual-Boot.
- 11-19-2012 #5
Since I am the type of person who rarely re-installs Windows Operating Systems, and chooses to fix the operating system if something goes wrong, I rarely have to reinstall my programs, and my computer keeps humming along nicely and is very fast.
- Join Date
- Jul 2010
Conventionally, the only way to cause file system corruption is when you run Linux in a virtual machine inside Windows and mount an already mounted Windows partition and perform write operations on the same partition both in Linux and Windows. Since I have suffered, now I can explain the mechanism based on my experience:
Windows filesystem usually have a table, e.g. FAT (file allocation table) in FAT16/32/64, or master file table in NTFS, etc, which stores file and directory info. Each time you open a file, close a file, read or write a file, you need to read or modify this table, thus it needs to be frequently accessed. To reduce frequent access to this table in order to save harddisk lifespan as well as speed up disk I/O, operating system load this table into memory upon mounting a filesystem, it writes back this table during unmount. In between, all/most modifications to this table are kept in memory. Therefore, when you created some files, the modified FAT is in the memory, not flushed onto disk yet. But the other OS will read the outdated file table which doesn't tell the newly
created files, and modify based on that. Consequently, when they put back their respective copy of file table when unmounting the filesystem, conflicts will occur. The result is filesystem corruption.
To avoid that, never mount the same partition on both systems simultaneously. It's not possible for you to do that if you are only running 1 operating system.
Besides, I do feel very convenient and flexible running dual-mode dual-boot Linux instead of rebooting each time when I need to switch OS. And it is safe. And I do hope future OS developer should consider this way of running OS and make the OS adaptive in this way.
in the labs many of us had problems from time to time with dual boot crashing our XP Professional and Fedora Linux installations, plus I have had extensive negative experiences with Dual-Boot over the years, I simply decided that Dual Boot was not worth the effort.
To put it simpler, to design an operating system which can run both in virtual machine and on its own, the OS developer should take note of certain perspectives of the OS. That's why I am having this post.
- 11-19-2012 #6
- Join Date
- Sep 2012