Tuesday, May 12, 2009

MultiBootin With UNetbootin. A Multiboot Flash Drive Tutorial

I have found that it is fairly easy to make a multiboot flash drive using UNetbootin.
A bit of time, moving files and some simple edits to the syslinux.cfg file is all that is needed.

I'm going to give a short tutorial on how to dual boot Mint Linux and Puppy Linux.
This is done on a 1 gig flash drive with only one partition.

Assuming you already have UNetbootin installed insert your flash drive.
Make sure that any data on your flash drive is saved elsewhere as UNetbootin will wipe it all out.

Start UNetbootin and from the drop down list select Puppy Linux.
The only version available should be the 'Latest Live' version. Select it and then choose the proper destination drive for the flash drive.

After it is finished downloading and configuring Puppy it may be a good idea to try it out by rebooting your computer with the flash drive still installed. If your Bios is configured properly to boot from the flash drive you will see Puupy boot up, ask some questions about hardware and screen resolution then boot to it's Desktop. Once you have verified that it works, reboot your computer with the flash drive removed.

Now that you are back in your computer make a folder on the Desktop or anywhere else you prefer and name it something like USB Puppy.
Insert your flash drive, open it, select all the files and copy them over to the new folder you just made. Now delete all the files on the flash drive. It's time for step 2.

Open UNetbootin and select Mint Linux. Choose the flash drive for the destination and start the download. After it is done you will again want to test it to verify it is working.
When you are satisfied that all is working properly boot back into your main system and then insert your flash drive once again.

Open the flash drive to reveal all the files and folders. Now open the first folder you created named USB Puppy. I resize both windows so they are visible side by side for easy transfer.
In the Puppy folder select all the files except those that have duplicate names in the flash drive containing Mint.

These are the file names you do NOT want to transfer over;
vesamenu.c32, ubnpathl.txt, ubnkern, ubninit, ubnfilel.txt, syslinux.cfg, ldlinux.sys

You could also select all then tell the file manager to skip the files that already exist but I don't like taking a chance that a file may get overwritten or corrupted.

Now that you have all the files from the Puppy folder copied to the flash drive it's time to add the Puppy Linux entry into the Mint syslinux.cfg file. It really is painless! :-)

Open the syslinux.cfg file in the Puppy folder with your favorite text editor.
This is what you will see;

default vesamenu.c32
prompt 0
menu title UNetbootin
timeout 100

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit pmedia=cd

label ubnentry0
menu label puppy
kernel /vmlinuz
append initrd=/initrd.gz pmedia=cd


All we want is the last 4 lines of this file (In Bold). Select this portion and copy it.
Now open up the syslinux.cfg file for Mint which looks like this;

default vesamenu.c32
prompt 0
menu title UNetbootin
timeout 100

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/mint.seed boot=casper quiet splash --

label ubnentry0
menu label Start Linux Mint
kernel /casper/vmlinuz
append initrd=/casper/initrd.gz file=/cdrom/preseed/mint.seed boot=casper quiet splash --

label ubnentry1
menu label Start Linux Mint in compatibility mode
kernel /casper/vmlinuz
append initrd=/casper/initrd.gz file=/cdrom/preseed/mint.seed boot=casper xforcevesa ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --

label ubnentry2
menu label Memory Test
kernel /isolinux/memtest
append initrd=/ubninit

label ubnentry3
menu label Boot from local drive
kernel /ubnkern
append initrd=/ubninit


Now place your cursor in between the section that starts with label ubnentry1 and label ubnentry2 and paste the entry from Puppy between them. I use the Enter and Delete keys to make this new entry conform to the format of the other entries. Makes editting easier.
Now before we close and save this file we need to correct some of the label entries.

Notice that each new entry starts with label unetbootindefault then continues with label ubnentry0, ubnentry1, etc. until we get to the entry that contains the new Puppy info.
That one says label ubnentry0 but we already have a label ubnentry0 that points to Mint.
So we take the last entry numbered 3 and change it to 4. Then change entry number 2 to number 3. And finally change the label for Puppy from 0 to 2.

The final syslinux.cfg file should look like this;

default vesamenu.c32
prompt 0
menu title UNetbootin
timeout 100

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/mint.seed boot=casper quiet splash --

label ubnentry0
menu label Start Linux Mint
kernel /casper/vmlinuz
append initrd=/casper/initrd.gz file=/cdrom/preseed/mint.seed boot=casper quiet splash --

label ubnentry1
menu label Start Linux Mint in compatibility mode
kernel /casper/vmlinuz
append initrd=/casper/initrd.gz file=/cdrom/preseed/mint.seed boot=casper xforcevesa ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --

label ubnentry2
menu label puppy
kernel /vmlinuz
append initrd=/initrd.gz pmedia=cd

label ubnentry3
menu label Memory Test
kernel /isolinux/memtest
append initrd=/ubninit

label ubnentry4
menu label Boot from local drive
kernel /ubnkern
append initrd=/ubninit

Now close and save this new modified syslinux.cfg file.
Close all open folders, reboot your system with your new multi-boot flash drive still inserted and try it out. If you did it right you should now be able to access either Mint or Puppy and use them in 'Live' mode.

Before I go I want to leave you with some ideas, thoughts and tips.
This tutorial is not the only method to create a multi-boot flash drive nor may it be the fastest or easiest. But this is the way I first tried it and with this method I had success.

Not all distros will be multi-bootable in the same manner. If two distros have the same kernel or boot loader name you will have conflicts that will cause it not to work.
One method to get around this would be to either use 2 partitions or put them in seperate folders. I have not tried this nor am I saying these methods will work. I'll leave you to try it and experiment.

Don't feel that you are limited to just these 2 distros or that you can only have 2 distros for a multi-boot flash. Since I first tried this experiment I have also added Clonezilla to the drive giving me the option to boot to one of three distros/software.

Some flash drives may not be compatible with the Bios and will not boot.
I have some 2 Gig flash drives that won't work yet my 1 Gig flash drives from the same manufacturer works. So if it doesn't work the first time try a different flash drive.

I will not hold anyone's hand or walk them through these procedures. Learning computers and new ideas requires the user to try it and possibly fail until they have success. I have found that this works the best when teaching people new ideas or techniques. Call it tough love or whatever. It works!

Finally I need to make a comment on hidden files. Some distros have them, others don't.
Puppy doesn't but Mint does. I could have had you install Puppy then moved Mint over to the flash drive. But in order for Mint to work properly you would need to choose Show Hidden Files from the View button and make sure that you copied these over to the flash drive as well as the main files.

Hope this mini-tutorial helps you into your journey of multi-boot flash drives.

Enjoy!!

TaZMAn

Sunday, May 10, 2009

UNetbootin - Boot Distros From Flash Drive

UNetbootin is a great free program that is available for Windows and numerous Linux Distros.

It allows you to boot your computer from a flash drive that has a pre-installed Distro or App on it.
Your computer needs to both boot from USB and recognize the flash drive as a USB Hard Drive. You will need to access your Bios and set it to boot from the USB port.

UNetbootin can either use a supported distro ISO file that has been saved on your hard drive or you can select a distro from the drop down box and it will download and configure the flash drive for you.

I've tried several distros found in the drop box with much success. The only distro I had a problem with was Slax. Not sure why I had a problem with it because I have used Slax in a 'Live' environment on this system before with no problems.

I'm planning to use UNetbootin to make a multi-boot USB flash drive.
I figure that if I use one larger distro like Mint, I can still get 2 or 3 smaller distros on a 1 gig flash drive.

I have several larger flash drives in the 2, 4 and 8 gig varieties but my system won't properly recognize these flash drives during the boot process.
So until I get a chance to find a work around like partitioning the larger flash drives into 1 gig partitions, I will stick with the 1 gig variety.

I don't see much of a problem setting up a multi-boot flash drive.
I'll install the distros one at a time. When one is installed I will copy the contents of the flash drive and save it on my hard drive then wipe the flash drive for the next distro.
Then I will install the 2nd and 3rd distros doing the same as the first between each download.
When the last distro is downloaded and installed on the flash drive I will copy the contents of the previous installs onto the drive one at a time.

The boot loader used is Syslinux which is easily modified to include the boot info needed by the other distros.
If I can get the larger flash drives working by setting up multiple partitions then I may need to use grub with a modified loader and menu but for a simple 1 partition drive Syslinux should be fine.

I'll update my blog with the results once I'm done playing.
I need some premium playtime and this project will be just what the doctor ordered.

UPDATE!
Check my May 12 entry for a mini tutorial on making a multiboot flash drive using UNetbootin.

Enjoy!

TaZMAn

Health Records Stolen And Held For Ransom

I came across an article about the Virginia Prescription Monitoring Program database being hacked and being held for a $10 Million (U.S.) ransom.
Supposedly the hacker(s) also deleted the database backups.

See the story here;
Virginia PMP Hacked

The above link also has a link to Wikileaks that has a copy of the ransom note left on the PMP site.

A new story has now emerged from the agency in charge of the PMP website and database denies the claim that the database backup has been destroyed.

Agency Denies Claim Database Was Destroyed

As I was researching this story I came across another story that deals with a break in to the Berkeley University database that stores the student's health records.

Berkeley Student Health Records Compromised

This attack happened over a 6 month period before the administrators realized what was happening! A 1/2 year of not knowing your server has been breached? That sounds like a huge case of incompetence!

Now I have to ask myself a question as should you.
Where the heck is the security?
And what are they doing? Sleeping?

Then you have that nonchalant attitude like the one found in the Agency Denies Claim Database Was Destroyed link;

"acknowledged a data breach of it may have occurred but refuted the notion the database had been wiped out by the unknown attacker."


A data breach may have occured?
Geez! The FBI is involved. I'd say that it did occur. And I'm willing to lay odds that the database backup was destroyed. Makes you wonder whey a backup was so conveniently accessible from the main server. Bet they stored it on the same hard drive!

And what about all that patient info that is supposed to remain confidential?
Who is going to pay for the damages to these people's credit ratings once the perpetrator decides to sell all that info?
What about all those Social Security numbers that can now be used for identity theft and fraud?
Who's going to foot that bill to protect the patients?
Patients that had absolutely no say in how their personal info was used or how it was stored and safeguarded.

I'm willing to bet that due to budget cuts either most of the IT staff was laid off or the whole operation was sub-contracted to the lowest bidder.
Some bean counter decided that the best way to increase the bottom line or cut the budget would be easily achieved by cutting or subbing out the security staff that was hired to protect our confidential data.

This scenario has been repeated over and over. Increasing the bottom line takes precedence over security and IT departments.
I have also encountered people who have graduated with a degree in computers that don't know squat about network security. But they sure now how to set up a network connection using dhcp or email accounts!

Sorry if I may have offended some System Admins out there but when a graduate from a school that has a MCSA comes up to me asking about how a firewall works or if I can format a hard drive for him, I have to wonder just what the hell they are teaching at that school and how the students are passing those MCSA tests!

Maybe it's time that our schools and institutions start teaching ethical hacking courses so that they can start protecting our networks better.
And let's keep the bean counters in check and prevent them from raiding out IT staff.
Make companies and government accountable.
Huge fines and penalties for any company or government entity that allows our data to be compromised. And the monies from the fines go to the people who's info was stolen!

Oh! And I must make mention that the Virginia PMP was running on Windows Server 2003. Berkeley uses several OS's including Open BSD, Solaris, Fedora, Red Hat, Debian and Windows Server 2003. I'm gonna go out on a limb and say that the student's health records were stored on a Windows 2003 server also.
Windows: Safe, Secure, Fast. NOT!

I won't even get into the hacking of the power grid.
I may end offending even more people and then have the G-Men knocking on my door.
LOL!

TaZMAn