Re: How do I put Multiple live distro's on a USB flash drive.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 30, 2010 at 8:27 AM, tux <tux@xxxxxxxxxxxxxxx> wrote:
> I have an 8GB flash drive that I would like to put multiple Fedora Live
> CD's on. (KDE,Gnome,LXDE,XFCE, FEL, Games and Edu,Third party spins, etc. )
>
> Does anyone have any advice on how to do this

I think it should be straightforward to do this, but you'll need to do
it carefully and methodically.  I do something like this with my
VirtualBox disk images.  I put them in physical partitions for
efficiency, but sometimes copy them out to regular, uncompressed files
then convert them to sparse images then compress them with bzip2 for
backup.  I works real well, but is tedious and error-prone.  I need to
automate it or Imma gonna overwrite my /home with some WinXP disk
image.

Anyway what you need is a Master Boot Record on the first 512-byte
sector of your USB stick.  Make one small ext2 primary partition for
/boot, then a logical partition for each of your live CDs.

The MBR only allows four primary partitions, but only /boot needs to
be a primary.  So you can make one primary, then one extended.  Within
the extended you can make as many logical partitions as you like.

The primary and extended partitions are stored directly in the MBR,
towards the end of that first sector.  The extended is divided up into
logical partitions, with their positions and sizes specified in a
linked list that is also inside the extended.  I don't know the
details but I would imagine each partition link element is just before
each logical partition.

Use "ls -s" to get the size of each of your LiveCD images in
kilobytes.  If they are compressed, decompress them first.

Multiply the size in kilobytes by two to get the size in 512-byte sectors.

When you partition your stick, use GNU parted - NOT GParted!  Not the
GUI partitioner, just parted, the command-line tool.  Set the size
unit to sectors.  Use parted's help to get the exact syntax but I
think you just use:

   unit s

Create a /boot partition as I said with ext2.  I don't think it needs
to be very big - a megabyte or two would be plenty.  It won't contain
a kernel as /boots usually do.

Create a logical partition for each of your LiveCDs.  Make each
partition EXACTLY the same number of sectors as the LiveCD image that
will go into it.  It's OK if the partition is bigger - it just wastes
some space.  Make sure it's not smaller.  It's really best to be
careful and methodical and get the size exactly the same.

You'll need to figure out the /dev entry for your USB stick.  Chances
are that it is /dev/sdb though - the second SCSI drive.  USB Mass
Storage is built on the SCSI Architectural Model.  /dev/sda would be
your boot disk if you're using SATA, SAS or Parallel SCSI.  If your
boot disk is /dev/hda, then it is Parallel IDE.  If that's the case
then your USB stick is probably /dev/sda not sdb.

*** Get It Right Or You'll Be Sorry! ***

If your stick is /dev/sdb, then the stick's /boot partition is
/dev/sdb1.  Your LiveCD partitions are numbered starting with 5,
because they are logical partitions - /dev/sdb5, /dev/sdb6, /dev/sdb7
and so on.  Partition numbers 1 through 4 are reserved for primary and
extended partitions.

Now use the dd command to copy a LiveCD image into a partition:

   $ dd if=FedoraLive.iso of=/dev/sdb5 bs=512

That copies the FedoraLive.iso input file to the first logical
partition as the output file with a block size of 512 bytes.  Most
storage devices have physical sector sizes of 512 bytes, so you are
required to read or write them in integral multiples of 512.

There's a couple pieces remaining though that I can't explain for you,
but I can give you some hints:

It *should* work to set up grub to chainload each of the LiveCD
partitions. That should work just the same as if you were booting MS
Windows.  Grub would load the first sector out of the desired
partition then run the boot loader found therein.

What I don't have a clue about though is that booting a CD uses a
package called ISOLINUX.  You don't want ISOLINUX to boot a USB stick.
 There is another package for that, but you'll have to dig it up
somehow as I don't remember.  Basically what you need to do is replace
the ISOLINUX on each partition with whatever the equivalent is for a
USB stick.

If I recall correctly the way ISOLINUX works is that it finds a Linux
filesystem image in a single file on the CD, then it loads it as if it
were a filesystem on a real hard disk.  You should be able to use that
same image file, but you will have to use some other software than
ISOLINUX to load it.

Hope That Help!

Don Quixote
-- 
Don Quixote de la Mancha
quixote@xxxxxxxxxxxxxxxx
http://www.dulcineatech.com

   Dulcinea Technologies Corporation: Software of Elegance and Beauty.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux