On Sat, Jan 30, 2010 at 8:27 AM, tux<tux(a)pantherfish.com> 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
On 02/01/2010 09:03 AM, Don Quixote wrote:
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(a)dulcineatech.com
http://www.dulcineatech.com Dulcinea Technologies Corporation: Software
of Elegance and Beauty.
I have been experimenting with grub4dos. I have a single fat32 partition
and have been able to successfully boot gparted live 4.5-2 by putting
the files from the cd image into the /gparted folder on the usb drive
and creating a /menu.lst file with the following entry:
title Gparted 0.4.5-2 Partition Editor
root (hd0,0)
kernel /gparted/vmlinuz1 live-media-path=/gparted bootfrom=/dev/sd
boot=live union=aufs noswap noprompt vga=789 ip=frommedia
initrd /gparted/initrd1.img
On the 64 bit KDE live cd there is this entry the /isolinux/isolinux.cfg
file:
label linux0
menu label Boot
kernel vmlinuz0
append initrd=initrd0.img root=live:CDLABEL=Fedora-12-x86_64-Live-KDE
rootfstype=auto ro liveimg quiet rhgb rd_NO_LUKS rd_NO_MD noiswmd
How would I convert this to work with grub4dos?
Is it possible to copy the vmlinuz0, initrd0.img the osmin.img and
splashfs.img to a folder on the drive and create a grub entry for it?
I would like to create a separate folder for each spin and add an
appropriate grub entry for each one.
Thanks
Tux