PDA

View Full Version : HOWTO: Poor Man's Dual Boot PC!



A. Jorge Garcia
04-30-2003, 01:01 AM
In a previous posting, http://www.knoppix.net/forum/viewtopic.php?t=2021, I spoke about how to boot KNOPPIX without a CD or boot floppy by saving the the KNOPPIX compressed image file from a burned CD and the vmlinuz + miniboot.gz files from a rawritten boot floppy to M$ WINDOZE partition like hda1. This was only good on a machine that supports real DOS mode and VFAT = WIN95, WIN98 and sort of on WINME where you still needed to boot the rescue disk, ouch....

However, I've found the following more convenient, especially when don't have the security to change such things on the WINDOZE PC you're using.... This works well on any PC that boots a floppy, even WINME. Also, you do not have to deal with the M$ WINDOSE desktop icons or a M$ DOZE batch file. In this method you use the boot floppy to find the KNOPPIX compressed image file on a partition, say hda1, instead of the CD and boot from there!

Sorry, I think I need the following 2 disclaimers based on some weird replies I got on the above posting.

Word of Warning #1: Use this HOWTO at your own risk. I take no responsibility for any problems you incure while experimenting with this HOWTO. I make no guarantees, neither explicit nor implied as to any application you may use this HOWTO for.

Word of Warning #2: I have not tested this on any other partitions nor have I tested this on NTFS. So, if you want to experiment with those options, caveat emptor! Please note that this HOWTO is just "my 2 cents" and you get what you pay for....

Step0:
You still need to burn a KNOPPIX ISO to a CD and rawrite the corresponding boot IMG to a floppy.

Step1:
Boot your KNOPPIX CD normally.

Step2:
Mount hda1 = click the hda1 icon on the KNOPPIX desktop.

Step3:
Open a root shell = click the <K> kogwheel, then <KNOPPIX> and then <root shell>.

Step4:
Make hda1 read-write = issue the following command line in the root shell.
mount -o remount,rw /mnt/hda1

*or*
Step4:
Make hda1 read-write = right click the hda1 icon on the KNOPPIX desktop and then click <change read write mode>.

Step5:
Make a new directory on hda1 to hold the KNOPPIX file = issue the following command line in the root shell.
mkdir /mnt/hda1/knoppix

Step6:
Copy the KNOPPIX file to the new directory = issue the following command line in the root shell.
cp /mnt/cdrom/KNOPPIX/KNOPPIX /mnt/hda1/knoppix

Step7:
Wait 4-8 minutes, depending on how fast your CD drive is, for step6 to finish and shutdown KNOPPIX normally.

Step8:
Boot the PC with the boot floppy still in place, but without the CD. Now you won't need your CD ever again! The boot floppy is slow, which is not new unless you're used to booting with the CD only, but once the boot process switches to hda1 (not scd0 anymore), it goes faster than the CD.

What's nice about this approach is that you don't need to repartition anything, it still boots like KNOPPIX with all the autodetection and its still read only (its the same everytime you boot it, noone can mess it up running from a ramdisk). You don't get that from knx-hdinstall! Also running apps off hda1 is faster than doing so off the CD (unless, unlike me, you have an incredibly fast CD drive). This also helps me in when I upgrade to a new release on KNOPPIX, I don't have to burn 25 CDs and rawrite 25 boot disks for all my students anymore. All I'll do is burn 1 CD, delete /mnt/hda1/knoppix/KNOPPIX, copy the new /mnt/cdrom/KNOPPIX/KNOPPIX there and rawrite 25 new boot disks. What a time saver!

Enjoy!

Regards,

peterla
05-01-2003, 07:12 PM
I'm sorry for being stupid but I know nothing about Knoppix or indeed linux at all. Can you tell me what "rawrite the corrsponding boot IMG to a floppy" means and how I actually do it?
Thank you for your patience!

SillyFly
05-02-2003, 03:33 PM
actually, I have done this once on an XP computer, with no CD, and with no CD recorder availeble.
liuckily, winRAR can handle ISO files, and it extracted exerything from it out to the hard drive.
so I copied the compressed KNOPPIX file into c:\knoppix\ and used rawrite2.exe to rawrite the boot image to a boot floppy.

you can do the same from linux by mounting the iso image (mount -o loop knoppix.iso /mnt/something/).
also, if you want boot to take less time, you can make a new 2MB fat 16 partition, syslinux it, and copy the files from the boot image onto it (but not LDLINUX.SYS)
mounting is done like - mount -o loop -t vfat boot.img /mnt/something
then just add that partition to your LILO/GRUB menu, and - walla! a super-fast read-only knoppix!

A. Jorge Garcia
05-02-2003, 07:48 PM
Yes, SillyFly, you are most certainly correct!

However, I'm writing this howto from the following vantage points.

(1) Someone who doesn't have any linux tools available yet, ie: a M$ WINDOZE only environment. However, your WINRAR method is very interesting....

*and*

(2) Someone who doesn't want the standard lilo dual boot.

Regards,

A. Jorge Garcia
05-02-2003, 07:58 PM
Can you tell me what "rawrite the corrsponding boot IMG to a floppy" means and how I actually do it?
Thank you for your patience!

rawrite.exe is a DOS utility program to make boot floppies for people whose CDROM drive does not boot. If you can boot your KNOPPIX CD already you don't need rawrite. However, you will need the boot disk when you're done copying KNOPPIX to hda1. The idea is to use the boot floppy to boot the KNOPPIX image from hda1 so you don't need the CD anymore.

OK, so if you can boot the CD without the boot floppy, you can make the boot floppy once you're booted-up in KNOPPIX. Open a shell and issue the following command line.

dd if=/mnt/cdrom/KNOPPIX/boot-en.img of=/dev/fd0

dd
copies images of disks (its like burning ISOs on CDs)
if
is the input file
of
is the output file
boot-en.img
is the English language boot disk image
/dev/fd0
is the diskette drive

Let me know if you need to use rawrite instead of dd.

Good Luck!

A. Jorge Garcia
05-17-2003, 07:42 PM
>>
Word of Warning #2: I have not tested this on any other partitions nor have I tested this on NTFS. So, if you want to experiment with those options, caveat emptor! Please note that this HOWTO is just "my 2 cents" and you get what you pay for....
<<

Remember the disclaimer? Well, here's an update.

I just tried this process on WINXP PC with NTFS. OK, so KNOPPIX would mount hda1 but it wouldn't let me make it rw. So, I rebooted into WINXP and created a c:\KNOPPIX folder that way. Now I use the WIN98 boot disk (see faster boot floppy) and it doesn't frind c:, does this mean that the WIN98 boot floppy doesn't recognize NTFS? How do I make a boot floppy that does? I looked in WINXP and see nothing about making rescue disks....

EDIT:
BTW, the kernel boot disk can't find it either....

TIA,

Henk Poley
05-17-2003, 08:22 PM
Now I use the WIN98 boot disk (see faster boot floppy) and it doesn't frind c:, does this mean that the WIN98 boot floppy doesn't recognize NTFS?
Yes, although "NTFS" was around when Win98 was there it isn't included in the OS (nor bootfloppies). But even if MS did include NTFS support back then, it wouldn't work, since WinNT4/XP/2000 all have slightly different NTFS filesystems.

That's also why Linux is currently having trouble reading NTFS, too many new versions of the 'same' filesystem.

A. Jorge Garcia
05-20-2003, 06:42 PM
OK, I did all this with KNOPPIX V3.1 20030101. Now I need to come up with a new howto for upgrading to the lastest KNOPPIX! I just dowbloaded V3.2 20030516 and it looks great!

Regards,

A. Jorge Garcia
05-22-2003, 08:12 PM
OK, here goes nothing:

HOWTO: Upgrade Poor Man's Dual Boot

Step(0):
Download new ISO.
Burn new CD (with Easy CD Creator or cdrecord) and create new boot floppy (with rawrite or dd). You do not need a new boot floppy if you can boot the new CD without it. If you need a boot floppy to boot the CD, make sure you make a new kernel based boot floppy using boot.img - do not use the DOSbootfloppy. However, I strongly recommend using the faster DOSbootfloppy when you reboot, Step(8), take a look at http://www.knoppix.net/forum/viewtopic.php?p=12042#12042

Step(1):
Boot new CD with or without boot floppy as needed

Step(2):
mount hda1 (simply left click desktop icon for hda1)
make hda1 rw (simply right click desktop icon and click "change to rw..." and answer "yes" only if you have a VFAT hdd)

Step(3):
open a root shell (click the K cogwheel, click knoppix, click root shell)
execute steps (4)-(7) in this root shell
you could use an ordinary shell for these steps, except for step(5)

Step(4):
mkdir temp

Step(5):
mount /cdrom/KNOPPIX/boot.img temp -o loop

Step(6):
cp temp/vmlinuz /mnt/hda1/KNOPPIX
cp temp/miniroot.gz /mnt/hda1/KNOPPIX

Step(7):
cp /cdrom/KNOPPIX/KNOPPIX /mnt/hda1/KNOPPIX

Step(8)
Now reboot with your choice of kernel boot disk or the faster DOSbootdisk.
You don't need the CD anymore!

NOTE: if you created your own boot disk, then you can skip step(5) and make Step(6)
cp /mnt/floppy/vmlinuz /mnt/hda1/KNOPPIX
cp /mnt/floppy/miniroot.gz /mnt/hda1/KNOPPIX
as in the original installation

QUESTION: In Step(5) I mount boot.img to extract vmlinuz and miniroot.gz without having the rawrite or dd. Can I do this with the ISO to extract /KNOPPIX/KNOPPIX without having to burn a new CD? If I were to mount the large KNOPPIX compressed image file this way, do I need lots of extra RAM?

Enjoy!

A. Jorge Garcia
05-23-2003, 07:16 PM
OOPS, you can skip Step(4) mkdir temp in your home dir and use tmp which is already there....

Regards,

A. Jorge Garcia
07-30-2003, 04:38 PM
J.drake, you may want to look at this!

Good Luck,

A. Jorge Garcia
08-27-2003, 01:14 PM
OK, I got sick of this machine that came preinstalled with WINXP and NTFS. So, I reinstalled WINXP on VFAT32.

I copied the entire contents of /cdrom/KNOPPIX/* to c:\KNOPPIX.

Its also easy to make the DOS Boot Floppy! Just go to My Computer and click on the floppy. Then if you click on format there's a choice for formatting a boot floppy! All you have to do is add the autoexec.bat file.

Works like a charm!

Regards,

A. Jorge Garcia
09-05-2003, 09:18 PM
OK, now I've installed a "Poor Man's Dual Boot" on my new lab of Dell Optiplex GX270s. These machinces came with 3 VFAT32 partitions. hda1 was setup as a rescue disk of 32MB, hda2 is about 10GB and has a full M$ WINDOZE XP install and hda5 is about 10GB and is empty (we ordered these with 2 10GB VFAT32 partitions). So here's what I did to install the lastest version of KNOPPIX on these new PCs.

Step0A: download latest *.iso and cdrecord it
Step0B: place old DOSBootFloppy in /mnt/floppy (I have loadlin.exe there)

Step1A: mount hda5 (click desktop hda5 icon)
Step1B: make hda5 rw (right click desktop hda5 icon, click change rw and click yes)

Step2A: open a root shell (click <K><KNOPPIX><ROOT>)
Step2B: mkdir /mnt/hda5/knoppix
Step2C: mount /mnt/cdrom/KNOPPIX/boot.img tmp -o loop

Step3A: cp tmp/* /mnt/hda5/knoppix
Step3B: cp /mnt/floppy/loadlin.exe /mnt/hda5/knoppix
Step3C: cp /mnt/cdrom/KNOPPIX/* /mnt/hda5/knoppix

Now you can reboot with your modified DOSBootFloppy (see previous post and http://www.knoppix.net/forum/viewtopic.php?t=2273) once you've updated autoexec.bat's loadlin line with any new boot cheatcodes as needed!

Enjoy,

flamesrock
09-06-2003, 05:34 AM
Impressive.

So if I understand right, it's possible to put Knoppix on a windows (FAT32) drive and boot it from a floppy -- or even a seperate partition for increased speed??

And you CAN write to the drive and save data and settings?? (Without too much of a hassle.)

If all this is infact possible, I have one simple (err..maybe complex) question:

I want to install Knoppix on the drive of a family computer for personal use. Everybody else wants to use windows. However, the only way my parents would allow this is if I kept it virtually invisible - meaning no bootloaders - since their simplistic brains cannot appreciate the beauty of lilo.

At the same time, I want to make it load reasonable fast. So is there a way to somehow merge the partition idea and the bootdisk idea, so that when I boot the floppy, it would command the partition to fling me into linux with maximum speed? Maybe not by means of lilo, but anything would do.

Hope I make some sense.

-Thanks

A. Jorge Garcia
09-07-2003, 04:40 PM
With the DOSBootFloppy, as opposed to the KNOPPIXBootFloppy (kernel based), everything boots faster because vmlinuz and and miniroot.gz are read from the hdd, not the floppy. This is faster than the CD boot too, but not faster than hdinstall boot.

Also, the DOSBootFloppy is a DOS formatted disk so you cannot use knoppix.sh to save settings. However, as this is not a kernel based boot disk, there's room on the disk to save files that you create (~500KB).

This is a very "invisible" setup and I use it at home and at work.

Good Luck,

A. Jorge Garcia
09-07-2003, 10:24 PM
BTW, in the "Poor Man's Dual Boot" method, you're essentially copying the KNOPPIX read-only compressed file system to a hdd. Therefore, it will still work like it s on a CD. So you can't save anything to the hdd unless you setup another partition to write to. That's why I save to /mnt/floppy.

Regards,

flamesrock
09-08-2003, 01:33 AM
Thanks for the reply.

I just finished doing this on the win 98 computer. However when I booted it up from the floppy it did not work -- saying something about not being able to find the kernal image. It was not a completely empty disc however (had some files formated for windows on it.) But I assumed that this wouldn't effect it.

Plus when it was making the CD, it said something about an input/output error. I'll try making another boot CD and report back.

Anyways..here's something else I found while just surfing:

http://linuxconsole.tuxfamily.org/index.php?langue=en

It's very similar to knoppix and uses a different method to boot from windows (see this link for detailed info http://linuxconsole.tuxfamily.org/howto.php?langue=en#Boot)

I just thought that you guys at the knoppix forums might be interested in checking it out :)

flamesrock
09-08-2003, 02:52 AM
Ahh -- it works now!

A. Jorge Garcia
10-02-2003, 09:41 PM
OK, just to streamline the process a bit, here's what I've been doing lately.

Step0
*download latest ISO and cdrecord it (assuming you have a linux box)
*place old DOSBootFloppy in /mnt/floppy (I added loadlin.exe there)

Step1
*mount hda5 (click desktop hda5 icon)
*make hda5 rw (right click desktop hda5 icon, click change rw)
*delete the /mnt/hda5/knoppix directory if it already exists

Step2
*open a root shell (click <K><KNOPPIX><ROOT>) and type:
mkdir /mnt/hda5/knoppix
mount /mnt/cdrom/KNOPPIX/boot.img tmp -o loop
cp tmp/* /mnt/hda5/knoppix
cp /mnt/floppy/loadlin.exe /mnt/hda5/knoppix
cp /mnt/cdrom/KNOPPIX/* /mnt/hda5/knoppix

FIN!!!

BTW, just go get some coffee and order out for pizza while that last step completes. Depending on cdrom drive speed, I've has this take from 5-15 minutes!

NB, the part about deleting an old /mnt/hda5/knoppix is new.

Enjoy,