ILoveGothChicks

Blogging blogger who blogs about blogging. [Interesting and somewhat funny blog about nothing in particular]

Multiboot USB Instruction - Part2

Ok, in this part 2 I am going to give more detailed instruction for each type of app and how to install them when they need to be multiboot and not fight over boot sector and such.


First some details about different types of bootable apps.

Both Ubuntu and Fedora (linux) have easy to use accessories to let you create a USB bootable.  Except for syslinux folder their folder names for their files are not the same so it's very easy installing both of them on one single drive.

Acronis Backup & Recovery is backup software that can be boot from usb and uses Linux kernel for booting and has usb boot creation wizard also.  It requires a bootsector data just like Ubuntu and Fedora but will not share syslinux and will require a bootsector file.

Memtest (comes with Ubuntu and also can be downloaded, I personally use Memtest+).  This one is pretty simple.  It's a single file with no need for a bootsector.  You just copy and create a menu entry for it.

Offline NT Password & Registry Editor.  This one comes in an iso.  If you want to install bootable CD ISO on USB, often you can just copy files from the iso and this has its own kernels and data to run.  You have to copy the whole folder.  Does not need its own bootsector.

Order of things to install:
Start with apps that require its own bootsector  and then the linux distros, then then everything else.  All of the Linux distros can share a single boot sector and syslinux.

For each step of prepping individual apps we'll need a fat32 formatted empty usb drive.  You can just use one and copy the files off to a folder on your desktop and format the usb for next each step.

Step1:
First for this tutorial let's start with Acronis.  This assumes you already have a working Acronis Backup & Recovery or Acronis True Image installed.  Insert an empty usb.  Go through the emergency boot disk creation process and choose to install on USB and point to your flash drive.  What the utility does is saves a set of files to your usb and makes changes to the bootsector of your flash drive.  This program needs bootsector data to run so we are going to do more than just copy files off of it.  Save all the generated files to a folder on your desktop by themselves.  Let's call it "Acronis boot files".

Next we need to save that boot sector data.  Download HDHacker.


Under "Drive to operate" select "Logical Drive" and select the drive letter of your flash drive where you installed Acronis.  Under "Select sector" choose "First sector".  Click "Read sector from Disk" and then click "Save sector to file" and give it a name such as "acronis.bss".  file extension MUST be bss.  This lets syslinux know it's a bootsector file and will allow daisychain booting.  Save that file in the same location where you copied your acronis files in a folder on your desktop ex: "Acronis boot files"

Step2:
Let's install Ubuntu.  Just do regular quickformat of the flash drive as fat32.  Boot to Ubuntu CD or your Ubuntu installation.  Run your partition editor application under "Administration".  Make sure that the Boot Flag is set for fat32 partition of your usb drive.


Then run "Create USB startup disk" wizard.  If you want (and I assume you do) the persistent image then make sure you set "Stored in reserved space" and set the size you want.  This will create a persistent file for you where all changes get saved when you are working under Ubuntu and will prevent you from having to create a 2nd partition.  Splitting a flash drive to have 2 partition (2nd being the casper-rw) is old, silly way of doing it.  After you have done this you do NOT need to format the flash drive again.  However I do prefer Ubuntu syslinux menu's gui over Fedora's and if you do also then copy just the syslinux folder to your desktop after you rebooted to windows restore back after we install Fedora.

Step3:
Install Fedora.  Again you will probably want to have some sort of persistent file to save changes for this one also.  Download "Fedora live-usb creator"


Step4:
Combine the programs.  You should now have a usb with both Fedora and Ubuntu.  Let's go ahead and copy over Acronis files that you backedup to your desktop.  Make sure you include the .bss file.  Copy any other programs and if they require bootsector data make sure you copy over their .bss file as well.  BartPE will be an example.  Windows environment can't boot from a Linux bootsector and since we can't have more than one boot sector on a single drive, that's why we use HDHacker to create a .bss file and save it to the flash drive.  Download Offline NT Password & Registry Editor.  Get the one that's listed as CD image.  Extract the iso from the zip file.  Then extract files from the iso to the flash drive EXCLUDING the syslinux.cfg file.  This app comes with its own syslinux and you do not need it and we'll be using syslinux from ubuntu anyway.  However you do need to refer to it for the menu entry in later step.  Dos based apps will require you have memdisk file.  So copy that to root of your flash drive.  Apps like Memtest+ is a single file that can be installed just by simply copying it to your drive.

Step5:
Edit the syslinux menu.  In your usb, in the syslinux folder, if you don't see a syslinux.cfg file but see isolinux.cfg then rename the isolinux.cfg to syslinux.cfg.  If you choose you can delete the isolinux.bin.  Back in Ubuntu 7 days menu entries were in syslinux.cfg.  But as of 8.04 and 8.10 it links to a file called text.cfg.  That's the file that has all the menu entries shown when you boot.

Ok, now onto actually editing the menu file.  Below is example of what you will see.

label ubuntu
  menu label ^Ubuntu 8.10
  kernel /casper/vmlinuz
  append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash --


for fedora and other apps that has its own syslinux, simply open its syslinux.cfg and copy over their menu entries.  Make sure you copy over the kernel and append lines.  menu label can be written as how you want each to be listed on the screen.

same with Offline Password & Registry Editor
  menu label ^Change NT/2K/XP/2K3 Passwords
  kernel /chntpw/vmlinuz
  append rw vga=1 init=/linuxrc initrd=/chntpw/initrd.cgz,/chntpw/scsi.cgz


apps that require memdisk file will have menu entries like this
  menu label Western Digital Drive Diagnostics 5
  kernel /memdisk
  append initrd=/FLPYS/DLGDIAG5.IMZ


kernel always pointing to the memdisk and append initrd actually being the floppy image.

Both Acronis and BartPE will have .bss file.
LABEL acronis
  menu label ^Acronis True Image Echo
  kernel /acronis.bss
  append -
LABEL tinyxp
  menu label ^TinyXP sp2
  bss bartpe.bss
  append -


But do notice the slight difference in the menu entries.  on both entries append is not important and you can just put (-) at the end of that line.  BartPE's menu instead of "kernel" has "bss" to allow syslinux know that it's a bootchain.  It will load the 512 byte .bss and that bss file will load the actual program because it's dos based.  Acronis instead of bss will say kernel because acronis boot utility is linux based.

Final Note:  If you installed fedora first and then installed ubuntu or somehow your bootsector got corrupted, you can simply fix your bootsector of your flash drive by going to command prompt, go into the folder called tools located in the "Fedora live-usb creator"'s folder.  It will have syslinux.exe.  Simply type the command syslinux -sf d:  (if your usb drive is d drive).

Sometimes if you are working with files on your usb drive under windows and you pull out the drive too soon from usb port while some data are still being written, windows will alert you next time you insert the drive back in and ask if you want to run a check on the drive.  If you run the check more often than not instead of fixing it will corrupt the bootsector.  Then you just run the syslinux -sf d: (usb drive letter) to fix.

This blog entry is about:multiboot linux distros ubuntu fedora red hat windows preinstallation environment winpe bartpe acronis true image backup and recovery solution password recovery utility syslinux fat32 software solution portable apps

1 comments:

Unknown said...

Oh my goodness! Awesome article dude! Thanks, However I am experiencing issues with your RSS. I don't understand the reason why I cannot subscribe to it. Is there anybody else getting the same RSS issues? Anyone who knows the solution will you kindly respond? Thanx!!