29 December, 2010

Doing wacky things with the (k)ubuntu installer and live cd

I have groaned numerous times in the past that Ubuntu no longer (it used to be in there, folks...) contains LVM in the installer. This sucks for a lot of reasons, but mostly it sucks because it doesn't have to be that way. Since the box to configure any other kind of partition scheme than "one giant ugly partition" is called "Advanced", why do we not just assume that the user has clicked said button and knows how to make logical (and physical and groups and ponies) volumes?

How this all sort of worked out is thus: I was having trouble with installing Natty from a memory stick (and the Maverick CD wouldn't boot the machine at all, so I figured what the hell, let's try Natty; this was kind of a rough day to begin with), and so I decided I would be tricky and simply boot from yon memory stick and then apt-get install nfs-common, mount the cdrom and just install from the network that way. Unfortunately, due to not having a connection to the internet with the Natty machine (but having a connection to the machine next to it*), I was not able to simply grab it from the repository. This led to me reading an old-and-stale post explaining how to set up your own mirror of (debian). I think, since that came out, the tool apt-mirror(1) has emerged (hah, that worked out well) – sudo apt-get install apt-mirror – and it is a lot easier to pull down a mirror. One simply configures apt-mirror and it does most of the work of "creating a repository for you."

But back to my install. By this point, I realized I could mount the repository, but it also became immediately apparent to me that I could install lvm in the "live cd" (where "cd" is "whatever you booted off of) environment. So I worked up that fancy ssh bit for the (pointopoint) machine next to it, like so:

deb ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty main restricted universe multiverse
deb ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty-security main restricted universe multiverse
deb ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty-updates main restricted universe multiverse
deb ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty-proposed main restricted universe multiverse
deb ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty-backports main restricted universe multiverse

deb-src ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty main restricted universe multiverse
deb-src ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty-security main restricted universe multiverse
deb-src ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty-updates main restricted universe multiverse
deb-src ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty-proposed main restricted universe multiverse
deb-src ssh://host/export/linux/natty/mirror/archive.ubuntu.com/ubuntu natty-backports main restricted universe multiverse


And simply commented out the rest of the lines. A simple "apt-get update" and it (slowly... why is it the ssh method is so, so slow? on a gigabit point-to-point connection?) updated its package list, and I cheerfully installed lvm and its associated packages, and went to town with fdisk and lvm tools carving up my disks.

I then ran the installer from the live cd-or-whatever environment, clicked Advanced, and began to select mountpoints and filesystems (even though I had already made them ext4, it wanted me to choose – leaving it alone wasn't okay, although not formatting it or not using it was) for my new logical volumes.

There was a problem with this, however. As I did this, it would only let me select seven volumes/mountpoints and then upon selecting the eighth, would crash. Now, in this case, I had created two special logical volumes, /export and /VM, so I elected to just not use them during the install process and figured I'd re-attach them by hand after the installation.

Minus the two volumes I wanted in my default fstab, the installation went off without a hitch, taking a whole lot longer than normal (for some reason there were lots of calls to resolve hostnames during the install, and each one had to time out because while I had network connectivity, it was not connectivity with functional dns. I know this because I watched the traffic with ufw's logs.). Everything seemed copacetic, but the installer barfed all over my grub configuration and the system was (is – I haven't fixed it yet) unbootable.

The system is fully installed; I can mount all the logical and standard partitions and traipse through them without issue, it's just that the grub config included data about the logical volumes, when /boot was on / and / was of course a physical, normal, ext3, volume. So, first of all, I miss the old grub with the simple menu.lst. Second, I hate debugging grub on a good day. Third, it is in fact possible to install (k)ubuntu on top of lvm – it's just an enormous pain in the ass and seems buggy. Now, you may (correctly) point out this is the Natty installer, and Natty is in fact alpha right now. So I will try my same trick with Maverick, and see if the Maverick installer has the same problem. If Maverick does, I think I shall submit a bug (although I seriously doubt anyone else is doing this).

In related news, I am reading up on debian pre-seeding, as it looks like I can just configure all the lvm and everything else much the same way I would with kickstart or jumpstart.


*this bit is for google: yes, the intel e1000e "ether express pro" gigabit nic autoswitches/auto switches – autocrossovers, whatever. you do NOT NEED a crossover cable for this nic. thank goodness.

Please Donate To Bitcoin Address: [[address]]

Donation of [[value]] BTC Received. Thank You.
[[error]]
Post a Comment