You can do what you want very easily.
Assumming only a two partition setup, you have to make the FAT partition your first primary partition (it has to be in the same order in the partition table and on the disk, it's usually the case, but strange things happen in Windows if you don't).
On your EXT partition install Ubuntu.
On the MBR install grub as following (I assume you already have a linux machine and grub2 working on it and that your pendrive is detected as /dev/sdb):
mount -t ext2 /dev/sdb2 /mnt
grub-install --no-floppy --root-directory=/mnt/ /dev/sdb
This will setup grub on mbr and install all necessary files on your ubuntu partition. Next you need to setup your grub.cfg with a menuentry as follows (read grub2 documentation or the grub.cfg on your linux pc to build a full grub.cfg):
menuentry 'Ubuntu, con Linux 3.2.0-39-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set=root UBUNTU_PARTITION_UUID
linux /boot/vmlinuz-3.2.0-39-generic-pae root=UBUNTU_PARTITION_UUID ro quiet nosplash
initrd /boot/initrd.img-3.2.0-39-generic-pae
}
You need your partition UUID for this to work on computer with more than one disk:
# blkid /dev/sdb2
/dev/sdb2: LABEL="GPART" UUID="75cdfe28-0ad8-4f0a-8c1d-9af6b2a5ba88" TYPE="ext2"
I'll leave it up to you to find out how to add a second entry for memtest86+, which is perfect for this kind of rescue flash drive.
Try this:
- Remove the existing entry for your CDROM disc from
/etc/apt/sources.list
- Mount your flash drive somewhere.
Do
apt-cdrom add -d=/mount/point/of/the/flash/drive
If this doesn't work for the flash drive, try dd
-ing the .iso
file back from the flash drive, loop-mount it (mount -o loop,ro /path/to/the/file.iso /mount/point
) and try using apt-cdrom
again.
Yet another possible option, if you're about to use this on multiple computers on a LAN, is to use a toop like reprepro
to create a Debian repository on a dedicated server, feed it all the packages from your installation media and serve the resulting repository using a web server.
Best Answer
There are very many tool to create an installer e.g. Five apps for creating installation packages
After creating the *.msi package and copying it to USB stick just write such a Autorun.ini file like: