Launching a single Live CD Linux distribution off a USB thumb drive is so last year
Running Linux from a USB stick is a fun and sometimes useful distraction. It can be handy if you want to try another distribution, for example, but can't commit to the drive space. Or perhaps your netbook insists on running Windows while your heart hankers for Ubuntu. But running a single, monogamous distribution can be a little limiting, and there's only one reason why you can't squeeze a few more alongside on any decent-sized USB stick: it used to be quite a difficult process.
Formatting the stick
Before we get to the specifics, we first need to make sure the USB stick is primed and ready to go. Specifically, it needs to be formatted as FAT32 - the same as older Windows installations. To do this from Ubuntu, install the 'gparted' package from Synaptic and launch the application from the Administration menu with your USB stick connected. GPartEd represents partitions on your drives in a horizontal block. But it does this for every drive on your system, and for this reason it's vital you select the correct device from the drop-down menu on the top-right. Make sure it has the same capacity and brand as your USB device, and that the current partition table is what you'd expect. Changes made within GPartEd are permanent and destructive, which could put all your valuable data at risk. If no partition table is detected, you will first need to make one by selecting 'Create Partition Table' from the device menu. You can then right-click on the free grey area within the blank partition table and select 'New'. Now select FAT32 from the dropdown File System menu and click on 'Add'. Next, from the main window, click on the small 'Apply' tick icon in the toolbar. This will then create and format the new partition. Lastly right-click on the new partition, select 'Manage Flags' and enable 'Boot' - although this isn't always necessary.Install Multiboot
We now need to install the tool that's going to build the USB stick, and there's a choice of two. The first, and the easiest to install, runs from Windows. It's called Multiboot and it's an executable where you drag and drop the distributions you're interested in, declare the USB destination for the amalgam, and press go. We've covered this process in more detail top right. For Linux users who want to stay within the Linux desktop, there's an equivalent, unrelated, project with the same name, Multiboot-3, which can be found at www.liveusb.info/dotclear. You will need to grab and install this manually as it's not part of the Ubuntu package repository.
Prepare Multiboot
The script now needs to be run using your system administrator credentials. You can do this easily from the Gnome desktop by double-clicking on the script. It will open a shell that asks for your administrator password. You can also run the script from the command line by typing sudo ./install-depot-multiboot.sh. After the script has started, it will take a few minutes to run because it's grabbing and configuring lots of different tools in the background, after which it will launch. When you want to run the script again, you can quickly start it from either KDE's 'Utilities' menu, or Gnome's 'Accessories' menu. When the main window first appears, the script will check to make sure it detects a USB device with the correct format. You may also see a warning about Grub2 being installed on the 'mbr'. This is just a reminder that if you have any other booting operating systems on your memory stick, these will no longer work after the multiboot installation. You also need to validate the USB stick, first by selecting it in the middle list, and then by clicking on the 'Validate' button. It may rename your partition to give it a new label, and ask you to disconnect and reconnect your USB device for the change to be registered. If this happens, you'll also have to quit and restart the application and click on Validate again.Grab some ISOs
After the validation process, you should now be looking at a completely different window, and this is the point where we download and install whichever distributions you want to try. There is a list of those that have been tested and found compatible at the Multiboot website, but this list has also been embedded within the application itself, and can be found by clicking on the 'Menus' button, followed by 'Download LiveCDs'. We'd recommend starting with something small, such as Slitaz, with perhaps an ISO of Ubuntu that you might have handy for some more complex work. Your distribution ISOs can now be added to the USB installation by dragging each ISO file from the file manager or desktop into the lower pane of the Multiboot window. As you do this, you should see your USB stick spring into life. This is because as soon as you drop the file, Multiboot will write the distribution to your storage medium and pop-up an Xterm shell, which will ask for your administrator password. This is required so that the Grub bootloader can either be installed, or updated with details for the new distribution. When the process has finished, you should be able to see the distribution listed in the main window, alongside an icon for your chosen version. With each additional distribution, you'll need to go through the same steps. Another option you might want to choose is the 'Add persistent mode' from the 'Menus' button. As you might be able to guess, this will add an area of persistent storage to your USB device, so that you can save files and change a configuration from within a distribution, and your settings and files will be saved for a future session - just as they would on a local disk. It's a great feature, but there is one major drawback. You can only enable persistent storage for a single distribution. To enable it, select which distribution in the list you want to bestow these powers on, followed by Menu Command. A small window will appear asking you how much space you'd like allocated to the persistent storage, followed by some USB activity. Your chosen distribution has been duplicated, and now includes persistent storage.Running live
You might have noticed that Multiboot includes several test modes for you to try before you go to the trouble of rebooting your machine with the USB stick connected. The quickest way to test that booting is working correctly is to click on the 'Q' symbol. This will launch QEMU, which obviously needs to be installed, then configure it to use your USB stick as the boot device. QEMU is a simple piece of virtualisation software. It's not great for full desktop environments, but it's perfect for checking boot configuration and command line tools. If everything is working, you should see the rather ugly Grub boot menu appear, and this should list all the distributions you've added through Multiboot. Selecting any one of the distributions will cause QEMU to boot the distribution. But unless you've got a fast machine with lots of memory, this might take some time. Now you know there's a working Grub configuration with the correct distributions listed, we'd recommend rebooting your machine and attempting to boot the USB stick off real hardware. There shouldn't be any problems with this.
Troubleshooting your installation
One of the best things about the Linux version of Multiboot is that it provides several excellent options for testing your USB stick after you've installed the distributions. QEMU is the quickest and the easiest to use, but it won't let you use your distributions particularly effectively, as it's too slow. A better option is to use VirtualBox - a much more comprehensive virtual machine environment - which will need to be installed beforehand through the Synaptic package manager. You can then test your USB stick using the 'Cube' icon or the option from Multiboot's test menu. You can use this menu to test the ISO of the distribution if you're having problems after the boot menu. But because it's a full virtualisation environment, you can also test a range of options, such as persistent storage, without waiting an age for QEMU to boot. Some machines can't get to the boot menu, and this is likely to be because they're too old to boot off a USB device. Multiboot has another solution - that is to create a simple boot CD that will load the USB drivers and then let you boot from the USB stick. You can create this disc from the option in the 'Boot' menu.Multiboot from Windows
If you don't have a Linux installation handy, and still want to experiment with multi-booting Linux distributions off a USB stick, there's an application you can use from Windows that does the same thing. Multiboot for Windows is almost identical to its Linux counterpart, and won't complain quite so much about the label on a USB stick. It can also download distributions from within the application, so you don't need to be quite so prepared either. Just insert your USB stick and run the application. The most important option to get correct is your selection from the 'Select your USB Flash drive' menu in the top-left of the window. Your system devices will only be listed as drive letters, rather than anything descriptive, which means you have to be absolutely certain the drive letter you select is your USB drive. Get this wrong and you may lose valuable data, so always check from your file browser beforehand. You can then choose the distribution you want to install from the list. Here are two further options... You can either use the file requester to point Multiboot at the location of the pre-downloaded ISO image for the distribution, or enable the 'Opted to Download the ISO' checkbox. The latter will download the distribution automatically before writing it to the USB stick. When everything is setup, just click on 'Create' to build the stick. To add another distribution, just run the Multiboot tool again.For More Check Related Links :
0 comments:
Post a Comment