01 June 2007

What's up with Ubuntu? GRUB and XFS

I was interested in trying out Ubuntu Studio, which is a VERY cool idea. However, when I went to install it with my preferred filesystem XFS, I was shocked/horrified that it tells me I shouldn't use it for /boot. XFS never hurt me before. After doing a bit of googling, I come to find out that this is a bug with Ubuntu's GRUB installer, inherited from Debian, that they still haven't fixed after almost 3 years as of this writing (first reported in September of 2004), and it's still marked with low importance.

To me, this is an unfathomable oversight. Firstly, as to whether this is a grub problem, most other major distros I've used don't have a problem with this (Mandrake, SuSE, Redhat), and there's a straightforward workaround (below). Secondly, as to the usage of XFS, it has a great feature set and nice performance. At work, it has been rock solid. XFS is GPL code, put out by a well-known vendor (at least in the HPC realm), SGI.

I found some instructions on how to work around the GRUB+XFS issue in the installer. I'll repeat them here with a little clarification.

When it asks if you want to install LiLo, hit Escape to go back to the menu,
Select the installation step for installing GRUB. Hit Yes at the prompt to continue
When it gives an error, Hit Go Back, and Continue.
Hit Ctrl-Alt-F2, then Enter to get a console, then run the following commands
# mount -t proc procfs /target/proc
# mount -o bind /dev /target/dev
# chroot /target /bin/bash
# source /etc/profile
# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Stay in the console, you'll need it later.
Hit Ctrl-Alt-F1 to get back to the text installer.
Do the installation step for GRUB again. Install to the MBR.
It will freeze at 50%.
Hit Ctrl-Alt-F2 to go back to your open console
# xfs_freeze -u /boot
Hit Ctrl-Alt-F1 to get back to the installer
It should be finishing up the installation.

HTH someone

2 comments:

Anonymous said...

Thanks man. This was a great help.

Anonymous said...

Amazing. Thanks!