I'm trying to install Linux on a single partition of a USB flash drive that's larger than 4gb.
The first place I went to is http://pendrivelinux.com. I can follow these instructions for installing Xubuntu 9.04 perfectly, which unfortunately break down when I try to scale it up beyond 4gb.
There are several other tools to do this (unetbootin and usb-creator) which follow a very similar formula.
I figured out that a big problem of mine was that all of these tools assume the USB drive is formatted in FAT32, which unfortunately cannot hold a single file larger than 4gb. This is unfortunate because I want to use just one partition, so that my persistance file, casper-rw, looks like one big partition to the OS once I've booted off of the USB drive.
I then tried following a myriad of instructions involving formatting the drive as one large ext2 filesystem and using extlinux to create a single bootable ext2 file system.
This doesn't work for me however, after about 20 attempts verifying and slightly tweaking the formula, I cannot seem to get a "good" bootable ext2 file system built. I'm not entirely sure what's going on, but it seems as though no matter how hard I try, I cannot get the ext2 file system to remain coherent after copying the Linux ISO contents over, copying the MBR, and executing extlinux to create the ext bootloader.
Every time, after I follow these steps (in any order) and reboot, I get an unbootable USB drive. If I then mount the drive under Linux again, I see a mess of a file system (inodes have clearly been screwed up somewhere along the way).
I suspected that the USB drive wasn't being fully flushed, so I tried using the "sync" and "unmount" commands before rebooting which didn't affect things at all.
I guess I have several possible questions - but let's start with the obvious - is there something I'm missing to create a bootable ext2 USB flash drive that's large (e.g. 16gb)?
Ubuntu now includes a "install to USB" option in the system menu. This is your best bet and does not require trying to cram a large file onto the stick - instead, files are stored "normally", which means you'll be able to get around the 4Gb barrier.
Install gparted to assist with this:
If the GUI method doesn't work, try directly formatting through the command line instead.
The file size limitation still applies, so if you plan on having large files, Ext2 is still your best choice. Format it as Ext2 and then use the provided tool to do the install.
If you're stuck in a chicken-and-egg situation (only have a Windows install to work with but no live Linux install) you could burn the ISO to a CD, boot the CD, download and install the partition program, run it to partition the stick, and then run the USB install from there.
I have a Partitioned 16 GB USB drive installed with Ubuntu 9.04 on a partition larger than 4GB.
I can mount other partitions properly.
This was done as
Avery
suggests, using the Ubuntu LiveCD 'Install to USB' option, very easily.As an aside,
ext4
-- not sure if that's a good idea yet, i am experimenting. I have also done aext3
install earlier.Update: I have since shifted to
ext2
and found it much more comfortable. You don't need journaling on a flash drive.Some points,
So, it might be useful to let the Ubuntu LiveCD do the partitioning
ext3
andext4
are known to do more writes (journaling); i guess, you are tryingext2
for that reason.But, that also leaves you out with a risky install that could blackout on a crash or bad sync.
Update: I usually have backup power so this is not really a problem.
But, I have recovered the
ext2
very easily from such crashes on this system.sudo sync
before shutdown, still trying to figure out if it is a good idea or just a waste of time:-)
There is also USBuntu, if you want to try it -- a.k.a. LiLi; or, is that what you refer as USB Creator already?
Avery's answer is not true at least in 9.10. The USB creator in Ubuntu only allows you to set up in Fat32. That is it.