Dinh:Genome Miner Upgrades
Jump to navigation
Jump to search
Make sure reFit or reFind is installed on Os X.
- Download reFind by Rod Smith
sudo ./install.sh --notesp
Install GPT fdisk (gdisk
- gdisk should be installed on Os X. If not, download and install version 7.0, newer versions will not work on Os X 10.5.
Make a UBUNTU USB efi bootable drive
- make sure USB is properly formatted. In Os X, open Disk Utilities and click on the USB stick volume, and then Information to see the disk number.
- the Partition Map Scheme should be "Master Boot Record" and the format should be FAT32.
- if not formatted correctly, click the drive, then click Partition. Make 1 large partition with "MS-DOS (FAT)" format and click Options at the bottom to choose "Master Boot Record"
- Name the partition "UBUNTU"
- Next, download the ISO-2-USB EFI-Booter for Mac 0.01 beta
- Next, download the iso file of a recent version of Ubuntu Desktop Edition 64 bit.
- Create the following directories on USB drive: efi and efi/boot
- Copy the bootX64.efi from "ISO-2-USB EFI-Booter for Mac 0.01 beta" into efi/boot on the USB drive.
- Copy Ubuntu image into efi/boot and rename it to "boot.iso"
- There should be two files on USB drive now: bootX64.efi and boot.iso, both are in efi/boot.
- Reboot computer and in the reFit menu, should be able to select "boot from bootX64.efi on UBUNTU".
IMPORTANT: clone boot drive!!!
- Partition the boot drive using Os X for the MacHD or Os X partition using Disk Utility. Make this partition only 500 GB.
- Use "Restore" function of Disk Utility to make an extract & bootable copy of the MacHD.
- After it is finished, boot into the Linux safe mode and run dd to clone the Linux boot partition.
- NOTES: after cloning, the drive should be bootable onto Os X on it own, however, there may be missing EFI booting configuration in the Linux boot partition (if it was mounted on the EFI partition of the drive, it might not get copied over).
- Since we do not need to upgrade Os X, I repeated the process of cloning Os X onto a new HDD.
IMPORTANT: install the new HDD to be the only bootable drive on the Mac Pro
- I tried installation with the new HDD mounted on the external drive, however, this didn't work well. The best thing to do was to remove all bootable or current boot drive and attach only the new HDD (with bootable Os X) to the Mac Pro.
Installing UBUNTU
- NOTE: The following instructions are copied from Rod Smith's instructions here: http://www.rodsbooks.com/ubuntu-efi/.
- Boot into Os X and find out using disk utility what the disk number for the new HDD is.
- Open Terminal program and type:
sudo gdisk /dev/diskN
- Type p to display partition table. Verify that it's the same one shown by Disk Utility. (Note that Disk Utility hides the EFI System Partition (ESP), which is normally the first partition on the disk.)
- If you created a Linux partition, type d in gdisk to delete it. Enter its number when prompted. (If you created multiple partitions for Linux with the intention of using them as you created them, you can skip this step.)
- In gdisk, type n to create a new partition. Give it a number of 99, hit the Enter key to use the default starting sector (the program may tell you it's changed the sector value, but you can ignore this message), +128M as the ending sector, and a hex code of ef02. This creates a BIOS Boot Partition of 128 MiB at the start of the largest block of free space on the disk. This partition will be used by the initial Ubuntu GRUB installation, but you can delete it once you've got native EFI booting working. 128 MiB is actually much bigger than is required for this purpose, but OS X likes to see gaps between partitions when it installs or upgrades the OS, so when you eventually delete this partition, it will leave the type of gap that OS X likes to see. (If you created all your Linux partitions in OS X's Disk Utility, you can put the BIOS Boot Partition in one of the gaps that Disk Utility leaves, but you may need to accept a default value or use +1M rather than enter +128M as the end value.)
- Type p again to see the results
- Type w to save changes and type y to confirm this choice.
- Insert USB boot drive for Ubuntu into the computer.
- Restart Mac Pro and wait for it to boot to reFind screen.
- Select "boot from bootX64.efi on UBUNTU" or the option that you can identify as your boot drive.
- After booting into Ubuntu, select Install Ubuntu and proceed with a normal Ubuntu installation, except as noted in the next few steps.
- When the Installation Type dialog box appears, select "Something Else."
- You will initially see a partitioning screen with your original OS X partitions, a biosgrub partition (what Ubuntu's partitioner calls the BIOS Boot Partition), and free space at the end of the disk. Select the free space and click Add to begin adding partitions.
- Create partitions for your Ubuntu installation in the free space near the end of the disk. (If you did this in OS X's Disk Utility, you should modify each partition by selecting it and clicking Change, then clicking the Format option and setting an appropriate filesystem and mount point.)
- Make /, swap, and /home partitions.
- swap should be created first, should be 1-2X RAM size, should be primary, and select Linux swap or swap space for type.
- / should be the root partition, should be ~100 GB in size, should be logical and ext4 type.
- /home should be the rest of the drive, should be logical and ext4 type.
- Be sure that the "Device for boot loader installation" option is set to the same drive (it will include a complete name for your hard disk)
- Click Install now and go through the final selection steps.
- When the installation finishes, reboot the computer.
Fixing the Installation
- The following steps will return the disk from a hybrid MBR to a protective MBR as GPT standard requires, and to set up grub.
- Boot into Os X and launch a terminal program
- Type sudo gdisk /dev/disk0 (changing the disk identifier as necessary). If at any point in the next few steps something seems wrong, type q to exit without saving your changes.
- In gdisk, type x. The command prompt will change to read Expert command (? for help):.
- In gdisk, type o. This command displays the contents of the hybrid MBR, which will probably consist of four partitions, one of which is of type 0xEE. The Ubuntu installer created a hybrid MBR (if one wasn't already present) in an attempt to be helpful.
- In gdisk, type n. The program won't seem to do anything; it will just show you another command prompt.
- In gdisk, type o again. The MBR contents should be different from before; there should just be one partition, of type 0xEE. This is a standards-compliant protective MBR.
- Type w to save your changes.
- After this step in Rod Smith's guide, reFind needs to be installed, however, I've already done this.
- Load /efi/refind/refind.conf into a text editor and locate the commented-out scanfor line. (If you installed rEFInd to the ESP, you'll need to mount the ESP and load the configuration file from there.) Uncomment the scanfor line by removing the leading hash mark (#) and then add a new item, cd, to the end of the line. It should read scanfor internal,external,optical,cd. (If you're using USB flash drives, add biosexternal instead of or in addition to cd.)
- Reboot into the reFind menu.
- At this point, Rod Smith's guide requires Super Grub 2, however, I didn't need this since reFind was able to find the kernel for the new Ubuntu to boot into. (If reFind can only find the grub*.efi file, you may be able to use the command line grub to find the appropriate kernel and boot into ubuntu. However, make sure to remove all other drives on the systems otherwise, the kernel would be much harder to find this way).
- Once booted into the new Ubuntu, open a Terminal program.
- Check to see if the /boot/efi/EFI/ubuntu folder exists.
- If the above folder does not exist, type "sudo mkdir /boot/efi"
- Type "sudo blkid" to find the EFI partition on the new HDD.
- Type "sudo mount /dev/sdX1 /boot/efi" to mount the EFI System Partition. Change "dev/sdX1" to the correct partition number.
- Type "sudo mkdir /boot/efi/EFI/ubuntu" (if the directory didn't already exist)
- Type "ls /boot/efi". You should see the contents of the ESP, which will probably consist of a single directory called efi. There could be other files and directories, but probably not many of them. If it appears you've mounted the wrong partition, review your partition layout and the commands you've typed to mount the ESP. Proceed only when you're sure you've mounted the ESP at /boot/efi
- Type "sudo apt-get install grub-efi"
- Type "sudo grub-install". Recent versions of GRUB seem to require an option. Pass it your ESP's device filename, as in sudo grub-install /dev/sda1.) You'll see a few messages appear on the screen, including a couple of "fatal" errors about EFI variables. Ignore those messages. They're caused by the fact that you're booted in BIOS mode, and they're irrelevant because the task they're intended to perform will be handled by rEFInd.
- Type "ls -l /boot/efi/EFI/ubuntu". You should see two files, boot.efi and either grubia32.efi or grubx64.efi, depending on your platform. They should have the same file size; in fact, they're identical. Remove other *.efi files, leaving only grubX64.efi and a grub.cfg file.
- check /etc/fstab to make sure there is the following line to mount EFI System Partition automatically whenever you boot (change /dev/sdX1 to the appropriate partition number):
/dev/sdX1 /boot/efi vfat ro,fmask=133 0 0
Final configurations on Ubuntu 14.04
- Run updates:
sudo apt-get update
- Install current nVidia drivers
sudo apt-get install nvidia-current
- Install vim
sudo apt-get install vim
- Install ssh, the client should be already installed but to make sure install it anyways.
sudo apt-get install openssh-client sudo apt-get install openssh-server
- Install antivirus
sudo apt-get install clamav clamav-daemon clamav-freshclam sudo freshclam sudo /etc/init.d/clamav-daemon start
- Install gparted
sudo apt-get install gparted
- The RAID enclosures need gparted to be mounted. Use Athurva's tips on how to mount them.
- Mount the previous root drive, and copy over all user home directories to /home.
- The three Synology disk stations need to be mounted. Make sure all users and groups are set up correctly. Then use Athurva's tips on how to mount them