Persistent, resizable, live Ubuntu 8.10 Intrepid install on a USB drive

by krisrowland

This could turn out to be very useful. I’ve just (FINALLY!) managed to get a persistent Ubuntu 8.10 Intrepid Live install working on my external HDD. It’s looking pretty good so far. Updating as I type…

There are many ways to create a persistent install of Ubuntu on a USB drive. The latest Ubuntu 8.10 Live CD actually has the ability to do it: System -> Administration -> Create a USB startup disk. Once selected, the Live CD itself is used as the source of the install. You select the attached USB drive and whether or not you want the install to be persistent or not. You can even select the size of the persistence change file you’d like (actually the casper-rw file located in the root folder). Neat.

Another great option is to follow the instructions given on the PenDriveLinux.com site. A great site which is really easy to follow. In the end I used the instructions for installing via Windows (*gasp*). There’s also instructions for installing from a Live CD.

This is all well and good but the issue for me is that the persistence change file (casper-rw) can’t be changed in size without destroying the contents (as far as I can tell). How am I meant to accomodate more room if I go nuts with installations? The answer is surprisingly easy and appears to be possible due to the way the Casper package works.

To do this, the only deviation from the Windows installation for me was the creation of three partitions on the drive prior to executing the usual process detailed in the PenDriveLinux.com instructions; key if you want to be able to resize your persistent changes storage. The process I used was:

  1. Boot the Ubuntu 8.10 Live CD
  2. Insert my USB drive
  3. Open GParted (System -> Administration -> Partition Editor)
  4. Create 3 partitions formatted as (change sizes as desired): 1GB as FAT32, 4GB as ext3 and named: casper-rw, remaining space as ext3 and named home-rw. Casper is clever enough to pick up the fact that these partitions are to be used as the persistence and home rewritable paths. Awesomz! (I had a fair bit of pain getting GParted to play with my drives – see below – and the HDD was the only one that allowed me to create the 3 partitions; no idea why)
  5. Boot back into windows and insert the partitioned drive.
  6. Run U810.bat (with the Ubuntu-8.10-Desktop-i386.iso Live CD image in the U810 folder, as per the instructions)
  7. Input the drive letter of the FAT32 partition when prompted. All necessary files will then be copied and the partition will be made bootable.

Now, this was done using my 40GB external HDD. I initially tried using my 8GB Flash Voyager USB flash drive, but I simply couldn’t get Ubuntu to format all three partitions correctly. It would consistently fail when creating the final partition no matter what order I did things in. Oh well… the HDD is probably a better option, anyway. Careful: If using a HDD over a flash drive, you’ll have to alter the makeboot.bat file that is run after the U810.bat file is run. The process will actually tell you what to do: I got an error message saying that the specified drive was not removable media… not correct but it’s probably due to the fact it’s a HDD, not a flash stick. The script suggests adding a “-f” tag. Where, you ask? Open up the makeboot.bat file in your favourite editor and add “f” to the end of the tags (the letters after the dash “-“) after the syslinux command. Then just run makeboot.bat again, being sure you run it from the correct drive (U810.bat will copy it to the root directory of the USB drive specified – that’s the copy you want to run). Also, you’ll have to run as Administrator in Vista (but you get reminded of that enough via the script).

Update: After the updates finished downloading, I had a few errors/crashes apparently related to the fact that I’m using a Live install. The Update Manager seems happy afterwards, though. I stupidly didn’t save the exact error messages, but they were something along the lines of “couldn’t create link to… Using a Live CD” with a package broken after the install. Hopefully it’s not critical to the functioning of the install. If all continues smoothly, I guess it’s safe to ignore.

Meta-Update: I seem to have fixed the issue. The initramfs cannot be linked to due to the Live nature of the install. However, the broken package error is easily fixed and update no longer crashes because of it. All I did was un-install and re-install the offending packages: linux-image-2.6.27-7-generic and it restricted modules counterpart. I didn’t reboot between un-installing and re-installing. If you do, it seems Ubuntu won’t boot as parts of the 2.6.27-7 kernel are still in use. I’ve also found this eventually happens for the linux-image-2.6.27-11-generic package, too. Just uninstall then reinstall as before, being sure that all packages that are automatically removed are reinstalled (for me these were linux-generic, linux-image-generic, linux-image-2.6.27-11-generic, linux-restricted-modules-generic, linux-restricted-modules-2.6.27-11-generic).

(!) Fixes: After using this persistent install for a while, I’ve come across a few issues. I’ve written up my fixes for the main issues on this bLog:

Share this post with AddThis!

Advertisements