Solved

how to read and write to an ufs partition (unix file system,like freebsd) while you are using windows vista ?

Posted on 2007-11-24
58
1,677 Views
Last Modified: 2013-11-30
how to read and write to an ufs partition (unix file system,like freebsd) while you are using windows vista ?
0
Comment
Question by:marietto2008
  • 26
  • 21
  • 8
  • +1
58 Comments
 
LVL 87

Expert Comment

by:rindi
ID: 20342960
Install vmware server and install freebsd as a VM inside that. With that you should be able to access non m$ formatted filesystems like ufs. Windows has no support for other than m$ filesystems.

http://vmware.com
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20342994
vmware workstation is ok ? can you explain me how can i access ufs filesystem from the freebsd virtual machine ? can i write data from windows partition to bsd partition ?
0
 
LVL 87

Expert Comment

by:rindi
ID: 20343044
The virtual filesystem freebsd creates within vmware will be ufs, unless you define something else. You can share your other partitions so freebsd can access through the virtual LAN. You can also attach more disks which are connected to the PC to be used via freebsd, so you can mount external partitions as well.

I recommend vmware server because that is free, workstation isn't.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20343136
i have already installed freebsd on the second partition of my disc. so i can use this phisycal installation of freebsd inside the vmware or i should build a virtual freebsd image ?
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 20343178
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20343219
oh thanks,but these tools haven't write access. i need to copy data from windows partition to freebsd partition because inside it there is a lot of disk space to save data,while my windows partition is full.
using the vmware solution i'll have write access to ufs file system ?
can u explain me more what to do ? should i create a new virtual machine with freebsd inside ? and then ? thanks.
0
 
LVL 87

Expert Comment

by:rindi
ID: 20343262
You'll have write access through vmware. You could install Samba to your freebsd virtual machine, share the ufs drive with it, and then just save your data from windoze to the samba server's shared drive.
0
 
LVL 87

Expert Comment

by:rindi
ID: 20343273
You'll have to read the docs of vmware. I think it is possible to use an installed version of an OS, but have never done that and am not sure how you do that. It is probably better to install a clean version within vmware.
0
 
LVL 61

Expert Comment

by:gheist
ID: 20343286
VMWare Server is free unlike Workstation.
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 20343306
You could mount the windows partition in FreeBSD and copy the data. All you would have to remember is to delete the copied data once back in windows...
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20343430
is not a good solution,because i have to boot freebsd everytime i need to copy new data. and if i mount the windows ntfs partition from freebsd,i will have not write access.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20345158
but if i build a new virtual machine with freebsd inside,i suppose i can share data only between this virtual machine and the host o.s partition...am i right ?
0
 
LVL 87

Accepted Solution

by:
rindi earned 500 total points
ID: 20345186
No, you can assign other partitions to the VM (when the VM isn't running, go on "Edit VM Settings", then under "Hard Disk" you can add other partitions which are connected to that PC). Once that Partition is assigned to the VM, you should be able to mount it within your FreeBSD VM like you mount other partitions, just edit your /etc/fstab file to reflect the correct info. You could then share folders within that partition if you install Samba to your FreeBSD setup, or setup an FTP server.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20345323
no,under virtual machine settings/hardware/harddisk/  i can't add other partitions.
under virtual machine settings/options/  i've enabled shared folders option. i've added a new path,like c:\
under my first partition where is installed vista,but i can't add paths from the second partition where is installed freebsd,because this partition isn't recognized by windows vista.



0
 
LVL 87

Expert Comment

by:rindi
ID: 20345351
When you select the hardware type "Disk", select "use a physical disk (for advanced users)", and then you should be able to select the disk itself and the partition. Can't you select other partitions than than what windoze recognizes?
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20346339
under virtual machine settings/hardware/harddisk/  i can see :

disk information :

disk space is not preallocated for this hard disk. hard disk contents are stored in a single file.

there is a not selectable icon called "utilities" and a selectable icon called "advanced"

under advanced i can see :

virtual device node :

IDE 0:0 Hard Disk (IDE 0:0)

mode persistent. (not selectable)
0
 
LVL 87

Expert Comment

by:rindi
ID: 20346430
First shut down the virtual machine. Now you should be able to Add devices if you select "Edit Virtual Machine Settings". But first you need to shut it down.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20346479
I've used my freebsd physical installation as virtual machine,but during the boot procedure i see the following message :

trying to mount root from ufs:/dev/ad4s2a

Manual root filesystem specification:
    <fstype>:<device> Mount <device> using filesystem  <fstype>
                                        eg. ufs: da0s1a
    ?                              List valid disk boot devices
    <empty line>            Abort manual input
mountroot>
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20346509
ok. i've added the physical installation of freebsd. and now ? how can i copy data from host partition to freebsd partition ?
0
 
LVL 87

Expert Comment

by:rindi
ID: 20346520
I've never yet tried a physical installation in vmware, so I'm not current with the type of issues you can get there.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20346570
now i think i can mount the real freebsd parition inside the freebsd VM. but at this point i can share only data beetwen the freebsd virtual machine and the real freebsd partition,am i right ? and i can't use samba because the partitions are in the same pc.
0
 
LVL 87

Expert Comment

by:rindi
ID: 20346716
Why can't you use Samba? The VM will look tor the Host OS like another PC which has shares you can connect to.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20347777
can i use windows as virtual machine,instead freebsd ?
0
 
LVL 87

Expert Comment

by:rindi
ID: 20348662
I'm running XP and Vista from within vmware running on ubuntu linux. I don't know if you also get versions running on FreeBSD.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20348715
mmm i'm running windows vista as main os ! i've asked if i can run windows as virtual machine and if i can write data from vista partition (real ! not vm) to freebsd partition (also real,not vm).
0
 
LVL 87

Expert Comment

by:rindi
ID: 20348752
You can run windows as VM, but I don't know if there is a FreebSD vmware version.

You can't copy data from windows to freebsd partitions, real. You need some kind of virtualization or a network to do that.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20349235
FreeBSD vmware version ? mmm let me explain better.

I have a 70 gb HD where there are 2 partitions. The first is 30 gb large and there is installed Vista,and is running now. On the second partition that's 40 gb large, there is FreeBSD. My idea is to run VMware for Windows Vista with Vista as Virtual Machine. I will add the partitions where Vista and FreeBSD are installed going under Virtual Machine Settings/Hardware/Add Device/Use a Physical Disk/Use Whole Disk. I hope that Vista as Virtual Machine when running will recognize the partitions where is installed the real Vista and the real FreeBSD and that i can copy data from the real Vista to the real FreeBSD.

0
 
LVL 87

Expert Comment

by:rindi
ID: 20349428
Vista won't be able to access the freebsd partition even if you add it within the VM of vista. It'll just see an unidentifiable partition.
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 20349445
Here's another idea... Backup all FreeBSD partitions to DVD or something with dump/tar, reformat the FreeBSD part of the HD so that it  only consists of 10 GIG or so. Format the rest to a FAT partition (which can be read from and written to by both OS'ses).
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 29

Expert Comment

by:TeRReF
ID: 20349450
Oh, after that reinstall a minimal version of FreeBSD and copy the backed up partitions over it...
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20353173
i've installed freebsd as VM and i've added the whole disk as new device. now i want to know how can i mount this disk. if you think that my request is going out of the main theme of this help request please tell me and i will close it assigning points and i will open another request. thanks.
0
 
LVL 87

Expert Comment

by:rindi
ID: 20353957
The whole disk? Isn't it partitioned?
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20354623
now under Virtual Machine Settings/Hardware i have two devices :

Hard Disk (SCSI) using device : \\.\PhysicalDrive0
Access : Using whole disk
Capacity : 70 GB ---> THIS IS MY WHOLE DISK,PARTITIONED AS :

30 GB WITH VISTA
40 GB WITH FREEBSD

Hard Disk (IDE) 8 GB ---> THIS IS THE VIRTUAL MACHINE HARD DISK


0
 
LVL 87

Expert Comment

by:rindi
ID: 20356073
I don't think you should pick the whole disk, but rather, in the selection where you add the disks, select the individual partitions.

After that you should be able to mount those partitions from within freebsd using the following syntax:

mount -t ntfs /dev/PartitionID /mnt/MountPointForThatPartition
mount -t ufs /dev/PartitionID /mnt/MountPointForThatPartition

Replace the PartitionID and MountPointForThatPartition with the proper data for your system.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20357285
in /dev i have the followings PartitionID's :

ad0
ad0s1
ad0s1a
ad0s1b
ad0s1c

da0
da0s1
da0s2
da0s2a
da0s2b
da0s2c
da0s2d
da0s2e
da0s2f

i make :

mount -t ufs /dev/da0s2 /mnt/freebsd

and i see the folders of my real freebsd partition,but inside the folder /usr i see no files. there should be the folder called /home/mario. and the link called /home doesn't exist anymore. but exist the root folder...

i've tried everykind of combination to mount the ntfs partition using the /dev/PartitionID's but without success,maybe because i've not selected the whole disk under Virtual Machine Settings/Hardware...?




0
 
LVL 29

Expert Comment

by:TeRReF
ID: 20357345
You'll have to mount the different partitions seperately i.e.

mount -t ufs /dev/da0s2a /mnt/freebsd/root

So, you'll have to find out which partition is mounted under /usr, try mounting from da0s2d and up...
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20357478
and what to do to mount the ntfs partition of vista ? should i add the whole disk instead of the freebsd partitions ?
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 20357570
I think so, I guess da0s1 is your NTFS partition, so try something like this:

mount -t ntfs /dev/da0s1 /mnt/windows
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20357896
ok :

mount -t ntfs /dev/da0s1 /mnt/vista

mount_ntfs:  /dev/da0s1/ : invalid argument.

mount -t ufs /dev/da0s2a /mnt/freebsd/root

no such file or directory.

cd /dev
i can't see these device anymore...

da0s2a
da0s2b
da0s2c
da0s2d
da0s2e
da0s2f

why ?
0
 
LVL 87

Expert Comment

by:rindi
ID: 20358050
You have to mount as root, and you will also have to create the mount points before mounting (the folders you are mounting the partition to, ie /mnt/freebsd/root).
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20358411
ok fixed. now i can see the /home/mario folder,but there is a problem unfixed :  

mount -t ntfs /dev/da0s1 /mnt/vista

mount_ntfs:  /dev/da0s1/ : invalid argument.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20360338
ok. now i'm able to copy data from the vista partition to the freebsd partition,but not viceversa. why ?
0
 
LVL 61

Expert Comment

by:gheist
ID: 20360432
From freebsd's mount_ntfs manual page:
WRITING
     There is limited writing ability.  Limitations: file must be nonresident
     and must not contain any sparces (uninitialized areas); compressed files
     are also not supported.  The file name must not contain multibyte charac-
     ters.
0
 
LVL 87

Expert Comment

by:rindi
ID: 20360613
You could try captive-ntfs, but as mentioned above writing to ntfs from non m$ OS's is rather adventurous.

http://www.jankratochvil.net/project/captive/


0
 
LVL 61

Expert Comment

by:gheist
ID: 20360760
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20365220
mmm captive is for linux,the second is for windows. what about this :

http://www.ntfs-3g.org/

its inside the ports...
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20365289
i've tried to install it but without success,cuz this error :

installing for fusefs-ntfs-1.710_1
fusefs-ntfs-1.710_1 depends on file : /usr/local/modules/fuse.ko - not found
verifying install for /usr/local/modules/fuse.ko in /usr/ports/sysutils/fusefs-kmod
fusefs-kmod-0.3.9.pl requires the kernel source to be installed. set src_base if it is not in /usr/src
error code 1
stop in /usr/ports/sysutils/fusefs-kmod
error code 1
stop in /usr/ports/sysutils/fusefs-ntfs
error code 1
stop in /usr/ports/sysutils/fusefs-ntfs

0
 
LVL 87

Expert Comment

by:rindi
ID: 20365315
It's the same as the other solutions, it works, but can cause problems. I would still rather network your FreeBSD VM, and then connect to it from windows and copy your files that way. With a networked system the file system doesn't matter for the windows OS. Use either Samba or ftp.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20367112
can't you help me to fix the error,before to try another solution ?
0
 
LVL 87

Expert Comment

by:rindi
ID: 20367322
I'm not very current with freeBSD, more with Linux. But also on Linux I'd use a networking solution, as that is the much better and safer solution.
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 20367351
To fix the error you'll have to install the kernel sources, the easiest way to do this is by running sysinstall as root, choosing Configure, then Distributions, then src, then base and sys.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20385464
i've fixed the error. i've installed ntfs-3g succesfully. problem is that when i can't mount the ntfs partition using this driver (without it,it's possible) because it tells to me that the partition is used by another process. this solution isn't applicable. now i want to try the ftp solution. can you tell me the steps to follows ?

thanks
0
 
LVL 87

Expert Comment

by:rindi
ID: 20387348
You need to install an ftp server on the freebsd VM (check the freebsd documentation, there is probably one that comes with the distro, it should also tell you how to set it up). With ifoconfig you should get the IP of the Virtual Machine, or you could also set it up with a static IP. Then you can connect via a web browser or special ftp client from the Windoze OS to the ftp server and copy your data back and forth.
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20388102
can you suggest to me a good ftp server with a nice gui ? thanks.
0
 
LVL 87

Expert Comment

by:rindi
ID: 20388162
I don't know too much about freebsd and what works with it, but there is probably an ftp server included with it. Most of them don't have GUI's. Normally there is a file in /etc which you need to configure, then start the daemon, and that's it.
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 20388235
Do you have sshd running? If so you can use scp without installing any extra stuff...

man scp
0
 
LVL 2

Author Comment

by:marietto2008
ID: 20390128
everything is ok. the ftp solution works good. its time to close this question,thanks to everybody for the help.
0
 
LVL 87

Expert Comment

by:rindi
ID: 20390561
your welcome
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

758 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

18 Experts available now in Live!

Get 1:1 Help Now