FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Multipass/multiboot USB





Marcuzzo
Once people know that you know a thing or two about computers, you are a full time Free Help desk for most of your friends and relatives.
This can be a real pain in the a** because you don't really manage or even own the computers.
Because of this you can't really set them up the way you would and the rest is history.

this is the way I've always set up my Windows machines.
- Hide the last logons so each user must enter both username and password
- Administrator account disabled
- created a user with the name root ( this is because I also work with linux and got used to the name root Very Happy ) and gave Administrator rights
- created a regular user with limited rights, yep you guessed it: username "Marcuzzo"

this way I don't have direct admin rights and this provides a little degree of protection.

I've tried this once on the PC of my parents and of my father in law and I will never make that mistake again.
they will call you at work because they are not able to install something they aren't even suppose to install.

I gave them the admin password and in less then a week their PC's were infected. ( I told my father a million times, "Dad, visiting porn sites is like shaggin a nasty dirty hooker without a condom, and you WILL be infected" Very Happy .

and this is where my multiboot usb stick comes in.

There are a lot of tools that you could use to make your usb drive bootable and install a linux distro on it.
examples:
UNetbootin: this one can install a lot of distro's but you need to do some manual editting if you want to install other distro's
XBOOT: this one looks really nice, it needs the 4.0 .net framework and in able to install multiple distro's and even has an editor to edit the boot menu
and there are many more like SARDU and YUMI

I haven't tested these, I made mine manually with just syslinux.

first things first.
1. format your drive to FAT32
some say that the default windows format is not good enough and that you need to use a special format tool like the one provided by HP... nonsens.
just format the drive to FAT32 with the built in Windows tool

2. make the usb drive bootable
again, some say that you need a special tool like PEtoUSB or something...
no, just get a copy of syslinux, click on the Download from Kernel.org link and get the latest version.
- extract the files.
- open up a cmd prompt and cd to the 'syslinux\win32' folder
- run the command
Syslinux howto wrote:
syslinux.exe -m -a X:

* where X is the letter of your usb drive
this should be enough to make the drive bootable.


now comes the fun ( frustrating ) part.

3. preparing the usb drive for linux distro's

3.1. syslinux
3.1.1. open up your drive in explorer and create a new folder with the name syslinux.
your usb drive will also contain file(s) that where installed by syslinux in step 2, go ahead and move these files the syslinux folder you jsut created.
it is ok to move these files as syslinux will look for them in following locations
How do I Configure SYSLINUX? wrote:

All the configurable defaults in SYSLINUX can be changed by creating a file called syslinux.cfg.
SYSLINUX searches for the SYSLINUX.CFG file in the following order:
/boot/syslinux/syslinux.cfg
/syslinux/syslinux.cfg
/syslinux.cfg

3.1.2. create a file syslinux.cfg in the syslinux folder. we will use that one to create the menu.

3.1.3. in the syslinux folder ( the one donwloaded in step 2 ) you can find several files ( you need to go through the folders or just run a search on *.c32) with the c32 extension.
you will need a few of these
I copied the following files to my syslinux folder on my usb drive:
- chain.c32
- ifcpu694.c32
- ifmem.c32
- kbdmap.c32
- linux.c32
- menu.c32
- vesamenu.c32
- reboot.c32


now you could edit directly in the syslinux.cfg file or just reference another one, in my syslinux.cfg file I only have the following line
Code:
INCLUDE /custom/menu.cfg

so if you want to use the same appraoch, create a folder in the root of your usb drive named "custom"
create a new file in that folder with the name menu.cfg ( or whatever you want but make sure that the name is the same as in the syslinux.cfg file )

let's add our first distro

3.2.Adding slitaz
I'll be showing a few lightweight distro's so you won't lose a lot of time waiting on the download to finish.
get the slitaz stable iso: http://www.slitaz.org/en/get/#stable
unpack the iso with 7zip ( or equivalent)
inside you will see 2 folders: [BOOT] and boot
all we need is in the folder named "boot" so you can safely delete the folder [BOOT] and the files: index.html, md5sum, README and style.css
infact: ANY iso that you unpack, if it has a folder [BOOT], delete it, you don't need it as it is used in live CD's
inside this folder "boot":
- delete the folder "grub" as we don't need it.
- open the folder isolinux:
- in this folder you will find a syslinux.cfg file, if you open that one in a texteitor you can see the kernel boot options and arguments.
I just copied all the LABELS and saved them in a file named custom\desktop\slitaz.cfg and modified it to my needs

this is what my slitaz.cfg looks like
Code:
 
MENU BEGIN
MENU TITLE SliTaz

LABEL slitaz
   MENU LABEL SliTaz Live
   kernel /syslinux/ifmem.c32
   append 192M core 160M gtkonly 100M justx 48M base noram

label noram
   MENU HIDE
   config noram.cfg

LABEL core
   MENU LABEL SliTaz core Live
   KERNEL /slitaz/bzImage
   append initrd=/slitaz/rootfs4.gz,/slitaz/rootfs3.gz,/slitaz/rootfs2.gz,/slitaz/rootfs1.gz rw root=/dev/null vga=normal autologin

LABEL gtkonly
   MENU LABEL SliTaz gtkonly Live
   KERNEL /slitaz/bzImage
   append initrd=/slitaz/rootfs4.gz,/slitaz/rootfs3.gz,/slitaz/rootfs2.gz rw root=/dev/null vga=normal autologin

LABEL justx
   MENU LABEL SliTaz justx Live
   KERNEL /slitaz/bzImage
   append initrd=/slitaz/rootfs4.gz,/slitaz/rootfs3.gz rw root=/dev/null vga=normal autologin

LABEL base
   MENU LABEL SliTaz base Live
   KERNEL /slitaz/bzImage
   append initrd=/slitaz/rootfs4.gz rw root=/dev/null vga=normal autologin


LABEL help
   MENU LABEL Help & Options
   MENU HELP help.en
 
MENU SEPARATOR

LABEL return
MENU LABEL Return to main menu
MENU EXIT

MENU END


next, copy all the other files: bzImage, gpxe, rootfs1.gz, rootfs2.gz, rootfs3.gz, rootfs4.gz abd vmlinuz-2.6.37-slitaz over to a folder named "slitaz" in the root of your usb drive.
that's it, you should be able to boot slitaz from your usb stick.

in the same way I've added several linux distro's to it with different functions: recovery, cleanup and even password resetting.

here's another one:
Avira rescue cd
this one one is a bit trickier
1. download the iso from http://www.avira.com/en/download/product/avira-antivir-rescue-system
2. Unpack the content to the Folder "avira" in the root of the usb drive
3. move the folders "antivir" and "system" over to the root folder of the usb drive ( NOTE without this you will get the error "Self check failed" error)
4. point to the kernel files in avira.cfg

this is my avira.cfg file in custom\windows_av\avira.cfg
Code:
MENU BEGIN
MENU TITLE AVIRA AntiVir Rescue System v3.7.16-20120731_185554
F2 /avira/welcome.msg

MENU TABMSG Press <TAB> to edit options or <F2> for more info

label 1. Boot AntiVir Rescue System (default)
    kernel /avira/vmlinuz
    append nofb initrd=/avira/initrd.gz ramdisk_size=107023 root=/dev/ram0 rw  console=/dev/vc/4

label 2. AntiVir Rescue System ( Advanced )
    kernel /avira/vmlinuz
    append vga=ask initrd=/avira/initrd.gz ramdisk_size=107023 root=/dev/ram0 rw  console=/dev/vc/4

label 3. debug
    kernel /avira/vmlinuz
    append vga=ask initrd=/avira/initrd.gz ramdisk_size=107023 root=/dev/ram0 rw

label 4. nogui
    kernel /avira/vmlinuz
    append nofb initrd=/avira/initrd.gz ramdisk_size=107023 root=/dev/ram0 rw  console=/dev/vc/4 av-nogui

MENU SEPARATOR

LABEL return
MENU LABEL Return to main menu
MENU EXIT
MENU END


here is the full list of what I have installed on my 16Gb usb drive
Desktop:
- slax
- slitaz

Rescue Kit's:
- rescuecd

System Administration:
- parted magic
- gparted
- dban
- Inquisitor

Antivirus:
- fsecure
- avira
- avg
- Panda SafeCD

Security:
- backtrack
- Network Security Toolkit.. still having issues with this one
- ntpasswd
- ophcrack


this is what my menu.cfg file looks like
Code:
#Set the default UI
UI vesamenu.c32

#http://www.syslinux.org/wiki/index.php/SYSLINUX#PROMPT_flag_val
#PROMPT flag_val
#If flag_val is 0, display the boot: prompt only if the Shift or Alt key is pressed,
# or Caps Lock or Scroll lock is set (this is the default).
#If flag_val is 1, always display the boot: prompt.
PROMPT 0

NOESCAPE 1

#Timeout
TIMEOUT 900

MENU TABMSG Press <TAB> to edit options or <F2>,<F3>,<F4>,<F5>,<F6>,<F7> for help

MENU TITLE MARCUZZO'S ALL ROUND USBKEY (marcuzzo.org)

MENU BACKGROUND /custom/background.png

# Menu colors
INCLUDE /custom/colors.cfg

MENU WIDTH 77
MENU ROWS 14
MENU TABMSGROW 25
MENU CMDLINEROW 25
MENU HELPMSGROW 23
MENU MARGIN 15
MENU VSHIFT 5
MENU COLOR BORDER       30;44   #00000000 #00000000 none
MENU COLOR SEL          7;37;40 #ffffffff #9090a0f0 std
MENU COLOR HOTSEL       7;37;40 #ffffffff #204040f0 std
MENU COLOR TIMEOUT_MSG  37;40   #aaaaaaaa #00000000 std
MENU COLOR TIMEOUT      1;37;40 #ffaaaaff #00000000 std

MENU BEGIN _desktop
MENU TITLE Linux Desktop distros
MENU LABEL ^A) Desktop
INCLUDE /custom/desktop/slitaz.cfg
INCLUDE /custom/desktop/slax.cfg
INCLUDE /custom/desktop/slackware.cfg
INCLUDE /custom/return.cfg
MENU END

MENU BEGIN
MENU TITLE Forensics Distros
MENU LABEL ^B) Forensics
INCLUDE /custom/forensics/fhc.cfg
INCLUDE /custom/return.cfg
MENU END

MENU BEGIN
MENU TITLE Rescue Distros
MENU LABEL ^C) Rescue
INCLUDE /custom/rescue/sysrescuecd.cfg
#~ INCLUDE /custom/rescue/rip.cfg
INCLUDE /custom/return.cfg
MENU END

MENU BEGIN

MENU TITLE Security Distros
MENU LABEL ^D) Security
INCLUDE /custom/security/backtrack.cfg
INCLUDE /custom/security/nst.cfg
INCLUDE /custom/security/ntpasswd.cfg
INCLUDE /custom/security/ophcrack.cfg
#~ INCLUDE /custom/security/pentoo.cfg
INCLUDE /custom/security/phlak.cfg
INCLUDE /custom/security/warlinux.cfg
INCLUDE /custom/return.cfg
MENU END

MENU BEGIN
MENU TITLE System Administration
MENU LABEL ^E) System Administration
INCLUDE /custom/system_administration/gparted.cfg
INCLUDE /custom/system_administration/parted.cfg
INCLUDE /custom/system_administration/dban.cfg
#~ INCLUDE /custom/system_administration/inq.cfg
INCLUDE /custom/return.cfg
MENU END

MENU BEGIN
MENU TITLE Windows Antivirus
MENU LABEL ^F) Windows Antivirus
INCLUDE /custom/windows_av/avira.cfg
INCLUDE /custom/windows_av/avg.cfg
INCLUDE /custom/windows_av/fsecure.cfg
INCLUDE /custom/windows_av/panda.cfg
INCLUDE /custom/return.cfg
MENU END

MENU SEPARATOR

LABEL -BOOT
MENU LABEL Boot Options:
MENU DISABLE

INCLUDE /custom/boot.cfg


PS: I've been writing this between calls at work, I'll review this at home and add/correct a few things when I get home.
Related topics
Reply to topic    Frihost Forum Index -> Miscellaneous -> Tutorials

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.