Link to home
Start Free TrialLog in
Avatar of deal051298
deal051298

asked on

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
Avatar of finik
finik

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.
Avatar of deal051298

ASKER

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:
/boot/vmlinuz-2.2.12-20
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:
image=/boot/vmlinuz-2.2.12-20
        label=linux
        initrd=/boot/initrd-2.2.12-20.img
        read-only
        root=/dev/hda4
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:
http://www.finik.net/fordeal/vmlinuz-2.2.12-20
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:
http://jnewbigin-pc.it.swin.edu.au:80/Linux/Explore2fs.htm
in order to copy vmlinuz.. and bootsect.lnx from
your ext2fs partition.
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 ..

try

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

or

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.
mount -t vfat /dev/fd0 /mnt/floppy

returns:

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.

Cheers

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.
ASKER CERTIFIED SOLUTION
Avatar of Anvil
Anvil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!

Dave