Linux Just installed Linux - having trouble with HD formats...

Discussion in 'Software' started by Da_BaCoN, 27 May 2006.

  1. Da_BaCoN

    Da_BaCoN Minimodder

    Joined:
    25 Aug 2002
    Posts:
    1,200
    Likes Received:
    2
    As the title says, I just installed Linux (Ubuntu). Just before the install (when I had Windows installed) I backed up a lot of my files onto a secondary HD. However, now in Linux I cannot access it. As far as I can tell (I'm more or less completely new to Linux) it's due to the Windows NTFS filesystem.

    Am I right in assuming this is the problem? If so, what can I do?

    Thanks for the help, guys!
     
  2. gimplish

    gimplish What's a Dremel?

    Joined:
    8 Mar 2006
    Posts:
    32
    Likes Received:
    0
    NTFS is supported by default for read only---> but youd have to edit your /etc/fstab for it to appear.
     
  3. ajack

    ajack rox

    Joined:
    17 Apr 2003
    Posts:
    2,695
    Likes Received:
    2
    Yeah you can read from NTFS (and write, but it's pretty experimental atm). As gimplish said, just mount your secondard HDD as you would a normal one, but use the -t ntfs flag, e.g.

    mount -t ntfs /dev/hdx /mnt/secondary

    [replacing /dev/hdx with the other HDD]

    Should do it :).
     
  4. Uncle Psychosis

    Uncle Psychosis Classically Trained

    Joined:
    27 Jul 2003
    Posts:
    1,694
    Likes Received:
    9
    You also have to make sure NTFS support is compiled in the kernel, but I would imagine that Ubuntu does that automatically.

    Mounting drives and stuff in linux is easy, but it's not particularly obvious how to do it! Here's a little guide:

    #mount -t ntfs /dev/hda1 /mnt/windows

    What this command does is this: it tells linux to take the hard drive whose designation is /dev/hda1, and to mount it (using ntfs filesystem) at /mnt/windows. (Note that the /mnt/windows directory has to be there for this command to work! The name you give it is arbitrary too, so just pick something that makes sense to you---I use /mnt/shared myself). Now, if you want to access the files on the disk, you just navigate to /mnt/windows/ and all your files will be there. The /dev/hdaX structure is easy to work out, too. The hda tells you that it's the disk on the primary channel, and the number tells you what partition it is on that disk. So /dev/hdb2 means the 2nd partition on the secondary channel. SATA disks are normally /dev/sda1, etc

    If you want to do automatic mounting, and allow normal users to access the drive, then you'll need to look into formatting /etc/fstab as mentioned above.

    Linux and NTFS don't go together very well, however. You can read off NTFS disks but I really, really wouldnt try and write to them. If you want to have a "shared" partition between windows and linux it's best to use FAT32.

    Cheers

    Sam
     
  5. Elv13

    Elv13 What's a Dremel?

    Joined:
    26 Apr 2006
    Posts:
    107
    Likes Received:
    0
    use following commande to learn how to add your hdd to yeur fstab
    man fstab
    man mount
     
  6. Da_BaCoN

    Da_BaCoN Minimodder

    Joined:
    25 Aug 2002
    Posts:
    1,200
    Likes Received:
    2
    Hey, guys. Thanks for all the info. Unfortunately I still have not solved this problem. I'm thinking that maybe it has something do with Ubuntu having root disabled by default? Anyways, I need to be able to write to this disk anyways, so here's my idea:

    Since I'm still new to Linux and this HD contains lots of data I don't want to risk losing, I'm going to stick it into my brother's PC and under Windows, create a 2nd partition, copy my data from the NTFS partition to the new partition. This should result in two partitions (unless there is a way to merge two back together?)

    But will the FAT filesystem be 100% "ok"? I'd like this HD to be usable/functional completely under both Linux AND Windows.

    Thanks again, guys! I really appreciate the help.
     
  7. Uncle Psychosis

    Uncle Psychosis Classically Trained

    Joined:
    27 Jul 2003
    Posts:
    1,694
    Likes Received:
    9
    Yes, FAT is supported under linux. The same comments as above still apply though. You'll need to edit your fstab to allow mounting by normal users. And instead of "mount -t ntfs" you'll use "mount -t vfat". And make sure FAT support is enabled in the kernel!

    Also, I'm not an Ubuntu user, but I think to do things as root in Ubuntu you just type sudo before the command.

    i.e

    sudo mount -t vfat /dev/hdb1 /mnt/shared

    Sam

    Sam
     
  8. woodshop

    woodshop UnSeenly

    Joined:
    14 Oct 2003
    Posts:
    1,408
    Likes Received:
    8
    Yes you'd be fine with Fat.
    Just to clear things up though even if you got NTFS write working all thats supported is overwriting existing files directorys, new files, renaming etc... is not supported (at last check)

    to give you more specific commands post of the results of the following command if you have IDE harddrives.

    dmesg | grep "^hd"

    if your on SCSI or SATA it would be:

    dmesg | grep "^sd"

    My output:
    Code:
    [woodshop2300@Daffy tmp]$ dmesg | grep "^hd"
    hda: FUJITSU MHN2200AT, ATA DISK drive
    hdc: LG DVD-ROM DRN-8080B, ATAPI CD/DVD-ROM drive
    hda: max request size: 128KiB
    hda: 39070080 sectors (20003 MB) w/2048KiB Cache, CHS=38760/16/63, UDMA(100)
    hda: cache flushes supported
    hdc: ATAPI 24X DVD-ROM drive, 512kB Cache, UDMA(33)
    
    Code:
    woodshop2300@Gentoo-SYS2 ~ $ dmesg | grep "^sd"
    sd 1:0:0:0: Attached scsi disk sda
    
    The reasion why it's different is that SATA and SCSI disks are labeled as sd* well IDE drives are hd*
     
    Last edited: 28 May 2006
  9. simon w

    simon w What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,302
    Likes Received:
    0
    I'm the in the process of setting up a dual boot system. FAT wasn't an option for me because I have files > 4Gb that need to be shared between the two OSes. I'm using Ext2 IFS for Windows to access my Ext3 /home partition from Windows (no journaling thou). Works fine for me :)
     
  10. Confused Fishcake

    Confused Fishcake Minimodder

    Joined:
    25 Sep 2005
    Posts:
    698
    Likes Received:
    1
    Blimey, you don't need all that with Ubuntu, just go to system preferences (Or similar, top bar of KDE) then go disks, and add a mount point for it. The gui does it all for you. Admittedly this is only read, but you can then copy it to a Fat32 partition in linux.
     
Tags:

Share This Page