• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 299
  • Last Modified:

ntfs disk problem

I have Linux RadHat 6.2.
Some months after I installed Linux I added a second disk with ntfs.
Everything is working with a dual boot with Lilo if I go on the same disk, but not on the second disk.
The problem is I can't see the second disk I have installed.
Can I access the disk ntfs from Linux, say for
  1) copying files
  2) starting windows system from lilo?

Any cue

1 Solution
yes, you sure could.  
1. create a mount point on the ext2 partition
2. "mount /dev/secondHD /mountpoint"
"mount -t ntfs /def/secondHD /mountpoint"
You might have to recompile the kernel with ntfs  support
Woha Garboua thats a bold statement you make !

You're using RH6.2, i don't knwo about the kernel version, but the latest kernel version 2.4.5 says that READ support is EXPERIMENTAL and write support is DANGEROUS.

I've seen cases where reading a large file corupted the NTFS beyong repair, writing i haven't even tried because if linus says its dangerous you got 99% chance that your fs is corrupted if u write to it.

Thus, reading : only in emergency cases
Wrinting : No way unless you want to lose data.

Be careful with this Itis !

LOL, well I live on the Edge.  
actually READ is fully supported since 2.4.3, you can check.  NoW WRITE is a horse of a different color. :-)

my apology for not bringing this up, WRITE-> NTFS.
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.

can you see the partitions using fdisk, like:

    fdisk /dev/hdb
Linux Kernal does not by default support the ntfs filesystem. Thus if you want to read ntfs filesystem devices then you will have to recompile the kernal to enable this support. Please refer to the Howtos for this. When you recompile the kernal you will select the types of filesystems that you want to be supported for mounting.. and this is the place where you select ntfs.

Now for your second question. Yes you can boot windows from lilo. It is not too hard to do this. Now from what you have stated, I am assuming that the second disk that contains the ntfs filesystem is the one that contains the windows OS. Based on this assumption lets continue.

Now bootup your linux system and login as root. Once logged in, we have to first find out the partition where your windows boot image is located. Since you have added another disk, this will be obviously on that disk. Now on linux everything is a file. At this moment I think it is imperative that I recite the way Linux sees the IDE devices. The master device connected to the primary ide is referenced by /dev/hda. The slave connected to the primary ide is referenced by /dev/hdb. The master device connected to the secondary ide is referenced by /dev/hdc and the slave device connected to the secondary ide is referenced by /dev/hdd. Now based on which IDE location you added the second disk (ntfs) you will get the appropriate device allocation. For arguments sake lets assume you added it as a slave on the primary IDE. So it is allocated to /dev/hdb. Now you have to see the partition structure on this system.. that if there is any partition structure on it. Now since it is connected to the system, we can use fdisk to check the partition structure of hdb. Issue the following command at the prompt.
fdisk -l /dev/hdb
This will list the partition information about the second device together with the filetypes on each partition.
On my system (have only one disk) I see

Disk /dev/hda: 240 heads, 63 sectors, 557 cylinders
Units = cylinders of 15120 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1         3     22648+  83  Linux
/dev/hda2             4       557   4188240    5  Extended
/dev/hda5             4        12     68008+  82  Linux swap
/dev/hda6            13       557   4120168+  83  Linux

Now your windows boot image will be contained in the partiton that has the filetype ntfs on hdb. Hopefully you do not have any partitions on the second disk which will make life really easy. But now if you have partitions of type ntfs on the second disk then life might not be too sweet since then you will have to scratch your head and try and remember which partition you had installed the windows OS image on. A good way to find out in this case is to boot off this second disk (just have the second disk in the system and boot off it) ... once started...check to see which partition contains the boot image for windows. Once found.. you can easily transfer this information into linux form since if you found that partition 1 on hdb contains the windows image.. the device name in linux (having both disks attached to the system with the ntfs device as hdb) that would correspond to this is hdb1. Now once you have found the location where your windows image is located, we will now edit the /etc/lilo.conf file. This file is very important and thus I suggest you back it up before any updates are done to it. Normally I just copy the file to another name for instance
cp -v /etc/lilo.conf /etc/lilo.conf.orig

Now open up /etc/lilo.conf for editing (use your fav text editor.. mine is EMACS)
You will have something like below.



Now to enable lilo to bootup windows, you have to add the following lines in /etc/lilo.conf

other=<location to the windows image>

What this does is to point lilo to the other boot image... that of windows. Label is what is used to reference to either linux or windows. Now if you want to have windows be your default boot image then in the begining of /etc/lilo.conf where you have default={something here} put
default=windows  else put it to default=linux

Now that you have made these changes, it is now time to update the master boot record of the disk. To do this execute /sbin/lilo. You will see something like

Added linux
Added windows

This means that the mbr has been successfully changed. Now reboot the system. When it starts, if you bootup in X, you will see a graphical menu with the choice between linux and windows. Choose whichever one you want with the arrow.. the default being what you put as default= . If you bootup in command prompt mode.. you will see a prompt
to see which choices you have press tab.. you will see
linux windows... type the one that you want to boot... and that will comeup.

Have fun and hope this helps.

What would you like to do with this open question? Please let me know.

community support moderator
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area to:
Accept Nivlesh's answer
Please leave any comments here within the next seven days.
EE Cleanup Volunteer
per recommendation

Community Support Moderator @Experts Exchange
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

Featured Post

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now