Monday, April 3, 2017
Getting the most out of multibooting
Getting the most out of multibooting
As with most Linux users, while I prefer to use Linux I generally have more than one OS installed on my computers. Typically, people will dual-boot their computer and run some version of Windows along with one other OS. Im a little more ambitious though, and I have three operating systems on my netbook; Windows XP Pro, Ubuntu "Natty" and OSX Snow Leopard. Yes that is correct, Im running OSX on my Asus netbook and at the moment its my favorite of the three OSes. Unfortunately, there are no .kexts available for my graphics chip (Intel GMA3150) so there is no Quartz Extreme/Core Image but its not a big deal really, the system seems plenty responsive and does everything youd expect a netbook to do.
Aside from the obvious issues with installing and configuring three separate operating systems, managing boot-loaders and getting the different operating systems to play nicely with each other, the biggest hurdle that I encountered with setting up my netbook for triple booting was the issue sharing my limited hard drive space. Typically, most operating systems will automatically store your personal data on the same partition as the system. Ever since I first switched to Linux after a catastrophic Windows system failure I looked for a way to safeguard my data. The obvious answer is to put the system and your documents on separate partitions. Applying the same concept to non-Linux systems is not quite as straightforward but can still be accomplished. Here is how I did it with my computer.
First things first: Youre going to need drivers. Linux has read and write support for virtually all file system formats out of the box, including OSXs "hierarchical file system" or "HFS+" and the Windows "new technology file system" or "NTFS". Unfortunately, same can not be said for Windows and OSX. On OSX, in my experience there are not any usable free drivers for Linux EXT2 and EXT3 hard drives. Ive tried MacFUSE with the EXT2 driver which I was able to use to mount my Linux partitions occasionally (via terminal commands) but the results were intermittent and every time I managed to mount my EXT3 partition under Mac OSX I would have to run a file system check the next time I booted into Linux. In the end, I used the proprietary drivers from Paragon for both EXT2/3 and NTFS and they work like a charm. You may have better luck than me with MacFUSE, but after having to manually mount and unmount partitions and deal with potential hard drive corruption, I decided to bite the bullet and use a tried and true albeit not free solution.
Under Windows, you can use a program called EXT2IFS (not Ext2FSD, Ive never gotten it to work properly) for mounting EXT2/3 drives and Paragon makes an HFS+ driver for Windows (also not a free product).
In regards to how I have partitioned my computer and configured each OS to share the same space for data storage, a lot of people might look at me funny and say "Now why would you do it that way?" The fact of the matter is there are probably a hundred different ways to do achieve the same results but the way I chose works best for me. It begins with the partitioning scheme.
Here is how my hard drive is broken down:
/dev/sda (250GB MBR formatted)
/dev/sda1 HFS+ 30GB "OSX"
/dev/sda2 NTFS 30GB "WINDOWS"
/dev/sda3 EXT3 15GB "Ubuntu" ("/")
/dev/sda4 EXT3 175GB "Home" ("/home")
As you can see, I have no swap partition. This is because I had to use Primary partitions for better interoperability, the limitation there being a maximum of four partitions. This is also the reason why I use my EXT3 home partition for data storage between all three OS. It might seem more obvious to create a large FAT32 partition for storing and transferring files between operating systems since OSX, Windows and Linux all can read and write to FAT32 formatted drives. The simple solution there would have been to do what I did with my OSX /users files and delete the original folders and create symlinks to their corresponding locations on the /home partition in the terminal. eg;
sudo rm -rf /users/ryan/documents
sudo ln -s /Volumes/Home/ryan/Documents /users/ryan/
That technically would work just fine doing the exact same thing under Linux, should I have installed my entire Linux system on one partition and just symlinked my home folders to their corresponding locations on the large FAT32 partition. However, I chose to do it "my way" for several reasons;
1) FAT32 filesystems cant support files larger than 4 GB, and considering I like to rip DVDs that was simply a nogo.
2) FAT32 is non-POSIX compliant, meaning is doesnt handle Linux (or in the case of OSX, UNIX) file permissions properly. Ive run into problems with not being able to write to FAT32 drives from Linux and OSX because of not being able to change file permissions properly. Maybe this has gotten better over the years but ever since flash drives have gotten bigger than 4GB I have completely abandoned FAT32.
3) Im primarily a Linux user. If one OS has to play host to my files, it should be Linux. Plain and simple.
4) Of all of the formats I could have used (EXT2/3, FAT32, NTFS, HFS+) EXT3 seems to have be the most efficient but this is my opinion based on anecdotal observation. Linux read/write speeds to and from NTFS are absolutely TERRIBLE, whereas Windows read/write speeds to EXT2/3 doesnt seem as bad.
The last order of business was to make Windows use my home partition. Now, it may seem like the obvious thing to do is to right click the "My Documents" folder on Windows and change the target to /home/ryan and be done with it, but THIS IS A TERRIBLE IDEA!!! Setting your "My Documents" folder to your /home/user folder will result in permissions problems so dont do it. Under Windows 7, you can change each individual folder (library?) to target another directory. The same is not true for Windows XP though. I had to delete all of my folders from "My Documents" and then create shortcuts to each of the folders in "/home" and place them in "My Documents". Unfortunately, a shortcut is not handled the same way as a symlink. First a shortcut has a file extension .lnk so most programs wont see the shortcut as a directory and by default will probably recreate the folder its looking for, eg;
C:Documents and SettingsusernameMy DocumentsDownloads
Unfortunately, there doesnt seem to be a good way of getting around this except for changing the default location that applications save/download to manually. I prefer the target changing method of Windows 7, but Im using XP. Why am I using XP? Because it has a smaller foot print than Windows 7 and because its more compatible with the few things I still need Windows for, like accessing school web sites that only want to work properly on Windows XP using Internet Explorer. IE9 breaks a lot of functionality that certain sites need and since I primarily use my netbook for school, thats a no-go.
Im looking into making XP use another partition for individual folders and not "My Documents" folder a little more transparent. Maybe there is a way to do it with registry hacks, but thats a dangerous game to play. Ill post back when and if I figure something out.
EDIT:
I tried like four different methods of creating UNIX like symlinks or junctions either via the command line or using applications and I finally found one that works. Just download Winbolic and create the links. There are a couple of warnings about linking a link to itself and other stupidity like the fact that if you delete the Windows junction it will delete the target folder too. Other than that, it works like a charm and achieves total transparency with interoperability and function.
Here is how my hard drive is broken down:
/dev/sda (250GB MBR formatted)
/dev/sda1 HFS+ 30GB "OSX"
/dev/sda2 NTFS 30GB "WINDOWS"
/dev/sda3 EXT3 15GB "Ubuntu" ("/")
/dev/sda4 EXT3 175GB "Home" ("/home")
As you can see, I have no swap partition. This is because I had to use Primary partitions for better interoperability, the limitation there being a maximum of four partitions. This is also the reason why I use my EXT3 home partition for data storage between all three OS. It might seem more obvious to create a large FAT32 partition for storing and transferring files between operating systems since OSX, Windows and Linux all can read and write to FAT32 formatted drives. The simple solution there would have been to do what I did with my OSX /users files and delete the original folders and create symlinks to their corresponding locations on the /home partition in the terminal. eg;
sudo rm -rf /users/ryan/documents
sudo ln -s /Volumes/Home/ryan/Documents /users/ryan/
That technically would work just fine doing the exact same thing under Linux, should I have installed my entire Linux system on one partition and just symlinked my home folders to their corresponding locations on the large FAT32 partition. However, I chose to do it "my way" for several reasons;
1) FAT32 filesystems cant support files larger than 4 GB, and considering I like to rip DVDs that was simply a nogo.
2) FAT32 is non-POSIX compliant, meaning is doesnt handle Linux (or in the case of OSX, UNIX) file permissions properly. Ive run into problems with not being able to write to FAT32 drives from Linux and OSX because of not being able to change file permissions properly. Maybe this has gotten better over the years but ever since flash drives have gotten bigger than 4GB I have completely abandoned FAT32.
3) Im primarily a Linux user. If one OS has to play host to my files, it should be Linux. Plain and simple.
4) Of all of the formats I could have used (EXT2/3, FAT32, NTFS, HFS+) EXT3 seems to have be the most efficient but this is my opinion based on anecdotal observation. Linux read/write speeds to and from NTFS are absolutely TERRIBLE, whereas Windows read/write speeds to EXT2/3 doesnt seem as bad.
The last order of business was to make Windows use my home partition. Now, it may seem like the obvious thing to do is to right click the "My Documents" folder on Windows and change the target to /home/ryan and be done with it, but THIS IS A TERRIBLE IDEA!!! Setting your "My Documents" folder to your /home/user folder will result in permissions problems so dont do it. Under Windows 7, you can change each individual folder (library?) to target another directory. The same is not true for Windows XP though. I had to delete all of my folders from "My Documents" and then create shortcuts to each of the folders in "/home" and place them in "My Documents". Unfortunately, a shortcut is not handled the same way as a symlink. First a shortcut has a file extension .lnk so most programs wont see the shortcut as a directory and by default will probably recreate the folder its looking for, eg;
C:Documents and SettingsusernameMy DocumentsDownloads
Unfortunately, there doesnt seem to be a good way of getting around this except for changing the default location that applications save/download to manually. I prefer the target changing method of Windows 7, but Im using XP. Why am I using XP? Because it has a smaller foot print than Windows 7 and because its more compatible with the few things I still need Windows for, like accessing school web sites that only want to work properly on Windows XP using Internet Explorer. IE9 breaks a lot of functionality that certain sites need and since I primarily use my netbook for school, thats a no-go.
Im looking into making XP use another partition for individual folders and not "My Documents" folder a little more transparent. Maybe there is a way to do it with registry hacks, but thats a dangerous game to play. Ill post back when and if I figure something out.
EDIT:
I tried like four different methods of creating UNIX like symlinks or junctions either via the command line or using applications and I finally found one that works. Just download Winbolic and create the links. There are a couple of warnings about linking a link to itself and other stupidity like the fact that if you delete the Windows junction it will delete the target folder too. Other than that, it works like a charm and achieves total transparency with interoperability and function.
Available link for download