Solved

ntfs disk problem

Posted on 2001-06-20
8
279 Views
Last Modified: 2013-12-16
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

Thanks
0
Comment
Question by:itis
8 Comments
 
LVL 5

Expert Comment

by:garboua
ID: 6212687
yes, you sure could.  
1. create a mount point on the ext2 partition
2. "mount /dev/secondHD /mountpoint"
or
"mount -t ntfs /def/secondHD /mountpoint"
You might have to recompile the kernel with ntfs  support
0
 
LVL 2

Expert Comment

by:XTerm
ID: 6214305
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 !

Regards
0
 
LVL 5

Expert Comment

by:garboua
ID: 6215126
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. :-)

itis,
my apology for not bringing this up, WRITE-> NTFS.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6246110
can you see the partitions using fdisk, like:

    fdisk /dev/hdb
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 8

Accepted Solution

by:
Nivlesh earned 100 total points
ID: 6570715
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.

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
linear
default=linux

image=/boot/vmlinuz-2.2.16-22smp
        label=linux
        read-only
        root=/dev/hda6

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

other=<location to the windows image>
     label=windows

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
lilo:
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.
0
 

Expert Comment

by:amp072397
ID: 6787158
itis:

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

thanks!
amp
community support moderator
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 8433034
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.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
majorwoo
EE Cleanup Volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8617619
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
good comptia a+ teacher? 4 75
snmp error in packet. reason noaccess 30 77
LDAP find expired users 8 45
VMWare 6 crashing 14 56
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

705 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now