hard candy
06-19-2004, 10:11 PM
This is an old article (2001) and I knew you could run linux inside a windows installation, but this trick was neato IMHO. Not sure if it would be useful except in a few situations:
How to boot Linux from MS-DOS with Loadlin:
If we dual boot Linux and Windows 3.x, 95, 98 or MS-DOS, sometimes it will be useful to boot from Windows or MS-DOS straight into Linux from MS-DOS without having to reboot, change BIOS settings, LILO or another
third-party boot manager. You can get this with a small utility called loadlin.exe that normally ships with all Linux distributions. If you haven't got it, you will find it on any FTP that has Linux distributions.
This way of booting isn't in contradiction with LILO, you can use both without any problem. I am not an expert in Linux, but I am using it with success, and I gain a lot of time with my changes between Windows 98 and RedHat 6.2. So I will tell you how I do it :
1. First of all we must create a folder to keep the kernel's image, for example, C:\Linux
2. Now we must copy loadlin.exe somewhere it is accessible to a BAT file, or just copy it to C:\
3. Create a BAT file to boot Linux, it will look more or less as the following lines :
smartdrv /c
loadlin c:\linux\vmlinuz root=/dev/hda3 ro
You only have to change the partition where you have Linux installed. I have it on /dev/hda3, in your case it
can be hda1, hda5, hc1, etc.. If you are not going to save the kernel in C:\linux you will also have to change
that name.
Save the file as "linux.bat" or whatever name you like. As I used to have several distributions installed before, I used to name the BAT file with the name of the distribution, Redhat.bat, Mandrake.bat, etc.
4. Now we have to copy Linux's kernel into the folder. To do so, we have to boot into Linux and copy it to C:\linux or whatever you called the folder, I assume that you know how to see DOS partitions from Linux, using mount, and you know how to recognize the kernel file, it is normally /boot/vmlinuz, but sometimes it's called vmlinuz-2.0.34-0.6, or something like that, be sure to copy it to the right folder as it's named in the BAT file, and you can change the kernel's name once it is in Windows, but please don't rename it in the /boot folder. If you are not sure about all this, have a look at the HOWTO's.
5. Now everything is in its place, the folder with the kernel, loadlin.exe and linux.bat, it's time to try it out :
you have to do it from DOS mode (restart in MS-DOS mode or boot into Windows's menu pressing <F8> in
Windows 95 or 98 or pressing the <Ctrl> key in Windows 98). Run the BAT file, for example :
C:\>linux
(or whatever name you gave it)
If everything runs fine, you will see the typical Linux boot screen and you will soon be in Linux. If this doesn't happen and you get an error message, just check you copied the right file in the right place and the BAT file
is addressing it. If your MS-DOS partition is in FAT32 make sure you have the last version of Loadlin.exe, as earlier ones couldn't read FAT32.
Good luck and enjoy it!
Sve & Julian 2001
How to boot Linux from MS-DOS with Loadlin:
If we dual boot Linux and Windows 3.x, 95, 98 or MS-DOS, sometimes it will be useful to boot from Windows or MS-DOS straight into Linux from MS-DOS without having to reboot, change BIOS settings, LILO or another
third-party boot manager. You can get this with a small utility called loadlin.exe that normally ships with all Linux distributions. If you haven't got it, you will find it on any FTP that has Linux distributions.
This way of booting isn't in contradiction with LILO, you can use both without any problem. I am not an expert in Linux, but I am using it with success, and I gain a lot of time with my changes between Windows 98 and RedHat 6.2. So I will tell you how I do it :
1. First of all we must create a folder to keep the kernel's image, for example, C:\Linux
2. Now we must copy loadlin.exe somewhere it is accessible to a BAT file, or just copy it to C:\
3. Create a BAT file to boot Linux, it will look more or less as the following lines :
smartdrv /c
loadlin c:\linux\vmlinuz root=/dev/hda3 ro
You only have to change the partition where you have Linux installed. I have it on /dev/hda3, in your case it
can be hda1, hda5, hc1, etc.. If you are not going to save the kernel in C:\linux you will also have to change
that name.
Save the file as "linux.bat" or whatever name you like. As I used to have several distributions installed before, I used to name the BAT file with the name of the distribution, Redhat.bat, Mandrake.bat, etc.
4. Now we have to copy Linux's kernel into the folder. To do so, we have to boot into Linux and copy it to C:\linux or whatever you called the folder, I assume that you know how to see DOS partitions from Linux, using mount, and you know how to recognize the kernel file, it is normally /boot/vmlinuz, but sometimes it's called vmlinuz-2.0.34-0.6, or something like that, be sure to copy it to the right folder as it's named in the BAT file, and you can change the kernel's name once it is in Windows, but please don't rename it in the /boot folder. If you are not sure about all this, have a look at the HOWTO's.
5. Now everything is in its place, the folder with the kernel, loadlin.exe and linux.bat, it's time to try it out :
you have to do it from DOS mode (restart in MS-DOS mode or boot into Windows's menu pressing <F8> in
Windows 95 or 98 or pressing the <Ctrl> key in Windows 98). Run the BAT file, for example :
C:\>linux
(or whatever name you gave it)
If everything runs fine, you will see the typical Linux boot screen and you will soon be in Linux. If this doesn't happen and you get an error message, just check you copied the right file in the right place and the BAT file
is addressing it. If your MS-DOS partition is in FAT32 make sure you have the last version of Loadlin.exe, as earlier ones couldn't read FAT32.
Good luck and enjoy it!
Sve & Julian 2001