Ubuntu Server shorten motd message
Ubuntu MOTD gets more lengthly every time a new release comes around with all kind of 'usefull' information and even 'newsflashes'. To disable bits remove executable permissions from parts you do not care about in file:/etc/update-motd.d/
For example to disable the introduction links, motd 'news' and livepatch 'spam':
$ sudo chmod 0666 /etc/update-motd.d/10-help-text $ sudo chmod 0666 /etc/update-motd.d/50-motd-news $ sudo chmod 0666 /etc/update-motd.d/80-livepatch
You can check the result using:
$ sudo run-parts /etc/update-motd.d/
EFI and GPT two new kinds in town
Introduction
EFI (Extensible Firmware Interface) GPT (GUID Partition Table) have been around for a while. As a matter of fact the have been under my fingers for almost two years, as my MacBookPro4,1 had both available.
So why the sudden interest in them? I got forced re-installing my operating systems when I was playing around with FreeBSD experimental installs (say bye-bye to the partion table, my own fault!). Hence I thought it would be nice to make a QuadBoot+ system of it.
Using the good old MBR way I could in theory host 4 Operating Sytems, but their is a 'hidden' EFI firmware-to-be-installed-and-used-maybe-in-the-future-partion causing this great plan to fail. As this was claiming one of my presious MBR partions. So here is where GPT comes into handy. This partion scheme allows us to use as many partions as we want. And with an hybrid setup the 4 partions are synced back to MBR partions allowing the ooldies in OS world to still boot somehow.
So here is where EFI comes around the corner. As this (in theory) allows booting to other partitions as this is NOT a standard PC-BIOS thing ---and so does not behave like one _really_!--- you will endup in some big pain if things go wrong.
Planned setup
First things first. The Planned Partion layout with type and mount point if needed. Due to the hybrid setup partions can be dual labeled.
- EFI firmware
- Linux (ext4) (/ mountpoint)
- FreeBSD (ufs)
- Windows XP (NTFS)
- MacOSX (hfs+)
- Linux (swap)
- Linux (ext4) (/home mountpoint)
- FreeBSD (swap)
- Windows7 x64
Problems
First thing to wonder, why Windows XP on partion 4, just because, if you don't it simply fail no explanation possible. It also does NOT support any EFI/GPT magic so you will need the good old 'bootcamp'/hybrid way.
Secondly Windows7 x64. Note that the i386 versions does not support EFI at all. Also MacbookPro4,1 has UEFI implementation 1.1 while Windows7 _really_ needs UEFI implementation 2.0. So no luck for the Windows7 as well.
Next Linux (or Ubuntu 10.10 in my case). When you try to run it with a native EFI boot loader by following the guide: http://grub.enbug.org/TestingOnMacbook you will find yourself in a pretty useless situation as the linux kernel (and both nouveau/nvidia kernel modules) makes all kind of assumptions about having a PC-BIOS at all. The provided emulation is not actived when booting with native EFI and grub is (not yet) smart enough to get all going again. So you will end up with a not working system (altough bootable and with some basic screen capacities).
FreeBSD (8.1-RELEASE) does not even support booting natively from EFI yet (motivation found so far: the EFI loaders, provide enough BIOS emulation to get it booting anyways), but does support GPT out-of-the-box. But their gptboot enabled loader thinks as beeing the only one in the world and is not capable of booting any other operating system. So we are going to need GRUB2 to fire off this partion.
Working setup
- First of all install MACOSX and create your partions using the 'Disk Utility'. You can format them HFS+, and the windows partion FAT32 as you can savely reconfigure at later stages. But you really only need one FAT32 in your list of first 4, else the windows installer gets confused.
- Now intall rEFIt, this GUI EFI loader will save you a lot of keypressing and hoping the embedded bootloader picks the right CD/disk/whatever.
- (Optional): Install Windows XP, I have not tried it, but it should work fine.
- Have rEFIt 'resync' partions before trying to boot anything.
- Install Ubuntu, the GRUB2 bootloader automatically get installed on the MBR bit which we later need to boot all kind of OS fun.
- Have rEFIt 'resync' partions before trying to boot anything.
- Install FreeBSD, the manual way, don't use the sysinstall and DO NOT install the bootloader/bootmanager as this will have you to restart again.
- Point your Grub boot loader to also allow booting to FreeBSD (see my previous blog post).
Conclusion
GPT is a pretty usefull and workable subsistute for MBR, to finally get rid of the pain which comes when installing multiple Operating Systems (or versions of it) and is also nicely supported by all modern operating sytems.
EFI on the other hand really needs working on. GRUB2 and Linux, kind of work. But FreeBSD is not supported/working yet and also does not provide a native loader to start with. Windows7 really needs modern hardware which seems like a resonable choice as mine notebook is older than 2 years and is barely specd to run it anyways.
Will keep you posted as I really like to run native EFI powered OS to finally say goodbye to PC-BIOS. Which is in my option be around for far to long.
How-to boot FreeBSD with Grub2 under Ubuntu 10.10
I recently upgrade to Ubuntu 10.10. Which also caused grub to be updated to version 1.98
(to be exactly {1.98+201000804-5ubuntu3
), which used a different syntax to define partitions instead of numbers which where off by one, they now use msdosX style formatting.
My FreeBSD is located at /dev/sda3 on a good old MBR partition table and I want to use the good old FreeBSD boot loader as well (so chainloading is required). To activate within Ubuntu. Put the following contents in file:/etc/grub.d/40_custom:
#!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry "FreeBSD (on /dev/sda3)" { savedefault insmod chain set root='(hd0,msdos3)' chainloader +1 }
Note: My hd0 is file:/dev/sda under Linux and got named file:/dev/ad6 under FreeBSD If you want to boot of a GPT partion use the following syntax
#!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry "FreeBSD (on /dev/ad6p3)" { savedefault insmod ufs2 set root='(hd0,gpt3)' kfreebsd /boot/loader }
Update your grub and use should be done: rick-eee$ sudo update-grub