Mounting DOS partitions

Posted on 1999-11-25
Medium Priority
Last Modified: 2013-12-15
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
Question by:deal051298

Expert Comment

ID: 2235144
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.

Author Comment

ID: 2235181
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

Expert Comment

ID: 2235577
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.
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.


Expert Comment

ID: 2236103
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.

Expert Comment

ID: 2236308
As soon as kernel supports the filesystems
ebery other autofs helpers would work, but till then....nothing to do.

Expert Comment

ID: 2236838
NT / W95 usually uses FAT32 ..


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


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


Expert Comment

ID: 2236910
Vfat is an extension to msdos. If kernel
doesn't support msdos, there is NOOO way
it includes the support for vfat.

Author Comment

ID: 2236946
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.

Expert Comment

ID: 2236962
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.

Accepted Solution

Anvil earned 140 total points
ID: 2237026
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

Author Comment

ID: 2237258
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!


Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question