Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I started using Linux (Debian distr.) a week or two ago. I have two hard drives, each with a single partition; one has Windows (hda), the other has Linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2007
    Posts
    3

    Mounting Accident


    Hi,

    I started using Linux (Debian distr.) a week or two ago. I have two hard drives, each with a single partition; one has Windows (hda), the other has Linux (hdb).

    I installed Wine, but for Wine to work it needs to access my Windows drive. Plus, I would rather import all my music directly through Linux than go on Windows, put it all on external memory, etc etc.

    So I toyed around with the
    Code:
    mount
    command, but I accidentally did:

    Code:
    mount /dev/hda1 /
    Now my Windows drive is mounted on /, but it doesn't show up there. And if I try to unmount it, it won't let me (even with the -f option), and if I try to mount / to somewhere else it just mounts Linux.

    How can I mount my Windows drive to an accessible directory?

    I tried changing the fstab/mtab files, but that didn't help.

    Thanks for any help .

  2. #2
    Linux Guru Juan Pablo's Avatar
    Join Date
    Mar 2006
    Location
    /home/south_america/ecuador/quito
    Posts
    2,064
    I installed Wine, but for Wine to work it needs to access my Windows drive. Plus, I would rather import all my music directly through Linux than go on Windows, put it all on external memory, etc etc.
    No, you don't need access to your Windows partition to use WINE
    mount /dev/hda1 /
    Don't ever try to mount anything in / , this is where your files and the system are. Mount in a place like /media/win_c or something like that.

    If you want exact commands or fstab lines, post the output of
    df -h
    fdisk -l

    as root
    Put your hand in an oven for a minute and it will be like an hour, sit beside a beautiful woman for an hour and it will be like a minute, that is relativity. --Albert Einstein
    Linux User #425940

    Don't PM me with questions, instead post in the forums

  3. #3
    Just Joined!
    Join Date
    May 2007
    Posts
    3
    Results of df -h:
    Code:
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/hdb1              53G  5.9G   45G  12% /
    tmpfs                 506M     0  506M   0% /lib/init/rw
    udev                   10M   68K   10M   1% /dev
    tmpfs                 506M     0  506M   0% /dev/shm
    Results of fdisk -l:
    Code:
    Disk /dev/hda: 250.0 GB, 250059350016 bytes
    254 heads, 63 sectors/track, 30521 cylinders
    Units = cylinders of 16002 * 512 = 8193024 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           6       30521   244155838+   7  HPFS/NTFS
    
    Disk /dev/hdb: 60.0 GB, 60022480896 bytes
    255 heads, 63 sectors/track, 7297 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hdb1   *           1        6994    56179273+  83  Linux
    /dev/hdb2            6995        7297     2433847+   5  Extended
    /dev/hdb5            6995        7297     2433816   82  Linux swap / Solaris

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    execute this
    Code:
    su
    mkdir /media/win_c
    mount -t ntfs  /dev/hda1  /media/win_c  -o defaults,umask=0
    check /media/win_c folder.

    add this line in at the end of /etc/fstab file to auto-mount Windows partition at boot up
    Code:
    /dev/hda1   /media/win_c   ntfs   defaults,umask=0 0 0
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined!
    Join Date
    May 2007
    Posts
    3
    Ah! Thanks, devils_casper.

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    you are Welcome Xirul.
    you can have write access in NTFS partition too. install ntfs-3g package.
    Code:
    su
    apt-get install ntfs-3g
    replace ntfs with ntfs-3g in /etc/fstab file. execute "mount -a" command OR reboot machine. check if you are able to delete/edit/create files in NTFS partition ( /media/win_c).
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •