1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
|
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Loadlin LG #34</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<!--endcut ============================================================-->
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H1><font color="maroon">Loadlin.exe Installer</font></H1>
<H4>By <a href="mailto:bbennet@mb.sympatico.ca">Bill Bennet</a></H4>
</center>
<P> <HR> <P>
<center><h2>This makes a loadlin.exe button on a Windows95 desktop</h2></center>
<p>How many times have you sat and waited for Windows to shut down while you rebooted? How many times have you read that "Please wait..." message? If I show you how to reboot in under one minute will you give it a try? Rhetorical questions all, yet there is a need for a fast reboot out of Windows if only to preserve your even temper and a sense of decorum. This little piece will install loadlin as your linux boot program and get you out of the Windows environment in under one minute. The by-product will be a login prompt for linux. I hope I do not get any complaints about this blatant effort to undermine the monopoly OS.<br>
<h2>RedHat 5.1 can do this thing</h2>
<p>Just about all linux distributions can do this little loadlin button on the desktop of DOS 7.0. The odd cat in the bunch is RedHat; an example is that they insist on loading up the /usr directory when /usr/local will do nicely. They have some quirks, but don't we all? This article fires up RedHat 5.1 and makes them fit in.
<p>The RedHat installer will offer you a chance to add 'DOS and Windows connectivity'. Do it. This will let you mount the old DOS partition from linux and also allow you to copy your kernel image (vmlinuz) to a directory on the DOS partition to be booted by loadlin.exe.
<p>The official RedHat position on LILO is a good one. They always offer to put LILO on the master boot record or the first sector of the first partition. This gives you a solid base to make your bootings work. They also let you skip the LILO installation.
<h2>Skip LILO</h2>
<p>To use loadlin.exe, we will first skip LILO. The prompt in the RedHat installer asks you where to install LILO and I put the asterisk on the 'first partition' choice and Tab to the 'skip' choice and hit Enter.<br>
<p>When you startx, the control panel's linuxconf program (System Configuration) gives you a chance to set the 'Config-boot mode-LILO defaults' for your machine. Make sure that the 'LILO is used to boot this system' button is left 'up'.
<h3>All hail thenerd and his incessant questions!</h3>
<p>(I got this idea from 'thenerd' in Portage la Prairie, Manitoba. The parents who own the machine did not want anything to change in the way that they played with their DOS. They did not want to have any changes in the bootup of their machine. So, if we boot from DOS to linux, they will never know about or see any 'LILO boot:' messages and they can remain fossilized.)
<br>
<h2>Make a bootdisk please</h2>
<p>The RedHat installer asks you nicely if you will be making a boot disk and you will always answer 'yes'. Do not pass go. Go directly to 'yes'. You will thank me if you get those 'signal 11' errors (a whole other article). The beauty of this bootdisk is that you can experiment with boot time options for the kernel. Once you get linux rolling you can make a boot disk with the mkbootdisk command.<br>
<h2>Fasten seatbelts during re-entry</h2>
<p>After the install is complete, you will be rebooted. Pull out the boot disk because we are going back to DOS to set up the boot button. Since we do not have LILO on the master boot record, the system will boot DOS as usual. Yes I have made a big assumption about you installing linux AFTER the DOS is installed. It only makes sense when dealing with a predatory OS like DOS to let it think it has the whole system to itself. Once the master boot record is erased and overwritten by DOS you then can install a more sophisticated system like linux.
<h3>Special note on PartitionMagic 4.0</h3>
<p>Direct from the technical support guru Will Erickson at powerquest.com:<i> "PartitionMagic 4.0 does fully support Linux ext2 partitions. It is able to re-size them without any problems."</i>
<p> This is also the program to get for re-sizing your single FAT32 partition into something more reasonable, like maybe a linux web server and a personal linux workstation as well as a DOS game machine.
<h2>"The illegal operation occurred in this directory, Mr. Gates."</h2>
<p>The directory for your linux kernel is your choice. Make one called 'c:\linux\kernels' and you can copy the 'linux.bat' verbatim. Now that we have a place for loadlin.exe to work, put it IN THE PATH. Do this by putting it in a DIRECTORY that is in the path. I already have a 'c:\utils' directory on the path and that is where you will find loadlin.exe.
<h2>The batch</h2>
<p>The edit program works nicely for this batch file writing, but notepad will work for those of you without the command prompt. Here is the abbreviated linux.bat:
<br>
<p>rem This ensures that any unwritten disk buffers are flushed
<p>smartdrv /C
<p>rem This loads up the kernel and boots linux
<p>loadlin c:\linux\kernels\vmlinuz root=/dev/hda2 ro
<br>
<h2>Root equals what?</h2>
<p>The '/dev/hda2' assumes that your linux boot partition is the second one on the first hard disk. Your special and unique installation gets entered as the 'root=your_root_partition_here'. The 'ro' will mount it 'read only' and that is just standard procedure. Do not make it 'rw' if you have not read about what pitfalls await.
<h3>Special linux power</h3>
<p>My RedHat 5.1 partition is booting happily from /dev/hdc9 which is not any where near the 1024 cylinder limit; in fact it is 2 gigabytes over the limit. It is also on an extended partition. This is called a logical partition as opposed to a primary partition. The linux system of GNU components has got to be the most super-powered and adaptable OS on the market. It is booting <i>without the BIOS from a logical partition</i> in an extended partition that is 2 gigabytes over the 1024 cylinder limit. This is because loadlin.exe was developed by the linux web hacker method and the kernel folks and the LILO folks were included in the process. It is a powerful development model.
<h2>What is vmlinuz?</h2>
<p>The vmlinuz is not there yet. It is the name you will give to your kernel image. We need to use the boot disk in a moment so that we can put a kernel in 'c:\linux\kernels'.
<br>
<p>Save your 'linux.bat' in a directory ON THE PATH. I already have a 'c:\batches' directory that holds '.bat' files and this is where you will find 'linux.bat'.
<h2>The shortcut</h2>
<p>At the DOS 7.0 desktop (Windows95 is just a window manager for DOS 7.0) you will now right click your rodent for the momentous creation of a new shortcut. Select your new 'linux.bat' with the 'browse' button beside the little command line window. Choose 'open' and it will be entered as the command line for your new shortcut.
<p>Do a right click with your rodent on the new shortcut and select 'properties'. Then select 'program' and then the 'advanced' button. You need to make sure that your new batch will use the MS-DOS mode. You also need to use the current configuration, whatever that may be. The job is<a href="#winfoot1"> done.</a>
<p>Also give Microsoft a bit of credit for letting you choose a different icon.
<h2>The icon</h2>
<p>If you right click your rodent on your new shortcut, the menu item 'properties' will get you to the 'change icon' button. Push de button and make it go.The choices are very nice and I have a personal attachment to the 'dynamite' icon. Perhaps you will choose the lightning bolt. Suffice it to say that what is about to happen to Windows is very swift and violent. My icon shows a detonator and some red sticks of dynamite and it is labelled 'LINUX'. It looks ominous and tempting, especially when Windows gets itself into a jam.
<h2>The last look at 'that message from Gates'.</h2>
You know, since I have installed the LINUX button, I use it to shut down Windows. The best part of this trick is that since I started using the LINUX button I have not seen 'that message'. You have seen it and you are just as ticked off by it as the rest of us. It says "It is now safe to turn off your computer." This one and that infernal "Your program has performed an illegal operation and will be shut down" message are probably the most offensive and arrogant messages from a supplier to its clients in the history of business relations. I thank the boys in Redmond, Washington for offending so many nice people. We are enjoying our linux boxes so much more when we reflect on the nice manners of our fellow travellers.
<h2>Time to test our work:</h2>
<ol>
<li>make a new linux box without LILO
<li>make a boot disk for linux
<li>boot to DOS
<li>make a directory for the kernel
<li>write a batch file for loadlin.exe
<li>put the batch file on the path
<li>copy loadlin.exe to a directory on the path
<li>make a shortcut to the batch file on the desktop
<li>select or make a groovy icon for the shortcut
<li>select 'shutdown windows' for perhaps the last time
<li>boot the boot disk to linux
<li>read the rest of this drivel
</ol>
<h2>The rest of this drivel</h2>
<p>Now that the boot disk has you in linux, you "log in". You did remember your password and you are now called 'root' by your staff. Type the mc command and Enter. You will now be using mc (Midnight Commander) to finish the job.
<p>The arrow keys will take you to '/boot'. Select 'vmlinuz-2.0.34-0.6' and then press Tab. Your cursor will jump to the other window.
<p>Now we will actually do some 'linuxing'. Enter this:
<p>mkdir /dos
<p>Then Enter this:
<p><a href="#bootfoot1">mount -t vfat /dev/hda1 /dos</a>
<p>This '/dev/hda1' assumes that this is your DOS partition. Your special and unique setup will be entered as the "/dev/your_DOS_partition_here". It gets mounted on the /dos directory that you just created.
<p>Then Enter this one:
<p>cp /boot/vmlinuz-2.0.34-0.6 /dos/linux/kernels/vmlinuz
<h2>Oh yeah? Eat LeftAlt-F2!</h2>
<p>Once these little commands are done, you will be able to navigate over to the '/dos' directory where your DOS partition is now visible and accessible from linux. Cool, eh?
<p>If things are just too busy on the mc screens, you can hold Ctrl and press the letter 'o' to get back to the shell prompt. Ctrl-o again to get back to mc.
<br>
<p>If you want to read documents and switch back and forth you can hold LeftAlt and press F2 to open another console; a virtual console. LeftAlt-F3 opens a third console. You get 64 of them with linux. Just log in again and fire up another version of mc or lynx or whatever. To get back, you select LeftAlt-F1. Four or five consoles should keep the average 'frantic reader' happy.
<h2>Copy the kernel to vmlinuz</h2>
<p>The mc cursor is put on the kernel. It is in '/boot' and it is called 'vmlinuz-2.0.34-0.6' in RedHat 5.1. Tab to get your cursor into the other window. Here is why there are two of those windows:
<p><strong>"You get to see what you are doing."</strong>
<p>Navigate to the '/dos' directory and then to the '/linux/kernels' directory.
<p>Make sure the cursor is on the kernel. Tab over there now.
<p>The kernel is highlighted in one window in '/boot' and the other window is in '/dos/linux/kernels'.
<h2>"F5 copy on two. Block somebody! Ready, break!"</h2>
<p>Press F5. Voila! You get the copy window and all you have to do is hit Enter. The result? You now have a kernel image with the wrong name in the DOS partition.
<p>Better yet, before you hit 'enter', type in the new name of your kernel:
<p>/dos/linux/kernels/vmlinuz
<p>The command line for these fiddlings is this:
<p>cp /boot/vmlinuz-2.0.34-0.6 /dos/linux/kernels/vmlinuz
<h3>But I already did that</h3>
<p>Caught me again. Yes, I got you to do something two different ways. Welcome to linux. Forgive me. I need you to open up your 'brain pathways', you see. The very best part of linux for me and a whole crew of other linuxians is that the computer is fun again. Isn't that why you got one in the first place?
<center><h1>The force is with you</h1></center>
<p>Well, we have put a 'vmlinuz' kernel image in the DOS partition. Time to reboot.
<p>Do NOT use the reset button. Your file system needs to be cleanly unmounted. Linux can 'fsck' and fix its way out of trouble but why tempt fate?
<p> Type in this powerful command:
<p>shutdown -r "now" (it also works without the quotes) This one does the reboot.
<p>More power: shutdown -h "now" (this one does the halt of everything so you can turn off the machine)
<p>Alternatively, RedHat and other distributions have implemented the 'Vulcan nerve pinch' so that folks switching from the 'crashing OS' can use Ctrl-Alt-Del to reboot.
<h2>Boot to DOS to boot to Linux</h2>
<p>The Windows95 machine lets you select plain DOS mode at boot up. If you are just so impatient to see your test results, then boot to plain DOS mode.
<p>Type in this fateful command:
<p>linux
<p>If you do want to see the fun stuff, let DOS do the bootgui thing all the way to the desktop.
<h2>"Thar she blows"</h2>
<p>Sitting on your desktop is the ultimate affront to the 'powers that be' at Microsoft. Push that button and you destroy fifteen years of monopolistic avarice. Push that button and declare your right to freedom of expression. Push that button and stand up and be counted. Push that button and boot linux.
<p>That about wraps it up from this desktop. Adios. Dynamite that sucker! <br>
<br>
<h3>Reference reading and links:</h3>
<p>BootPrompt-HOWTO - required reading for all linuxians
<p>Bootdisk-HOWTO
<p>Loadlin+Win95 mini-HOWTO
<p>The RedHat Linux Installation Support FAQ - good basic stuff here
<p><a href="http://www.vcnet.com/bms/">The Boycott Microsoft Page at www.vcnet.com/bms/</a>
<p><a href="http://www.redhat.com">The home of RedHat at www.redhat.com</a>
<p><a href="http://www.powerquest.com">The home of PartitionMagic 4.0 at www.powerquest.com</a>
<p><a href="mailto:bbennet@mb.sympatico.ca">The place to get ComputerHelperGuy easy-install files</a>
<p><a href="mailto:bbennet@mb.sympatico.ca">The electronic mailbox of Bill Bennet</a>
<h3><a name="winfoot1">Windows footnote</a></h3>
<p>It is a good idea to close all other programs before pushing your LINUX button. The boot process takes about three seconds before you are uncompressing linux and an elapsed time of 58 seconds to the login prompt. Your mileage may vary. Your DOS file system is left a-ok and properly 'unmounted', if it is correct to talk about a rebooting 'crashing OS' that way.
<p>Example: I have seven little programs running at startup and I added Netscape and an editor. Then I pushed the LINUX button. Elapsed time to the linux login prompt was 65 seconds.
<p>Make sure you save your work before you hit that button!
<h3><a name="bootfoot1">Booting footnote</a></h3>
<p>If the darn thing won't 'mount -t vfat' the /dos partition, it probably can not find the module dependencies file in '/lib/modules/preferred'. This is no sweat. Type this:
<p>man symlink
<p>Read the manual page for symlink. Then cd to '/lib/modules' and make a symlink called 'preferred' that points to your '/lib/modules/your_kernel_name_here'.
<p>The command line for this is:
<p>ln -s /lib/modules/your_kernel_directory_name_here(put a single space here)/lib/modules/preferred
<p>This is very easy with mc. Start with the mc command. Navigate over to '/lib/modules'.
<p>Put the cursor on the '/lib/modules/your_kernel_name_here' directory.
<p>Type F-9, then f (for file), then s (for symlink), then arrow down to 'Symbolic link filename:'.
<p>Enter this:
<p>/lib/modules/preferred
<p>Then Enter this:
<p>depmod -a
<br>
<p>The job is done.
<p>It is ok to delete it and redo it if you wish. Also, you can 'Esc-Esc' the Symlink window to cancel.
<hr>
<p><center><strong>made with GNU Emacs 20.2.1 on an i486 <BR>
running RedHat 5.1 Linux 2.0.35-2<BR>
No animals were eaten during the testing of these procedures.<BR>
All references to Mr. Gates are purely intentional.</strong></center>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright © 1998, Bill Bennet <BR>
Published in Issue 34 of <i>Linux Gazette</i>, November 1998</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./jenkins3.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./ayers1.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->
|