Got Knoppix 5.0.1 successfully booting from USB key
Knoppix 5.0.1 boots rather nicely from a USB key. It's getting easier to get it working, as the USB bugs from the previous versions have been fixed.
I have a 1GB USB key, so using the Knoppix CD was the best fit (the DVD is much too large).
Here's a rather long thread I started a while ago, about getting an older version of Knoppix up and running: http://www.knoppix.net/forum/viewtopic.php?t=23558
I've simplified that somewhat. Here's a mini-guide:
* Boot Knoppix 5.0.1 from CD and make sure it works.
Put in your USB key as soon as possible, when you see the title screen of Knoppix, so that it is sure to be found by Knoppix autodetection.
Do not use the "toram" cheatcode when booting Knoppix. The RAM copy of the CD omits the /boot directory, but we require this directory, so we can't use the RAM copy.
* Once Knoppix is up and running, open a root shell (from the penguin icon). Now, we need to find the drive letter of your USB key. It will be something like /dev/sda, /dev/sdb, /dev/sdc, and so on. Be very careful and make absolutely sure you have the drive letter correct, because you will be erasing the USB key, and you don't want to erase your hard drive by mistake!
Commands to try:
Code:
dmesg | grep -i scsi
Code:
cat /proc/partitions
Look at the sizes of the various drives you see here. Find your USB key, and do not get it confused with your hard drive! For the rest of this example, I'm going to be using /dev/sdz, a fictional drive letter that nobody has, just to prevent bad mistakes from typing in commands blindly.
* Erase the entire USB key.
Code:
dd if=/dev/zero of=/dev/sdz
Did you use the right drive letter? Did you? If not, you'll be crying, right about now....
This command will take a while to finish. By writing to every block on the USB key, we are also testing it for bad blocks.
You should get the "no space left on device" error message when it finishes erasing and reaches the end of the drive. Any other error messages might mean bad blocks: if you notice any, your key might be worn out and you'll need to buy another one (cheap keys are notorious for wearing out very quickly).
* Make a quick patch to the mkdiskimage script.
We need it to write partition type 0C (FAT32 LBA). Unfortunately, "out of the box" it only writes partition type 0B (FAT32 CHS). We want to make sure Windows always uses LBA and not CHS, for increased reliability, just in case we ever use the USB key with Windows. So, an easy one-line change.
Use your favorite editor and edit /usr/bin/mkdiskimage.
Code:
vi /usr/bin/mkdiskimage
Go to line 237.
Change 0x0b to 0x0c then save the file and exit.
* Run mkdiskimage, to automatically partition and format your USB key.
Code:
mkdiskimage -F -4 /dev/sdz 0 64 32
This lays down a new MBR and partition table on the drive, and partitions and formats the entire drive as one big FAT32 LBA partition. I prefer FAT32 because it is a more efficient use of space than FAT16, and have noticed no difference in the ability of various systems to boot FAT32 as opposed to FAT16.
The mkdiskimage script is USB-ZIP compliant, which may help it boot on more systems than USB-HDD. It's nice that Knoppix now includes this script by default. Here's the webpage for mkdiskimage: http://syslinux.zytor.com/usbkey.php
KDE may throw a stupid popup window in your face, once it recognizes your new partition. If this happens, close the window.
* Run the SYSLINUX installer on your new partition.
Code:
syslinux -s /dev/sdz4
This installs the SYSLINUX bootloader onto the newly-created partition, and includes a special file, ldlinux.sys. The -s option is for safety and additional compatibility. Notice the partition is the fourth partition on the drive, not the first. This is for USB-ZIP compliance.
* Mount your new partition.
Knoppix should have autodetected the new partition and set up a fstab entry for it. The /media/sdz4 directory should now correspond to the /dev/sdz4 partition.
You should notice one, and only one, file in this directory now: ldlinux.sys
If you don't see this, then something probably went wrong earlier. Go back and try again before continuing.
* Copy the contents of the Knoppix CD's boot directory, onto your USB key.
You should already be in the /media/sdz4 directory, from the cd command above.
Code:
cp -av /cdrom/boot/isolinux/* .
mv isolinux.cfg syslinux.cfg
rm -f isolinux.bin
Don't forget the dot on the end. It tells the cp command to copy everything into your current directory, which is what we want. Notice that there is a space between the asterisk and the dot!
Ignore any errors about "failed to preserve ownership". This is normal, because we're using the FAT filesystem, which does not support file ownership. This is not a problem for us.
What we're doing here is copying the Knoppix CD's /boot directory first. This increases reliability, by getting it as close to the beginning of the drive as possible. This should help on systems with buggy CHS handling of USB keys, which may become an issue as new USB keys get larger.
We are renaming Knoppix's isolinux.cfg file to syslinux.cfg, and then removing the unnecessary isolinux.bin file. ISOLINUX (used to boot the CD) and SYSLINUX (what we just installed to your USB key) are really two different variations of the same bootloader program. They accept the same config file format, so we don't need to change anything at all, just rename.
BTW, since ISOLINUX has isolinux.bin as its main program file, can you guess what is the equivalent file for SYSLINUX? If you guessed ldlinux.sys, the file you saw earlier, good job!
* Finish copying the rest of the Knoppix CD.
Again, you should still be in the /media/sdz4 directory. Again, don't forget the dot on the end of this command.
Code:
cp -av /cdrom/* .
rm -rf ./boot
This should take a while. We are filling up the USB key with the contents of the Knoppix CD.
We already copied Knoppix's /boot directory earlier, in the previous step. We don't need two copies of it just wasting space, so we remove the extra copy.
* You are now ready to boot!
Cleanly unmount the USB key.
Code:
sync
cd /
umount /media/sdz4
Shut down Knoppix, and remove the CD when it tells you to.
* Reset your computer and fiddle with the BIOS until it sees the USB key.
After unmounting above, the USB key can be removed. Some BIOS's require a removal and re-insertion before they will recognize it.
Other things to try, if you're having trouble getting the BIOS to see your USB key and let you boot from it:
Try a different USB port. Some BIOS's only search a few ports, not all of them.
Hit a special key to bring up a boot menu. Some BIOS's can only boot from USB when manually selected.
Go into your BIOS's setup menu, and walk through the boot settings. Look under all menus, especially "hard drives" and "removable devices" and other things like that. Some BIOS's will not search for newly attached devices until you manually go through the menus again.
Turn your computer completely off and on again. Some BIOS's require you to physically turn the computer off and on again, before they will see newly attached drives.
If all else fails, try a different PC. It's still fairly rare these days to find a computer that has a good ability to boot from USB devices, and it's not something that motherboard makers advertise, so it takes a bit of luck to find a computer that can do this.
* Boot into Knoppix from your USB key.
If it works, that's great. Notice how much faster it is. There's zero seek time on a USB key, so even though it isn't very fast, it feels a lot faster than the CD! Programs are surprisingly quick to load.
Find the drive letter for your USB key again. It should not change, but it might have.
* Make a persistent home directory, if you want.
Knoppix assumes that the "CD-ROM" that it booted from is impossible to write to, but we have a USB key now, not a CD-ROM. So, we must fool Knoppix into letting you write to it.
Code:
mount -o remount,rw /cdrom
mount --bind /cdrom /media/sdz4
Now, we can run the Knoppix persistent home utility.
(It's under the penguin menu, Configure, Create Persistent.)
Choose your drive from the menu that appears, and follow the instructions.
The program should complete without errors. If the program suddenly disappears midway through, check the kernel logs with "dmesg" again. If you see pagefuls of SCSI errors and such, beware, you might have a worn-out USB key!
* Modify the Knoppix boot menu.
This is an optional step, for customization. We want Knoppix to autofind the persistent home directory, and fix a few other things.
You might have to repeat the above mounting steps, as the Knoppix persistent tool might randomly unmount the directory sometimes.
Code:
vi /media/sdz4/syslinux.cfg
On line 3, the default timeout is 300. Lower this, to around 50 or so (5 seconds, since this counter is in tenths of seconds).
It's nice to have it boot faster, without waiting for you to hit Enter, so you can put in the USB key and walk away, coming back in a few minutes to a fully booted system.
On line 2, add a few more options to the end of the line.
noswap noeject noprompt dma home=scan
Here's a little explanation of what each option does.
noswap = Security fix: assuming you're going to be using the USB key on a bunch of different computers you don't own, you don't want to be swapping your memory onto their hard drives.
noeject = You can't physically eject a USB key.
noprompt = Gets rid of the "remove CD and close drive door" prompt when shutting down, as this prompt is rather misleading when it's really a USB key instead.
dma = Gets you a significant speed increase when dealing with many IDE drives, a good thing to have.
home=scan = This will cause Knoppix to pick up your persistent home directory automatically the next time you boot up, asking you for the password as needed. You will get an extra menu during bootup, asking you if you want to mount your home directory or not.
Save the file and quit the editor.
Now, you should be all set. Reboot again, to make sure it all works.
Enjoy your Knoppix-on-a-keychain!
Josh
Re: Got Knoppix 5.0.1 successfully booting from USB key
What a great write-up. I hope that you will consider putting a copy in the wiki where it will be easy for people to find.
Quote:
Originally Posted by Krellan2
...The mkdiskimage script is USB-ZIP compliant, which may help it boot on more systems than USB-HDD. ...
I'm particularly interested in this. My HP notebook has an option in the BIOS to boot from USB, but I have not yet managed to get it to boot a usb flash drive. My latest attempts were with the configuration that DSL writes to flash. Everything looked good, but it just would not boot (nor would it boot on an IBM laptop that I had a chance to try it on). I'm wondering if this is the issue. Can you explain how we can determine if a flash drive has been configured USB-ZIP or USB-HDD? Are there any trade-off we should know about? Unfortunatey, at this time my largest flash drive is 512 meg, too small for Knoppix. I would gladly buy a larger one if I thought that my notebook would boot it, but my bad experiences so far have discouraged me from buying a larger flash device; I have no use for more flash devices other that putting together a bootable Linux on flash (doesn't even have to be Knoppix, DSL or Puppy would be fine if I could get them to boot.) Can you suggest any test I can do with a smaller flash device (64, 256 or 512 meg) to confirm that my notebook will indeed boot a flash device?
Re: Got Knoppix 5.0.1 successfully booting from USB key
Quote:
Originally Posted by Harry Kuhman
What a great write-up. I hope that you will consider putting a copy in the wiki where it will be easy for people to find.
Thanks. I am working on debugging one problem on a certain machine, but after that, I'll attempt making a wiki page.
Quote:
I'm particularly interested in this. My HP notebook has an option in the BIOS to boot from USB, but I have not yet managed to get it to boot a usb flash drive. My latest attempts were with the configuration that DSL writes to flash. Everything looked good, but it just would not boot (nor would it boot on an IBM laptop that I had a chance to try it on). I'm wondering if this is the issue. Can you explain how we can determine if a flash drive has been configured USB-ZIP or USB-HDD? Are there any trade-off we should know about?
USB-ZIP and USB-HDD are both attempts to solve a problem: the BIOS expects all "disk" devices to have a traditional cylinder/head/sector count (CHS), but USB key s don't have this. Like most modern drives, they're just a total count of sectors (LBA). There's no need for the old cylinder/head/sector nonsense, but try telling that to the blunderheads who seem to be programming most BIOS's these days!
USB-ZIP attempts to simulate the layout of a ZIP drive: 64 heads, 32 sectors, and a variable number of cylinders depending on the size of the drive. In addition, ZIP drives use partition four (for whatever demented reason Iomega chose in the past). USB-ZIP was basically a hack to let a BIOS that was capable of booting from a ZIP drive, boot also from a USB key, with minimal reprogramming effort. Such is the state of the BIOS industry these days, I'm sad to say.
USB-HDD simply relaxes these restrictions. USB-HDD is supported by fewer BIOS's than USB-ZIP, however, so it's a tradeoff for compatibility. USB-ZIP will let your key boot up in more computers, so for now, it's the one to use.
You can change between USB-ZIP and USB-HDD by rewriting your partition table on the disk, and then reformatting.
Quote:
Unfortunatey, at this time my largest flash drive is 512 meg, too small for Knoppix. I would gladly buy a larger one if I thought that my notebook would boot it, but my bad experiences so far have discouraged me from buying a larger flash device; I have no use for more flash devices other that putting together a bootable Linux on flash (doesn't even have to be Knoppix, DSL or Puppy would be fine if I could get them to boot.) Can you suggest any test I can do with a smaller flash device (64, 256 or 512 meg) to confirm that my notebook will indeed boot a flash device?
I'm not sure. The main reason I bought a 1GB USB key was to put a complete bootable "CD" on it :)
Maybe you can try it with a remastered Knoppix that cuts down on the optional software (such as DSL). I haven't tried this myself.
Re: Got Knoppix 5.0.1 successfully booting from USB key
Quote:
Originally Posted by Krellan2
....You can change between USB-ZIP and USB-HDD by rewriting your partition table on the disk, and then reformatting.
....Maybe you can try it with a remastered Knoppix that cuts down on the optional software (such as DSL). I haven't tried this myself.
Most of what you wrote should be able to be cut and pasted into a wiki article pretty cleanly although code blocks and the like will take different formatting. But in the end it will be an easy thing for people to find; old forum posts tend to sink in the listings and are seldom see if they are not on the first page.
Thanks for the additional information. Let me ask my question a different way though. What in the partition table is it that flags USB-ZIP or USB-HDD? Lets assume I can byte edit the table, what bits or bytes am I looking for to tell me which I have?
DSL was one of the smaller bootable systems that didn't work for me (along with a few others, but the others were more convoluted to make and I could have done something wrong). Could I just hex edit the partition table to change from USB-HDD to USB-ZIP, or are the actual partitions different as well?
Give me low lever details, I can take it.
Re: Got Knoppix 5.0.1 successfully booting from USB key
Quote:
Originally Posted by Harry Kuhman
Thanks for the additional information. Let me ask my question a different way though. What in the partition table is it that flags USB-ZIP or USB-HDD? Lets assume I can byte edit the table, what bits or bytes am I looking for to tell me which I have?
DSL was one of the smaller bootable systems that didn't work for me (along with a few others, but the others were more convoluted to make and I could have done something wrong). Could I just hex edit the partition table to change from USB-HDD to USB-ZIP, or are the actual partitions different as well?
Give me low lever details, I can take it.
In the partition table, it's the CHS information. Ending CHS must be a size of */64/32. This is the biggie, as it seems the BIOS gets its CHS sizing information from what's read from the partition table! Starting CHS should probably be the standard 0/1/1, with starting LBA to match. Ending LBA should be truncated to match the ending CHS, so unfortunately, you end up losing a few KB from your USB key. But, it's worth it, if doing so lets it boot!
Your data partition must also be partition 4, and marked active. I haven't found a difference in filesystem type, as the BIOS should only care about this silly CHS information, and leave filesystems up to the OS.
Here's my partition table, as seen by "fdisk":
Code:
Disk /dev/sda: 64 heads, 32 sectors, 977 cylinders
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 00 0 0 0 0 0 0 0 0 00
2 00 0 0 0 0 0 0 0 0 00
3 00 0 0 0 0 0 0 0 0 00
4 80 1 1 0 63 32 976 32 2000864 0c
The hex dump (notice partitions 1, 2, 3 are all blank):
Code:
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01
000001f0 01 00 0c 3f e0 d0 20 00 00 00 e0 87 1e 00 55 aa
Notice I lose a little capacity from what my key really can hold:
Code:
SCSI device sda: 2001888 512-byte hdwr sectors (1025 MB)
Good luck! There's lots more to read online if you Google: "USB-ZIP" "USB-HDD"
(do not forget the quotation marks)
Josh
Re: Got Knoppix 5.0.1 successfully booting from USB key
OK, got a new USB key that works again! I burned out my old USB key testing it all these times. :)
I only found one computer in which my earlier "strategy guide" failed to boot after being detected. It seemed to have some trouble recognizing the FAT32 filesystem, which is strange, because it worked just fine on other computers that were capable of detecting USB keys at bootup. Someone recommended that I try FAT16, and I did this on my new key. When I get access to this one computer, I will test it again.
Here's the changes to make, to use FAT16 instead of FAT32, above:
* Delete the reference to editing the mkdiskimage script.
Just leave the mkdiskimage script alone. :)
* Omit the -F flag to the mkdiskimage command.
The new command line becomes:
Code:
mkdiskimage -4 /dev/sdz 0 64 32
All other steps are the same.
FAT16 is not as efficient as FAT32 when dealing with disks that contain a lot of files, but that's not a big problem for Knoppix, as Knoppix stores all of its files inside one big compressed file anyway.
FAT16 also has the 2GB barrier. This isn't a problem, for my 1GB USB key. I could have bought a 2GB key, but chose not to, for greater reliability. There's a problem going over 1GB: the USB-ZIP standard will fail, as it will then go over 1023 cylinders, making its CHS layout impossible.
The solution for larger keys is to use USB-HDD, the default, and just blow off USB-ZIP support entirely. Thankfully, most newer BIOS's all boot USB-HDD by default anyway.
The strange thing is that my main PC's BIOS now recognizes my new USB key as a CDROM! Great, just what we need, a third booting standard. :) But, everything seemed to work correctly, as I'm typing this from my booted Knoppix USB key now.
Next USB key I'm going to buy will be a 5GB key, whenever they get around to finally making them. Then, we can go on to the extra challenge of getting the Knoppix DVD to boot from a USB key....
Re: Got Knoppix 5.0.1 successfully booting from USB key
Quote:
Originally Posted by Harry Kuhman
What a great write-up. I hope that you will consider putting a copy in the wiki where it will be easy for people to find.
There, I did!
http://www.knoppix.net/wiki/Bootable_USB_Key
Not sure how to push this page into the overall index so that people will find it, though....
im stuck @ syslinux command
Hi Krellan,
Heads up for the awesome post on how to get the Knoppix to boot from thumbrive. I am quite new to Linux allthough i have considerable experience in windows/dos when it comes to Linux i am im still in infancy. I have
some issue in getting my system to boot from thumbdrive i have followed your instruction step by step but im am stuck at the part where i need to load the bootloader into my new partition. Knoppix recognize my thumbdrive as sdb1 when i type cfdisk /dev/sdb1 this is what i see
name flags part type FS type Label Size (MB)
----------------------------------------------------------------------------------------------
sdb1p4 boot Primary W95 FAT32 (LBA) 1047.53
when i type the command syslinux -s /dev/sdb14
i get this following error message /dev/sdb14: No such file or directory.
no matter in what combination switch i type either /dev/sdb14 or /dev/sdb1p4 i get the same error message
i desperately need a helping hand here.
Thnks in advance.
Re: im stuck @ syslinux command
Quote:
Originally Posted by rajbabu
Hi Krellan,
when i type the command syslinux -s /dev/sdb14
i get this following error message /dev/sdb14: No such file or directory.
That's the problem right there. Using /dev/sdb14 refers to the 14th partition of the /dev/sdb disk, which is not what you want.
You have an old DOS/Windows partition still on your USB key, at /dev/sdb1 (the 1st partition).
You need to completely remove this partition first.
Did you remember to zero out your entire drive first?
That will erase all partitions.
This is the dd if=/dev/zero step. It's one of the first steps to do.
See the page:
http://www.knoppix.net/wiki/Bootable_USB_Key
Re: Got Knoppix 5.0.1 successfully booting from USB key
Quote:
Originally Posted by Krellan2
Great work on the Wiki. However, I've got a couple of questions:
- How would one alter the instructions to achieve the same end but as USB-HDD rather than USB-ZIP. Is it as simple as just using Partition 1 rather than Partition 4 and how would one do this?
- I can't get my USB Key to boot correctly / at all - it is simply ignored at boot up. Is there a way of checking that I've done the partitioning, formatting, loading process correctly. At the moment, I don't know if it's a BIOS problem or a user problem in using your Wiki?
Many thanks, if you can help.
Martin
Re: Got Knoppix 5.0.1 successfully booting from USB key
Quote:
Originally Posted by martinveasey
- How would one alter the instructions to achieve the same end but as USB-HDD rather than USB-ZIP. Is it as simple as just using Partition 1 rather than Partition 4 and how would one do this?
To my knowledge, USB-HDD is simply a relaxation of the USB-ZIP "standard".
Here's what makes USB-ZIP special:
It uses partition 4, not any other partitions
It uses CHS (cylinder head sector), not LBA, when booting the disk
It uses a variable number of cylinders, but it must use a constant 64 heads and 32 sectors
It has a maximum of 1GB in size, due to CHS's limit of 1024 cylinders
USB-HDD is simply a relaxation of these requirements, I think.
You can use whatever partition you want
You can use LBA, and in fact, it is highly recommended to do so
You can use 255 heads 63 sectors (the maximum allowed)
You can use a disk of whatever size you want
If this is wrong, please correct me.
Quote:
- I can't get my USB Key to boot correctly / at all - it is simply ignored at boot up. Is there a way of checking that I've done the partitioning, formatting, loading process correctly. At the moment, I don't know if it's a BIOS problem or a user problem in using your Wiki?
In my Wiki page, I have a little checklist of 5 things you can try. It's about halfway down the page. I had to do each of those steps at various times, trying to get the BIOS on several different computers to correctly see the USB key.
I'm not sure how you would go about verifying that you got it set up correctly to boot. If you have an old small hard drive, around 1GB in size, that you know for sure that your BIOS will always recognize, you can try reformatting that old hard drive in exactly the same way you would the USB key. Then, try booting from the hard drive.
Linux is good about treating block devices all the same: the steps you use for the hard drive will work identically to the USB key. You can then use that hard drive for Knoppix :)
Re: Got Knoppix 5.0.1 successfully booting from USB key
Quote:
Originally Posted by Krellan2
In my Wiki page, I have a little checklist of 5 things you can try. It's about halfway down the page. I had to do each of those steps at various times, trying to get the BIOS on several different computers to correctly see the USB key.
I'm not sure how you would go about verifying that you got it set up correctly to boot. If you have an old small hard drive, around 1GB in size, that you know for sure that your BIOS will always recognize, you can try reformatting that old hard drive in exactly the same way you would the USB key. Then, try booting from the hard drive.
Linux is good about treating block devices all the same: the steps you use for the hard drive will work identically to the USB key. You can then use that hard drive for Knoppix :)
Many thanks for that. Interestingly, after prodding and poking around a bit, the boot is now working.
It won't help anyone else, but I think I'm sorted out.
Martin
Using USB Knoppix in Windows
Is there a way to either make another partition or hide the Knoppix related files from showing up when the usb drive is inserted into Windows.
Or at the least be able to put both the Boot and Knoppix folder into one folder '~' so that it would be at the top and out of the way for any other software I put on the drive. It's a 4GB drive so I will be putting alot of Windows software on there as well.
Can't boot from flash, is AMD CPU the reason or NTFS or..
Maybe I shouldn't be here since much written here is for more experienced users--if so feel free to tell me off but be nice enough to redirect me to where I should be.
see PC specs at end
In the Knoppix info page (www.knopper.net) ' it says as minimum requirements, 'Intel-compatible CPU' is AMD an Intel compatible? or is AMD, amd and therefore have nothing to do with Intel. Sounds like a stupid Q but 'compatible' can mean 'anything like it' therefore AMD or can mean Intel and only Intel.
Assuming AMD is fine, the next stuff I read has to do with NTFS-where problems arise. Here I got confused, since I assumed we are talking about booting from Knoppix, then this would over-ride anything to do with Windows and the fact that the drive was configured as NTFS. Or am I wrong here?
I can not burn Knoppix to CD hence my need for having done so to a USB 1G flash drive. I configured my BIOS to boot from the USB (the acceptable one being USB.zip) and it begins booting, the POST shows the flash drive, it then shows, "Verifying DMI pool Data" The flashing cursor can be seen write below it and nothing else happens.
Yes i did check the iso with the suggested software, so the download is complete and proper. I used daemon tools to get the image. I then copied all files within it to my USB. I then renamed the USB flash to KNOPPIX.
Now, should the following be of relevance I will etll you why I feel a need for this LiveCD. And it is because I can not boot into my Windows. Even after a chkdsk, Recovery Console command, 'fixboot' and reformatting the C: drive before and after the above. I keep on getting the "invalid partition table' message.
OS: Windows XP home OEM
Hardware: Computer: no brand name --OEM
AMD 64 Athlon 3500+,
MSI ‘K8N Neo4 motherboard, nVidia chipset based
nVidia GeForce LE Graphics card.
RAM 2 gig,
DVD: LiteOn DVD-rw SHM
CD: Lite-on LTR-52246 (CD-rw)
Floppy: none
Kitchen Stove: Just kidding ;-)
BIOS: Award ver. V1.D 052206 11:35:51
Note: in BIOS Standard CMOS settings IDE Primary Master and Slave are set to [none]. The Secondary Master is the DVD drive and the Secondary Slave is the CD drive. While the IDE Third Master is the HD ‘WDC WD1600JS-60MH
Drive C: and D: NTFS Drives E: and F: FAT32
This is way too long so you may not want to read further but just in case someone wants to know what the original problem as and why I came here I have included it.
Brief description, (Should you not have time to read the rest):
Windows XP home begins installing then after it reboots it begins the process again as if it never formatted or began installation. If I change the boot order (from CD 1st to HD 1st) It will read “Invalid Partition Table�. Prior to this attempt at installing Windows, it would not start neither in safe mode, safe mode with command prompt, previous installation, etc.
How the problem may have come about:
All was working relatively fine (‘relatively’ because I was having a problem with the computer hanging when going online possibly due to some ignorant use of a registry cleaner). Anyhow, all was working ‘relatively’ fine for the last 2 months, then after a torrent DVD download was complete I, on my uTorrent client, accidentally clicked on “Delete Torrent and data�. I then proceeded to use about 15 unerase/recovery programs most of which gave negative results—One found what I had lost but being trial I was not able to retrieve these files without payment. During this process the computer was rebooted 3X without problems and hung during the use of one program called ‘iRecover’ [It had previously warned me that my nVidia Chipset may cause problems and that a hanging may occur and if it did to change to the windows driver. Therefore after the hang I did reboot and uninstalled this software]. The reboot was normal.
After this reboot and uninstall I ask myself the question, “Is it worth it for me to pay for this software for only this one DVD?� Saying no I made my big mistake-perhaps. I go to serial/hack pages trying to find a serial key. As I go from page to page I decide this is not a good idea.
Meanwhile uTorrent downloading stuff; I continue to do email; use “Microsoft Word�, listen to music, and view pictures. This goes on for hours.
The following day, having realized that I haven’t rebooted my computer in a day I do so but now it hangs. I wait about 5 minutes and force a shutdown. It did not reboot. It went to the step ‘Windows is loading’ and nothing further. I rebooted a few times to no avail.
My 160 gig HD is divided into 4 partitions—C, D, E, F, where ‘C’ is where the OS was. C and D were NTFS partitions and E, F were FAT 32.
I place my Windows XP Home Edition CD (OEM legitimate copy) in the DVD Drive rebooted changed the boot order to choose DVD drive first but nothing happened. By this I mean nothing—the computer did not start, did not recognize the CD etc. It stopped at a dim light-blue screen—not the usual bright blue screen.
Remembering a past trick I placed a “Windows 98SE� CD and it did boot up to it. And here I saw something funny it said that Volume drive label C was my E, that Volume drive D was F etc. subsequently a ‘dir’ command did show that in fact the files in C were actually those of E etc.(In seeing this I asked is this correct or is this Windows98 thinking wrongly).
I then did a ‘chkdsk’ and had many prompts warnings of a sort whereby I chose one of them. [My apologies here for not being able to give more details for my memory fails me]. Thinking this was a bad idea. I rebooted.
Luckily, or so I thought, it now did recognize the Windows XP Home CD. But then the next bad news—there was no “C� drive. I chose the 1st top as the place to put my NTFS installation—which then became “Partition1 [New RAW]�. BTW the size for the partition was already there.
The copying files and all that begins—I am happy but worried since Win98 CD said that C was E (Was I. I asked myself, therefore formatting and deleting my E drive contents since C was maybe E?). The initial copying finishes and the PC reboots. But it won’t recognize that an installation has begun and instead the process of installing Windows begins. I did so again and again and….but same story. Each time changing the BIOS setting for the boot sequence.
One may note that it took a very long time, about 10 minutes, for the PC to reboot and recognize the cd. Then on the 2nd reboot I waited about another 5 minutes and this time I got the 3 choices, -1- install, -2- Recovery Console -3- reboot
I chose recovery console and in the black screen a ‘dir’ command showed the 4 partitions normally (unlike windows 98 but do recall a formatting of ‘C’ has happened by now).
I formatted the drive and through RC (recovery console) formatted the C drive again and reinstalled, again after the reboot Windows did not recognize that an installation had begun.
Back to the long wait and RC. This time I do the following command (without the quotes, naturally�): “format C: /fs/ntfs�
And nothing, all is the same as before. Back to RC and I do the following command on all 4 drives: “chkdsk /p /r�. RC finds irrecoverable errors on C, finds and recovers some errors on the other 3 partitions. (a future chkdsk on c: I ‘think’ did not find irrecoverable errors)
On reboot the screen asks for installation/setup; I do so and this time there is a ‘C’ drive so portioning/formatting is done on this C drive. But again and again the computer doesn’t recognize that an installation had begun. If I go to my BIOS and choose to boot from the HD (and do so) I see the following, “Invalid Partition Table�.
Back on RC (Recovery Console) I did a ‘Fixboot’ command and still nothing.
I hesitate to ask, “Where did I go wrong� for your list may be endless.
Note: On my PC details above I showed that the IDE Third Master is my HD. When I boot up I don’t see this IDE Third Master—the screen goes up too quickly and pressing the pause key on the keyboard doesn’t seem to work—so maybe it’s there or maybe it isn’t all I do get to see is the DVD and CD drives. Going on the Recovery Console however does show the drives and its contents so, one could assume the hard rive ‘is’ there.
I have thought of formatting the other 3 partitions as well but I really need the stuff (stupidly unbacked up) on them. If I must, I can repartition/format my ‘D’ [ ‘E’ and ‘F’ have important personal info, like letters, and other stuff.].
One Google search showed that the problem may be bad RAM, the PC is 4 months old, and to the best of my knowledge and according to a RAM testing software it is fine. If it is a boot virus I have no clue how to do anything about this.
There is one command on RC that I question if I should use—‘FIXMBR’. A help on it says, If FIXMBR detects an invalid or non-standard partition table signature, it prompts you before rewriting the master boot record [MBR]�. I tried the command and it said, that ‘it may damage all my partition tables. This could cause all the partitions on the current hard disk to become inaccessible.� So I cancelled it. Finally, in rebooting I do get a short beep, which, according to A BIOS website may mean, “DRAM refresh failure’.
So what does one suggest? I do have an external 30G hard drive (USB connection) and a 1Gig flash drive, and my 4-year old Acer TravelMate 270, all of which I hopefully can use to help this if necessary.
You have read this far, you are a hero and worthy of praise.
Re: Got Knoppix 5.0.1 successfully booting from USB key
Quote:
Originally Posted by Krellan2
Knoppix 5.0.1 boots rather nicely from a USB key. It's getting easier to get it working, as the USB bugs from the previous versions have been fixed.
and 5.1.1 on a 2Gb key too. I am composing this in Iceweasel after booting from the 2gb key. I followed Krellan2's instructions, with the modification for the 2Gb drive.
I am running a Dell Latitude D820 with an 80Gb SATA drive which is setup to dual-boot WinXP and Fedora Core 6. The NTFS partition is /dev/sda2 and the USB is /dev/sdb4.
when Knoppix sets itself up, it mounts the /dev/sdb4 partition as /cdrom, which is fine, but it also mounts /dev/sda2 as /cdrom as well. If I attempt to umount /cdrom I get the message that /cdrom is mounted multiple times.
Is there a way to prevent /dev/sda2 from being mounted as /cdrom. I have include the /etc/fstab from the Knoppix session below
Code:
knoppix@Knoppix:~$ cat /etc/fstab
/proc /proc proc rw,nosuid,nodev,noexec 0 0
/sys /sys sysfs rw,nosuid,nodev,noexec 0 0
/dev/shm /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
/dev/pts /dev/pts devpts mode=0622 0 0
/dev/fd0 /media/fd0 auto user,noauto,exec,umask=000 0 0
/dev/cdrom /media/cdrom auto user,noauto,exec,ro 0 0
/dev/hdc /media/hdc auto users,noauto,exec,ro 0 0
# Added by KNOPPIX
/dev/sda1 /media/sda1 vfat noauto,users,exec,umask=000,shortname=winnt,uid=knoppix,gid=knoppix 0 0
# Added by KNOPPIX
/dev/sda2 /media/sda2 ntfs noauto,users,exec,umask=000,uid=knoppix,gid=knoppix 0 0
# Added by KNOPPIX
/dev/sda5 /media/sda5 vfat noauto,users,exec,umask=000,shortname=winnt,uid=knoppix,gid=knoppix 0 0
# Added by KNOPPIX
/dev/sda6 /media/sda6 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sda7 /media/sda7 auto noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sdb4 /media/sdb4 vfat noauto,users,exec,umask=000,shortname=winnt,uid=knoppix,gid=knoppix 0 0
I have knoppix on a usb pendrive
Hi,
I have just manages to get knoppix [5.1.1] on my TrekStor 8g pendrive without too many problems
mkdiskimage and copying over files too forever lol but it worked
wiki page does not mention read/write mode for device?
I'm very happy all I have left to do is some tweaks to syslinux.cfg maybe set home a persistent home then good to go....
Thanks for a great howto & for sharing
MrG
Re: I have knoppix on a usb pendrive
Quote:
Originally Posted by MrGreen
Hi,
I have just manages to get knoppix [5.1.1] on my TrekStor 8g pendrive without too many problems
mkdiskimage and copying over files too forever lol but it worked
Nice. You might be the first in this thread to try on an 8GB USB key.
Yes, mkdiskimage would take a long time. It reformats the entire key.
What was the mkdiskimage command you used? I'm guessing it was something like:
mkdiskimage -F -4 /dev/sda 0 255 63
You'd have to use 0 255 63 instead of 0 64 32, since 0 64 32 is only for the old USB-ZIP "standard" which maxes out at 1GB.
You'd have to use -F, for FAT32, since FAT16 maxes out at 2GB.
8GB is the barrier at which the old CHS standard also maxes out. I'm surprised it was able to work at all. Your USB key must be just under 8GB, perhaps 7.62 GB or so. 8,000,000,000 bytes to the company's PR department, but 7.62 GB to you :)
It's good to be a little under 8GB because your cylinder count will still be under the 1024 barrier. I'm guessing your cylinder count was around 972 or so.
Once we get USB keys above 8GB, the CHS standard won't work any more, and I have some ideas for working around that. A starting point is to hack the mkdiskimage script slightly, to change the FAT32 partition type byte it creates, from 0x0B (FAT32 CHS) to 0x0C (FAT32 LBA).
Quote:
wiki page does not mention read/write mode for device?
Not sure what you mean by this. Edit the Wiki page, if you feel that it is missing an important piece of information.
Quote:
I'm very happy all I have left to do is some tweaks to syslinux.cfg maybe set home a persistent home then good to go....
Thanks for a great howto & for sharing
You're welcome!
I'm envious of your 8GB key, you can put the entire Knoppix DVD (not CD!) on there with room to spare. Big persistent home directory. Then, a full PortableApps installation, for use with Windows. Lots of space left over for transferring files and any additional PortableApps you feel like having. I'll have to pick one of those up myself someday....