Showing posts with label iso. Show all posts
Showing posts with label iso. Show all posts

Monday, December 19, 2011

More booting USB drives with ISO images

So in a previous post (Linux bootable USB Drives )I discussed making USB drives that booted directly from a ISO. I first wanted to mention that I find this very useful when I want to install a new distro of Linux and do not want to fight my way through burning a CD or solving the mystery as to why uNetBootIn does not work for me in Linux. In theory, all I have to do is drop a new ISO in the thumb drive and reboot! How simple is that?
Not simple enough as to immediately after posting that I tried to reinstall my computer with the latest official version of Linux Mint12. When I dropped in the new ISO and rebooted I was greeted by:
"ERROR 60:File for drive emulation must be in one contiguous disk area"

I immediately invoked my Google Genius and started searching the web. Apparently booting from an ISO requires that the ISO be a contiguous file and is sensitive to FAT's issue of fragmenting files. The web offered the options of running windows tools to defragment the file, so I tried Contig.exe(Contig.exe). Maybe it does not work on linux, maybe it does not work with Wine, maybe I am a bonehead. I could not get it to actually fix anything as I ran the tool and then rebooted over and over. The real issue was that I had backed up a few files on the thumb drive then deleted the old ISO then added the new one. The thumb drive was actually fragmented, so I moved off all the files and then moved them back and it worked! So if you try the method in the previous post and you get a ERROR 60, try cleaning the thumb drive and then copying the files back.
In my haste in getting the files back together for the drive, I managed to edit the menu.lst too many times. I messed it up hard. When I was back and booting to the thumb drive, I started getting another error:
"Unable to find a medium containing a live file system" at a "(initramfs)" prompt.

Now what? Well Google told me that there are issues with people's motherboards where the thumb drive must be plugged into a port that Linux can see without extra drivers. Linux must also need to see the hard drives so if you have SATA on an unsupported 6meg connection, youmight need to move it to a 3meg connection. There are also problems on some motherboards where the SATA is in IDE mode and must be changed to AHCI mode. My problem was none of these, my problem was my Menu.Lst. I had goofed and put a space on the line that reads:
"kernel /casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casperiso-scan/filename=/mint.iso splash quiet --"

The space was after the "iso-scan", so if you have a problem like Idid you can save yourself a few hours and check the syntax closely. I hope this helps someone someday!

Monday, November 28, 2011

Linux bootable USB Drives

I have a problem, I am not the proper combination of crazy/sexy/cool
to get the common tools for making bootable USB drives to work. I can
get uNetBootin ( http://unetbootin.sourceforge.net ) to work from
Windows, but not from Linux. As I have ditched Windows, having to use
windows to get the latest Linux distro CD image to boot from a USB
drive is... dumb.

I tried a bunch of tools and only succeeded in pulling out my
remaining hair. Then I found this article:
https://help.ubuntu.com/community/Installation/FromUSBStick and way,
way, way at the bottom of the article it has "Create Bootable USB
Manually". The manual process looks complex with extracting files
from the ISO and other business. As soon as I was happily taking
notes on how to follow this procedure I got to the part titled
"Simpler way using the ISO file"...

OMG! You can boot right from the ISO file itself?

So here is the process to create a bootable USB drive for a Linux LiveCD:

1. Download a LiveCD iso file. I chose Mint Linux 12 (it is my
favorite distro so far).
2. Download and extract Grub4Dos (
http://download.gna.org/grub4dos/grub4dos-0.4.4-2009-06-20.zip ).
3. Grab a junky USB drive with ~1 GB capacity and format it with FAT.
Pay attention to the device node of the USB drive.
4. Drop to a terminal window and run the following from the Grub4Dos folder:
#bootlace.com /dev/sdb (if your USB drive is at /dev/sdb!)
5. Copy grldr from the Grub4Dos folder to the USB drive.
6. Copy the LiveCD iso file to the USB drive. Pay attention to the
name of the ISO file.
7. Create a "menu.lst" file on the USB drive
The menu.lst file should look like this:

title Mint12 x64
find --set-root /mint.iso
map /mint.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper iso-scan/filename=/mint.iso splash quiet --
initrd /casper/initrd.lz

(it is one line starting "kernel" and the new line starts with "initrd")

8. You might need to change the Title to match your distro
(optional), replace "mint.iso" with the file name of your LiveCD iso,
and open the ISO to check for the name of the /preseed/.seed file
(ubuntu was "ubuntu.seed" and mint was "mint.seed").

Your mileage may vary, but I was able to use this to install Mint 12
on my laptop. When a new version comes out and I want to have a USB
drive that can be used to install it, all I have to do is replace the
"mint.iso" file with the new iso and I am all set.

This is the easiest way to get a bootable USB drive with a ISO... even
easier than actually using uNetBootin!

Popular Posts