# NTFS to freebsd hard disk



## skmpz (Oct 29, 2009)

hello..
i have 2 disks which are automatically mounted on every boot but i can only read (cannot write to them) and they are ntfs.. i want to format those disks and change their type to freebsd.. how can i do that?

thx in advance..


----------



## SirDice (Oct 29, 2009)

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-adding.html


----------



## skmpz (Oct 29, 2009)

i did the sysinstall steps but nothing changed in disks..

they are already mounted as ntfs.. is there any other guide ?


----------



## SirDice (Oct 29, 2009)

Unmount the disks first. Then remove the existing slices and create new ones.


----------



## skmpz (Oct 29, 2009)

i tried to unmount the disks but i can't.. it says device busy.. i also tried umount -f option but didnt work either :S


----------



## DutchDaemon (Oct 29, 2009)

They're probably in /etc/fstab. Comment the lines.


----------



## skmpz (Oct 29, 2009)

```
dhcppc0# cat /etc/fstab
/dev/ad0s1b		none		swap	sw		0	0
/dev/ad0s1a		/		ufs	rw		1	1
/dev/ad0s1e		/tmp		ufs	rw		2	2
/dev/ad0s1f		/usr		ufs	rw		2	2
/dev/ad0s1d		/var		ufs	rw		2	2
/dev/acd0		/cdrom		cd9660	ro,noauto	0	0
/proc			procfs		rw 			0	0
```


----------



## DutchDaemon (Oct 29, 2009)

What does `# mount` say?


----------



## skmpz (Oct 29, 2009)

```
[root@dhcppc0 /usr/home/skmpz]# mount     
/dev/ad0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad0s1e on /tmp (ufs, local, soft-updates)
/dev/ad0s1f on /usr (ufs, local, soft-updates)
/dev/ad0s1d on /var (ufs, local, soft-updates)
procfs on /proc (procfs, local)
[B]/dev/ad3s1 on /media/disk (ntfs, local, nosuid)
/dev/ntfs/files on /media/files_ (ntfs, local, nosuid)[/B]
```

the 2 highlighted are the disks i want to format.. make freebsd instead of ntfs , mount and make them accessible by user skmpz..


----------



## DutchDaemon (Oct 29, 2009)

Well, I guess you'll have to find out how they are mounted at boot-time (manual command in /etc/rc.local or /etc/rc.conf.local or something similar?) and disable that mount.


----------



## skmpz (Oct 29, 2009)

i have gnome_enable="YES" so hal is enables...
should i do 

```
% gconftool-2 -s --type bool /desktop/gnome/volume_manager/automount_drives false
% gconftool-2 -s --type bool /desktop/gnome/volume_manager/automount_media false
```

???


----------



## SirDice (Oct 29, 2009)

Looks like either Gnome or KDE automounted them. Just right-click on the disk icon and select unmount.


----------



## skmpz (Oct 29, 2009)

SirDice said:
			
		

> Looks like either Gnome or KDE automounted them. Just right-click on the disk icon and select unmount.



this doesnt work.. it says device busy..


----------



## DutchDaemon (Oct 29, 2009)

I don't use GNOME, but it looks like it could work (I guess disabling 'automount_drives' would be enough), unless you can instruct GNOME to release the mounts.


----------



## Beastie (Oct 29, 2009)

And close all running applications as anyone of them may still have an open file handler on that drive. Then try unmounting again.

If it continues to fail, just log out of GNOME/KDE and umount(8) the drive manually.


----------



## zeiz (Oct 29, 2009)

Sometimes I cannot unmount a drive if after doing something there I'm still in its directory. Then I run:


> cd /


and then I can unmount.


----------



## Beastie (Oct 30, 2009)

zeiz said:
			
		

> Sometimes I cannot unmount a drive if after doing something there I'm still in its directory.


Sometimes? Unmounting should *never* work if the partition/mount point is still open/in use.


----------



## dennylin93 (Oct 30, 2009)

It's possible to force it to unmoumt `# umount -f /mnt/`, but sometimes it might result in data loss.


----------



## killwin (Nov 3, 2009)

Hello,

When you will umount your disks, you can create slices in terminal like this :

newfs -U /dev/ad3s1a
newfs -U /dev/ad3s1d
newfs -U /dev/ad3s1e
newfs -U /dev/ad3s1f

and mount this in your /etc/fstab


----------



## killwin (Nov 3, 2009)

sorry like this (when you want to create a bootable freebsd ) :

fdisk -I ad3               # to informations about the disk
bsdlabel -R ad3s1          # create slices
bsdlabel -B ad3s1          # ad3s1 then can boot

newfs -U /dev/ad3s1a
newfs -U /dev/ad3s1d
newfs -U /dev/ad3s1e
newfs -U /dev/ad3s1f


----------

