|
![]() |
Overclock.net - Overclocking.net > Overclock.net Forum > FAQs | |
How to: Boot Knoppix from a USB drive?
|
||
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | ||||||||
|
Audiophile
![]() |
Knoppix and other isolinux distributions
First, a small warning: If you are going to do this, I suggest having some working knowledge of the operating system you are going to be installing onto your USB drive. Having it on there won't do you any good if you don't know how to use it. ;) One thing you'll probably ask is: why do something so insane!? Why not just use a CD? I'm in the business of fixing crashed computers (for my friends atleast), and being able to boot into an operating system from a USB drive that is able to read from NTFS drives and burn a CD/DVD (something you can't do if you've got a liveCD in the drive) with data extracted from the NTFS harddrive is invaluable. It can also be used for slightly more devious things, which can't be discussed here. Plus, it's damn cool to carry an entire operating system in your pocket. You can even customize it or save a persistent image and keep all your settings. One great thing about these isolinux or liveCD distributions is that they run read-only. They load all their files into RAM and run from there, or read from the media when needed. This is very handy because USB flash drives have a limited number of write/erase cycles before they fail (much, much less durability than a hard drive. They would fail in probably a week if you used it as a real hard drive.) The first thing you're going to need is a USB flash drive, any size over 64 megs is fine. The size of your USB flash drive determines which isolinux operating system you can use. For 64 meg flash drives, I know of two you can use: Feather Linux and DSL(Damn Small Linux). I tested Feather Linux using this method (it works), but I did not test DSL. You can remaster Knoppix to fit on a 256 meg flash drive, but I won't get in to remastering here, that is out of the scope of this guide. Lets just assume for now that you have a flash drive of the appropriate size for the operating system you want to use. I will go through the steps as if we were installing Knoppix, but the steps are exactly the same for any isolinux distribution. To begin our process, we need to format the USB drive into a FAT partition. Many USB flash drives come with partitioning tools pre-loaded that allow you to make a 'secure' partition with a seperate FAT partition. If your USB flash drive has this kind of software, all you need to do is set the 'secure' partition size to 0, and the program will format the entire USB flash drive as a FAT partition. Another method is to download the HP USB flash drive tool. HP has taken this tool off of their website, but there are other (totally legal) ways to get it. I have attached a .rar archive with the tool to this post. You can also download the HP USB flash formatting tool from http://www.no-install.com, but you need to register to download it. Now that you have the software, you need to format your USB flash drive into one big FAT partition. To do this with the HPUSBFW.EXE, simply insert your USB flash drive into your computer, start the program, under the menu called device choose your USB flash drive, set the file system to FAT, label it what you wish, leave all of the boxes underneath unchecked and click 'start'. It will say that any data on the drive will be overwritten(this is true, if you have anything on it you want to save, back it up!), click okay and it should start. When it is finished it will give you a list of cylinders and blocks, just click okay and close the program. Your USB flash drive is now one gigantic FAT partition, yay! Good job, pat yourself on the back! The next step is to download a program called SysLinux and load it into the USB drive's MBR (master boot record). This sounds a lot harder than it is, trust me. SysLinux is a bootloader originally designed for floppy drives, but it works just fine for USB drives too! Here's a link to download SysLinux, you want version 3.11. Choose the format you're most comfortable with, I believe they are all the same. Choose zip, just to be safe. http://www.kernel.org/pub/linux/utils/boot/syslinux/ If you want to understand the specifics of SysLinux (as in, you want to know why it works, and you won't be happy with it just working :P), SysLinux's homepage is: http://syslinux.zytor.com/index.php Once you open up the SysLinux archive, you're going to see a ton of files, it is going to be confusing. Extract the entire archive to a place you'll remember, I suggest C:\Syslinux-3.11 to make it easier. Next, you need to go to your start menu. Click on the 'run' button, a command box will pop up. Copy the following into it and click ok: C:\syslinux-3.11\win32\syslinux.exe E: Just replace the path with where you extracted Syslinux, and the final E is the drive letter of your USB flash drive. Be VERY careful you get that drive letter correct, if you don't, you may screw something up severely. Most of you are probably nervous about what this does, so I'll explain it. This command loads the SysLinux bootloader into the MBR of the drive you specify. In this case, your USB drive. To check if this step worked, look in the root of your USB flash drive. You should see a hidden system file named ldlinux.sys. If you don't, make sure your windows folder options allow you to see hidden system files. If it STILL doesn't show up after that, make sure the drive isn't toggled as hidden(right click it in the windows explorer menu, go to properties). If that doesn't work, go back and repeat the previous steps, you probably missed something. Of the 7 USB flash drives I tried(ranging from very old to released a month ago), all of them worked, so I very highly doubt a USB flash drive is incompatible with this method. The next step is probably the most time consuming out of the entire guide. You need to download a .iso image of the Knoppix (or whatever isolinux distribution you're using, you can use google to find DSL, Feather Linux or other isolinux distributions). How long this step takes is entirely dependant on your internet connection speed. Here is Knoppix's homepage. If it's in German, simply click the little American/UK flag in the top left corner to make it English. http://www.knoppix.org/ Go to the download link, and download it from wherever you want. The filename you want is: KNOPPIX_V5.0.1CD-2006-06-01-EN.iso The filename is pretty self explanatory, the most important parts are the version number(5.0.1), the distribution method(CD, there is a DVD Knoppix, but it's too big for USB flash drives) and language(EN). Make sure you get an .iso ending in EN, or you've downloaded a German version of Knoppix. Save the .iso to whatever location you want, I use the desktop for all my temporary files. You have either two options now: burn the .iso to a CD, or mount the .iso. Either way, the result is the same. Copy the contents of the CD into the root of your USB flash drive. You should get a folder and file structure that looks something like this: boot KNOPPIX autorun.bat autorun.inf autorun.pif cdrom.ico index.html (hidden)ldlinux.sys Next, you need to go to the boot folder, then the isolinux folder. Copy the contents of the isolinux folder to the root of your USB flash drive, then delete (yes, delete) the boot folder. Delete the file named isolinux.bin, and rename isolinux.cfg to syslinux.cfg. Congratulations! You're done! Your USB drive can now boot in to Knoppix 5.0.1. You can use this same method for any isolinux distribution. The only three I know of are Knoppix, Feather Linux and Damn Small Linux(DSL and Feather are based off of Knoppix, which is based off of Debian, by the way. Random fact of the day!) but I am sure there are more. You can now add any documents, portable applications or otherwise to the USB flash drive. I suggest making a seperate directory in the root of the USB flash drive to store all of this: I called mine Stuff. Just don't mess with any of the knoppix files and keep all your non-knoppix stuff in a seperate directory and you'll be fine! There is one caveat, however. Not all BIOSes will boot a USB drive by default. You may need to fiddle with the USB options in the BIOS, change the boot order to have the USB flash drive above the first boot hard drive, and so on. Some BIOSes read the USB drive as a zip disk, so look under floppy drives. Sometimes they're under hard drives, once I even saw it under network boot devices. If your USB flash drive doesn't even show up, you may need to enable USB keyboard support. For really, really old motherboards (6+ years) or BIOSes that absolutely refuse to recognize the USB flash drive, it is almost impossible to boot off of a USB drive natively. You will need a boot loader on a floppy drive that points to the USB flash drive. So far, I haven't been able to perfect a boot loader for this method, but as soon as I get it working, I will update this guide. If anyone would like to assist me in this matter, please, feel free to! You can PM me with your progress, or just add a reply to this FAQ. So there you have it. It may not be perfect, but it works (atleast for me). I have tested the USB drive on my current rig (see profile), my friend's 3 year old Dell (can't remember the model), a very recent Dell (again, can't remember the model, but it was very new) and I used it to recover a crashed hard drive on someone's self-built rig using fairly modern parts. It worked on all of the computers I tested it on, but this is not a promise that it will work on yours. I will dig out a very, very old computer from a junkpile somewhere and use that to test some bootloader projects when I have time/learn how to actually MAKE a bootloader (no idea when that will be :(). Once I have a working bootloader made, I will host it somewhere and edit this guide to add instructions on how to make your own bootloader/where to download mine. SLAX Another one of my experiments to boot a linux operating system off of a USB drive was based off of the MySlax creator http://myslax.bonsonno.org/. SLAX is another distribution of linux, derived from Slackware. The only two SLAX liveCDs I know of are BackTrack and Ophcrack. Both of these can be used for several very illegal functions, but they also have perfectly valid uses. For the sake of innocence, if you are interested in either of them, you can go look them up yourself. Google is your friend. MySlax creator has a built-in feature to make bootable USB flash drives from a SLAX-based .iso or CD. You can modify the boot options to your liking and customize other functions (gui and modules specifically). The only problem with MySlax creator is that you need to create an ISO before you can use the step to create a bootable USB flash drive. I have successfully booted BackTrack off my USB flash drive, but that was just a bit pointless to me, and counteractive to what I wanted my USB drive to do. I soon removed it and went back to Knoppix. It was more of an experiment to see if it worked. The MySlax creator method is a lot faster and less messy than isolinux, but it's not nearly as much fun. :P Further projects: Multibooting!! This was an unsolvable puzzle for me. So far, I have not been able to get this to work at ALL. Maybe someone will have better luck than me, or can use my notes to make it work. I used this method(http://www.msfn.org/board/lofiversio...hp/t69211.html) to make windows see the USB flash drive as a regular hard drive (if you want to undo this, simply roll back the driver through the device manager). I then used Norton PartitionMagic to partition it into three FAT sections. I came to a rather sad conclusion, however: if windows (maybe it's an XP only issue?) is treating the USB flash drive as a hard drive, you CAN NOT edit the MBR with SysLinux or another boot loader. I tried, it did not work (with the partitions being primary or logical). If anyone can find a way around this, please, message me. I hope this guide helped someone trying to preserve their sanity during this seemingly insane project. Disclaimer: This guide is a work in progress. I have included two proven working methods(one for isolinux, one for SLAX) and two works in progress/raw notes(multi-partitioning/multibooting and a floppy bootloader). I intend to update this guide as further information is discovered. Feel free to PM me with any problems or questions you have.
Last edited by Lurikrunch : 07-14-06 at 11:17 PM |
||||||||
|
|
|
|
#2 (permalink) | ||||||||||||
|
Intel Overclocker
![]() |
dude. AWESOME FAQ +rep for you !!!!!!!!!
__________________
|
||||||||||||
|
|
|
|
#3 (permalink) | |||||||||||
|
AMD Overclocker
![]() |
i like this but i have some questions: number 1 does it let you save all your settings.... say i download a little game... will it save that to my drive? number 2 is this just like using the live cd and i cant save anything?
__________________
|
|||||||||||
|
|
|
|
#4 (permalink) | ||||||||
|
Audiophile
![]() |
geeked:
__________________1. By default, the game would save to the drive created on your RAM (or possibly your linux swap space, if one exists on your hardrive). You could save the game along with your persistent settings image to your USB drive if you mount it as writable, accomplishing both of what you asked. 2. By default, the drive from which Knoppix is loaded is mounted as read only, and the RAM is read/write. Anything you save will be saved to the RAM, to be erased when you shut down Knoppix. You can mount the USB drive as writable and save anything you want to it that way.
|
||||||||
|
|
|
|
#5 (permalink) | ||||||||||||||
|
Helen Keller for 2012
![]() |
At the step where you put:
Quote:
So uh, ***? Downloading 3.11 now....so yeah. It might be it. Trying it now.
__________________
i love you eric. you wait until i finish my chores at my kitchen table so we can go out. you stop by at work just to give me a hug. we sit in my kitchen listening to foreigner and eating cheerios out the box. we talk about anything under the sun but we don't talk about the things we argued about yesterday, it's fixed. you wait til 3 to wake me up to tell me you have to go. you're always tired but you never go to sleep first. when you go it's always a 20 minute goodbye. i hate to see you go but maybe the next day i'll wake up and see you asleep on my pool table again. - DAE RIP
![]()
|
||||||||||||||
|
|
|
#6 (permalink) | |||||||||||||
|
Helen Keller for 2012
![]() |
Yep. Doesn't work. Same thing.
__________________
i love you eric. you wait until i finish my chores at my kitchen table so we can go out. you stop by at work just to give me a hug. we sit in my kitchen listening to foreigner and eating cheerios out the box. we talk about anything under the sun but we don't talk about the things we argued about yesterday, it's fixed. you wait til 3 to wake me up to tell me you have to go. you're always tired but you never go to sleep first. when you go it's always a 20 minute goodbye. i hate to see you go but maybe the next day i'll wake up and see you asleep on my pool table again. - DAE RIP
![]()
|
|||||||||||||
|
|
|
#7 (permalink) | ||||||||
|
Audiophile
![]() |
Pook, are you sure you have windows flagged to show all hidden system files? The black box opening and closing is what is supposed to happen, the files should be on the drive letter you specified.
__________________
|
||||||||
|
|
|
|
#8 (permalink) | ||||||||||||||
|
Helen Keller for 2012
![]() |
Quote:
How would I make sure?
|
||||||||||||||
|
|
|
#9 (permalink) | ||||||||
|
Audiophile
![]() |
Open up an explorer window, go to Tools -> Folder Options -> View. Toggle on 'show hidden files and folders' and untoggle 'Hide protected operating system files(Recommended)', then click the 'apply to all folders' button. That should do it for you.
__________________
|
||||||||
|
|
|
|
#10 (permalink) | ||||||||||||||
|
Helen Keller for 2012
![]() |
Thanks. Checked in Ubuntu, shows up. Did as above, shows up. Gunna try it again now.
Thanks. :) Nice FAQ btw. *edit* Well, it boots. Kinda. It boots from it, stops at "Scanning USB devices" (Using DSL btw), and then says something along the lines of: Quote:
__________________
i love you eric. you wait until i finish my chores at my kitchen table so we can go out. you stop by at work just to give me a hug. we sit in my kitchen listening to foreigner and eating cheerios out the box. we talk about anything under the sun but we don't talk about the things we argued about yesterday, it's fixed. you wait til 3 to wake me up to tell me you have to go. you're always tired but you never go to sleep first. when you go it's always a 20 minute goodbye. i hate to see you go but maybe the next day i'll wake up and see you asleep on my pool table again. - DAE RIP
![]()
Last edited by The Pook : 09-12-06 at 11:52 PM |
||||||||||||||
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|