LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   accessing windows files on the same partition as the linux (https://www.linuxquestions.org/questions/linux-newbie-8/accessing-windows-files-on-the-same-partition-as-the-linux-947022/)

libbybai 05-26-2012 04:01 PM

accessing windows files on the same partition as the linux
 
Hi everyone,

Back to Linux after 6 years. Don't remember a thing. Before formatting the whole computer, decided to intall the double-boot ubuntu version.

Before the installation I had 3 partitions: c - a system and programs partition, d - a system partition and e - all my files and work partition (and the only place on my comupter with enough space).

During the installation partition E was selected automatically for Linux. After the installation I can see in the media directory what originally was partitions C: and D: but no access to E (again - all my files and the outlook.pst file which I tried importing into Evolution).

So I tried mounting the drive:

Code:

mount /dev/sda2 /media/point
and received:
Code:

mount: only root can do that
then I tried:
Code:

sudo mount /dev/sda2 /media/point
and received this:
Code:

mount is denied because the NTFS volume in already exclusively opened. The volume may be already mounted, or another software may use it which could be identified for example by the help of the 'fuser' command.
Since I copy-pasted the code (with the necessary modifications), I have no idea what that means.

So how can I access these files?

Thanks a bunch,

Libby

jschiwal 05-26-2012 04:13 PM

From your description, it sounds like you replaced the 3rd partition when you installed Linux.

Run "sudo fdisk -l /dev/sda" to list the partitions. The partition on /dev/sda2 is the second partition.

You can examine an individual filesystem with the "file" command: "sudu -s /dev/sda2"
The message you posted did indicate that it was an NTFS partition.

It also sounds like /dev/sda2 is already mounted. Look at "mount | grep sda2". It should say something like "/dev/sda2 on ...". After the "on" is the directory where it is mounted. If fuse is used, you may have read and write access, depending on the mount options.

Also look in the /etc/fstab file. The line that starts with /dev/sda2 allows automounting at boot. It may have an entry like "/dev/disk/by-id/ata-WDC_WD3200BEKT-00F3T0_WD-WXC0A8966517-part2" however. If you run
"ls -l /dev/disk/by-id/* | grep sda2" you can see the links that point to /dev/sda2 which is the second partition on the first hard drive.

Ser Olmy 05-26-2012 04:15 PM

It sounds like you're looking for the third partition (formerly "E:"), but you try to mount the second partition (/dev/sda2). That partition is already mounted; as you say, you can see it in the /media directory.

If you installed Linux to the partition that was "E:" in Windows (probably /dev/sda3 or /dev/sda5, depending on the partition layout), that partition is now the root file system in Linux ("/").

Since Linux can't be installed to a Windows-formatted NTFS partition, the installer would have informed you that the partition would have to be formatted.

libbybai 05-26-2012 04:26 PM

Hi again,

So first, NO, I was not prompted that the whole volume would be deleted. Also, the whole procedure took a couple of seconds, and it's supposed to be a 250GB partition. Could it be THAT fast?

Second, I chose sda2 because according to its size - that should be E:. The two others are sda1 (c) and sda3 (which looks like d).

Third: I'm a terrible newbie. So I wrote in the terminal "sudu -s /dev/sda2" and received "permission denied". Didn't know what to do with the other commands.

What should I do next?

L.

libbybai 05-26-2012 04:33 PM

GREAT NEWS - nothing deleted!
 
Pheeewww, just rebooted and checked it in windows. Everything on the original E: in intact, and ubuntu was installed into a new folder on E.

Ser Olmy 05-26-2012 04:36 PM

That's pretty cool, I didn't know the Ubuntu installer could do that. How does that new folder look from within Windows? Can you see the Linux system files or just an image file?

While you're there, take a look in Disk Management (Computer Management > Storage > Disk Management on Vista/7) and see which partition number E: really is.

libbybai 05-26-2012 04:44 PM

I think that an image file? 3 folders: disks (that contains grub), install (with a file that has a very long name) and winboot with 5 files. That's it.

yancek 05-26-2012 06:52 PM

Sounds like you did a wubi install which just installs Ubuntu as a program inside a windows partition. So you are able to boot Ubuntu? Are you using the Grub bootloader now for Ubuntu and windows? If so, if you delete the Ubuntu "program" you will be unable to boot windows. If you decide to remove Ubuntu at some point, you will need to do a little research on repairing the mbr for windows.

libbybai 05-27-2012 02:28 AM

It is a Wubi installation and it has an uninstall function in the Ubuntu folder through windows so I'm not worried about that.

But the problem is - if Ubuntu sits in E:/Ubuntu, how can I access E:/docs if Ubuntu refuses to mount the E: partition?

Can anyone help me with that?

Thanks!

jschiwal 05-27-2012 02:39 AM

Have you run the suggested commands. You can mount the partition as you could any other. I suspect it already is.

libbybai 05-27-2012 02:45 AM

I tried:

I wrote "sudu -s /dev/sda2" and received "permission denied".

And I didn't know how to write the other commands. Sorry for being such a nag, but can you write me down exactly what I have to write in the terminal so I can copy-paste it? :-/

libbybai 05-27-2012 02:55 AM

This is what came up when I wrote sudo fdisk -l /dev/sda
Code:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc042474d

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2048  100665343    50331648    7  HPFS/NTFS/exFAT
/dev/sda2      100665344  620924927  260129792    7  HPFS/NTFS/exFAT
/dev/sda3      620928315  625121279    2096482+  c  W95 FAT32 (LBA)

If I understand correctly, sda2 is the large partition (around 250GB)

libbybai 05-27-2012 02:57 AM

And I thought it was gibberish but maybe I got it all wrong. When I wrote mount | grep sda2 this is what I got:
[qoute]/dev/sda2 on /host type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
[/QUOTE]

---------- Post added 05-27-12 at 08:57 AM ----------

And I thought it was gibberish but maybe I got it all wrong. When I wrote mount | grep sda2 this is what I got:
[qoute]/dev/sda2 on /host type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
[/QUOTE]

jschiwal 05-27-2012 03:49 AM

The filesystem is mounted on /host.

libbybai 05-27-2012 04:15 AM

OMG, you're right!

THANK YOU!


All times are GMT -5. The time now is 04:45 AM.