[conspire] Pancake story: Xubuntu multi boot custom partition install

Rick Moen rick at linuxmafia.com
Thu Jan 26 20:49:53 PST 2012

Quoting Roger Chrisman (roger at rogerchrisman.com):

> In which *Ubuntu custom partitioning installer flips but fails to
> serve pancakes.
Roger -- 

I loved the pancake recipe you included.

At the time you posted that query to the mailing list, I was on a trip
out of two (to the SCALE conference) and skimmed it but didn't have time
to do it justice.  I'm still trying to parse what you posted on the fly,
so pardon me if this post ends up missing a target or two.

[You were trying to do custom partitioning from an Ubuntu installer
on your multiboot laptop.]

> error: incompatible license.
> grub rescue>

Well, that's a bit unsettling, isn't it?

This page explains the licence angle, more or less.  The core of GRUB
now issues that error if an action causes GRUB to try to load a GRUB
module (say, a boot module residing in the superblock of one of your
filesystems, or living as a file in the /boot/grub/ directory in 
such a filesystem) that upon examination has a licence incompatible with
GRUB's GPLv3 licence.  So, if one of your filesystems has some very old
boot code in it, GRUB might be refusing to chain-boot to it. 

> However, I don't know how to tell Grub2 where boot is, nor do I know
> for sure where it is, although I think it may be at the beginning of
> the sda drive.

Hmm, not quite.

The thing is, by going into 'grub rescue>' aka Rescue Mode, GRUB is 
trying to be helpful by giving you a chance to tell it where to find the
/boot/grub (normal location, though it doesn't actually need to be
under /boot) folder, the grub.cfg aka menu.lst file, and the modules that
are supposed to live in (I'm pretty sure) /boot/grub.  There's a whole
GRUB-specific lingo you can use to talk to it at the 'grub rescue>'
command prompt, to tell it where things are and that it should then 
attempt to boot again.  The page you cited
has a decent rundown on how to talk to the GRUB command interpreter.

Your problem, though, is that you seemingly didn't really know where
things were, so your problem was less how to talk to GRUB than what to
say to it.

Here's an exhaustive rundown on how to talk to GRUB, by the way
(the GRUB2 versions fashionable these days):
http://dedoimedo.com/computers/grub-2.html .  You can always find 
it linked from http://linuxmafia.com/kb/Kernel as recommended docs.

Anyway, your core problem was that, after the Ubuntu custom installer
got through washing, drying, folding, and starching your filesystems,
you really hadn't a clue where you needed to point GRUB towards.
To solve that, gosh, I guess I recommend just writing on a paper what
your filesystems are at the start, and jot down your changes as you go
-- _and_ you should have some idea of how (using what boot components,
located where) your system has been booting until then, so you can if 
necessary whack GRUB upside the head and say 'Here, and here, and here.'

Personally, I like to keep my booting simple.  Here's how things are on
my workstation:

root at borgia:~# fdisk -l /dev/sda

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbb59bb59

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1216     9767488+  83  Linux
/dev/sda2            1217        1459     1951897+  82  Linux swap /
/dev/sda3            1460        8510    56637157+  83  Linux
/dev/sda4            8511        9726     9767489+   5  Extended
/dev/sda5            8511        9726     9767488+  83  Linux
root at borgia:~#

root at borgia:~# cat /etc/fstab
/dev/sda1   /           ext3 defaults,relatime,errors=remount-ro  0    1   
/dev/sda2   none        swap sw                                   0    0   
/dev/sda3   /usr        ext3 defaults,relatime,errors=remount-ro  0    2   
/dev/sda5    /mnt/stuff ext3 defaults,relatime,errors=remount-ro  0    2   
root at borgia:~#

Three data-bearing partitions, plus a swap partition.  GRUB launches
from the MBR (master boot record), finds the intended root filesystem 
on /dev/sda1 (which it thinks of as '(hd0,1)'), digs through that
filesystem's tree to find /boot/grub, and finds grub.conf and the
modules there, which in turn permit it to do the rest of the boot steps
-- finding a kernel and initrd, and so on.

If you have MS-Windows in the picture, it's common to concede the MBR to
Microsoft, make the Microsoft MBR loader branch first to a filesystem
where GRUB lurks in the filesystem superblock, and let GRUB give you
your boot choices from there. 

> So I decided to redo the install, this time without
> checking the "[  ] install proprietary software and drivers" box.
> However, I still used the custom partitioning option to install
> between existing partitions. After this re-install, at reboot I again
> got:
> error: incompatible license.
> grub rescue>

Conclusion:  Your problem didn't lie in the software you installed from
the Ubuntu CD at all, but rather in the fact that the controlling GRUB
instance was still looking somewhere inappropriate for GRUB modules, 
probably on the wrong filesystem, where you had some ancient GRUB files
it didn't like.

> I had been trying to pancake a new install between existing partitions
> using the installer's custom partitioning option.  Installer didn't
> like that and tried to pancake down the other partitions, sda6 to
> sda5, sda7 to sda6, etc. and put my install above them, on sda10,
> instead of on sda5 where I had told it to.

Annoyingly, a lot of distro installers' partitioning steps persist in
believing they're wiser than you and rearrange things you tell them to
do into something different you didn't ask for.  I remember the first
time the Red Hat Linux (this is ages ago) 'anaconda' installer attempted
that sort of malarky on me.  I just backed out of the graphical
partitioning screen, hit Ctrl-Alt-F1 to open a text console, and ran
good ol' /sbin/fdisk, which is user-hostile as all hell but puts you
completely in charge.  I completed my partitioning, saved to disk,
did Ctrl-Alt-F7 to switch back into the graphical installer, and 
continued _without_ using Red Hat's partitioner.

I'm not saying you need to share my love for a cranky old user-hostile
partitioning program, but there's something to be said for using a
partitioning tool _you_ like.  E.g., find a live-CD disk with a
partitioner you like, and use that rather than the distro installer's
custom partitioning screens to set things up.  Some folks like
PartedMagic (PMagic).  I burn new CDs for the CABAL collection as new
versions come out, and you're most welcome to try them.  (If you're
desperate, you can talk me into giving you my disk, and I'll download
and burn a replacment for myself.)

> So I gave the install one last try using the installer's custom
> partitioning option. _But_, this time instead of trying to pancake my
> fresh install into /dev/sda5, between other existing partitions, I
> told the installer to delete all partitions above sda3 (sda1-3 are my
> Windows 7 stuff), create a swap partition at sda5 (sda4 is of course
> used for the magic that does logical partitions), install Xubuntu
> 11.10 on sda6 and leave only free disk space above that.
> That worked!

Well, I'm glad you got there, anyway.

More information about the conspire mailing list