Mounting DOS partitions

I've just installed redhat 6.1 on a multiboot NT/95 system. I put Lilo on the /boot partition I created and use loadlin from DOS to boot linux. Trouble is I'm trying to mount my floppy or DOS formatted partitions in order to copy across the linux boot sector but I get an error saying the linux kernel doesn't support this file type.

How can I make the kernel mount DOS partitions? I actually used the vmlinuz from a slackware distribution with loadlin. Should I be using one from the redhat boot or CD?

mount -t msdos /dev/hdd1 (or fd0) /mnt
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What is the reason for you to use the kernel from slackware on a cleanly installed RH system. The generic kernel, that comes with the RedHat is compiled already with support for
MsDos and vfat filesystems. Just copy
the vmlinuz file (that is in /dosutils/autoboot
on the RH CD) to your loadlin directory in DOS, and do the usual stuff:

smartdrv /C
loadlin vmlinuz root=/dev/hda4  ro  vga=0
(/dev/hda4 is my Linux partition, yours may differ, but you probably know yours).

That should do the trick, and I don't understand, why do you need lilo, if you're
booting with loadlin from DOS.
deal051298Author Commented:
I'm using lilo becuase I want linux to be available as a boot option from the NT bootloader. Sorry I rejected your question because I'm trying to find out how to boot DOS partitions after the fact. If the only way to do this is to have dos-compatibility in the kernel and have the kernel precompiled then I'd like some pointers on how to take a non dos-compatible kernel and add this functionality to it.

If no-one gives me these answers then you'll get the points
Adding things to kernel is done by recompiling the kernel, you don't wanna do that at that stage. Besides, the default kernel does have
the msdos/vfat support, you only need to use the right kernel.
OK, we'll do it from the beginning:
After you installed RH6.1, you had next file
in your /boot directoty:
This kernel does support msdos, iso6990 and vfat by default.
In order to use loadlin, put this kernel
near your loadlin.exe and do whatever
I said in the first answer.
In order to use NT loader you
should have the next lines in your lilo.conf:
Now, run "lilo".
The next step is to take 512 bytes from the boot sector and to put the in file:
dd if=/dev/hda4 of=/bootsect.lnx bs=512 count=1

And in NT boot.ini you write: C:\BOOTSECT.LNX="Redhat Linux 6.1"

Now, you should copy bootsect.lnx into your dos partition, that NT loader could find it.
This maybe tricky for you, since you can't
copy things to DOS partition, since that is what we are trying to fix here.
So here are your options:
While you are in DOS,you can grab the kernel here:
Now do the loadlin part of installation(see first answer).
Boot Linux using loadlin and this kernel (at this point you have the option to write to msdos disks, since this kernel supports it).
Now continue, do the NTLoader part as I described, and copy the bootsect.lnx to a msdos partition, and configure boot.ini.
Now, the msdos will work both with Loadlin and NT loader.
The second option is to use explore2fs utility
from NT:
in order to copy vmlinuz.. and bootsect.lnx from
your ext2fs partition.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

There should be something called autofs on your system. Running it will help you solve the problem of not being able to mount other filesystems.
As soon as kernel supports the filesystems
ebery other autofs helpers would work, but till then....nothing to do.
NT / W95 usually uses FAT32 ..


mount -t vfat /dev/hdd1 /mnt/c


mount -t vfat /dev/fd0 /mnt/floppy

Vfat is an extension to msdos. If kernel
doesn't support msdos, there is NOOO way
it includes the support for vfat.
deal051298Author Commented:
mount -t vfat /dev/fd0 /mnt/floppy


kernel does not support this filesystem. Same for msdos.

finik, how can I put the kernel in /boot next to loadlin.exe if I can't mount any msdos partitions floppies to copy it to?

Also, I copied the kernel from /dosutils/autoboot and used that to boot linux but it still doesn't recognise the filesystem. I am getting FAILED notices with some of the boot processes some are related to file systems. I'll try and capture the other ones. Two short questions - how do a make a boot floppy and how do I see a log of the boot process.


My dos partitions are FAT16.
Have you read my answers? If you can't access
dos partition from linux, then why just don'y you access (only this time, once)  linux partition from windows - with explore2fs.
I gave the link.
In order to mount the FAT16 drive from Linux you need kernel support. finik is quite right. You can either follow his advice and use RH6.1 or you can compile your existing kernel after adding support via the "make menuconfig" command.

The kernel itself needs to be able to hook to the device driver, if it was not compiled with fat support it does not know how to do this. Not even a module will work, as this also needs a hook.

finik's advice will get you a kernel that has already had this done.

I suggest you bite the bullet :)

Andy M

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
deal051298Author Commented:
Ok. I've solved the problem - I used mkbootdisk to create a bootdisk. Booting with the disk gave me dos fs support so the rest was easy.

Finik I couldn't load the kernel you gave me because loadlin didn't recognise it as an image(?). I used ext2fs to copy the existing vmlinuz from my boot partition and got the same result. So I ended up using the slakware vmlinuz to boot the system and then made the boot disk that would support dos.

Anvil - make menuconfig get's me nowhere (make doesn't recognise target)
and man menuconfig gives me no entry.

Anyway - I appreciate all the help so I've given Anvil the points for this question and posted another 75 points for finik ("Points for finik").

Cheers people!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.