Create MS/XP file system so it will be recognized on a XP system.
Create MS/Windows file system on a Hard Drive so it will be recognized on an MS/Windows system.
The goal here is to initialize a hard drive that was previous initialized with a non-Microsoft Windows file system, with a single active partition populated with Microsoft Windows 32 bit FAT (LBA) file system. So this hard drive will be recognized as containing a valid MS/Windows file system when used on a Microsoft Windows system.
I have an old IDE 3.5” hard drive with FBSD Release 7.0 on it. I want to use it as external USB attached disk on XP. I bought a 'CD-r king' hard drive to USB adapter cable. It will work with 2.5” & 3.5” IDE drives and SATA drives. When I plug the USB end of the cable into a FBSD system I can mount the 3.5” IDE 7.0 HD's da0s1a, da0s1d, da0s1e and da0s1f file systems with no problem. But when I plug the same drive into a XP system the USB drive shows in “control panel/system/hardware/devices/hard drives” as there but “windows explorer” does not assign a drive letter for it so I can not reformat it.
All PC’s running a MS/Windows system inspect sector 0 of the hard drive for the partition/slice table to determine the sysid of each partition/slice. If the sysid value is 12 then it’s a valid Microsoft Windows file system and gets assigned a drive letter in “windows explorer”. Any other sysid value means non-Microsoft Windows file system and the device is seen in “control panel/system/hardware/devices/hard drives” as there but “windows explorer” does not assign a drive letter to it.
There are 2 ways to initialize ((2.5” or 3.5”) (IDE or SATA)) hard drives with a valid MS/Windows file system. Using the Microsoft “fdisk” program or the FreeBSD “fdisk” program. The Microsoft “fdisk” program defaults to sysid =12. The FreeBSD “fdisk” program defaults to sysid = 165, but has alternate way to assign any sysid value you want.
Microsoft method. Replace the 2.5” hard drive in your laptop with the 2.5” hard drive containing the FreeBSD system. If 3.5” hard drive then open your desktop PC, remove the data cable ribbon and power connection from the existing hard drive and attach them to the 3.5” hard drive containing the FreeBSD system. Put the Microsoft XP, Vista, or Windows7 install CD in the cdrom drive and boot. Select fdisk option from the install menu to populate the hard drive with official ntfs file system. No need to continue with the install after fdisk complete.
FreeBSD method. You need a PC with a running FreeBSD system and USB hardware to attach the 2.5” or 3.5” IDE or SATA hard drives with. A USB external hard drive housing will work fine for 3.5” IDE and SATA drives. For 2.5” IDE or SATA drives you will need a USB adapter cable. The 'CD-r king' hard drive to USB cable I purchased works with 2.5” & 3.5” IDE drives and SATA drives, cost $10 USA. If you have a 3.5” IDE or SATA hard drive and FreeBSD is running on a desktop PC, you could open it up and add it as a second hard drive on the data ribbon.
Attach the hard drive to the USB equipment and plug into USB port on the PC running FreeBSD. Best if you are logged in as “root”. You will see the USB console messages as the USB hard drive is connected. In most cases the USB drive will be assigned da0 as the device name. The following instructions are for initializing the hard drive as a single MS/Windows partition occupying the whole hard drive.
Wipe clean the sector 0 slice table
# dd if=/dev/zero of=/dev/da0 count=2
#fdisk -BI /dev/da0#newfs_msdos -F32 /dev/da0s1
If at this point you un-plugged the USB cable from the FreeBSD system and plugged it into a Microsoft Windows PC. The USB drive would be un-accessible by “windows explorer” because no drive letter gets assigned. That’s because Window’s see this hard drive as a non-windows drive. Which is really true because the slice sysid contains the 165 value.
To make the hard drive accessible to a Microsoft Windows PC, the sysid has to be set to a value of 12. This time use the fdisk flag lower case “i” which clears all existing slice entries and puts you in interactive slice table update mode.
# fdisk -Bi /dev/da0
Changing partition1 which you answer “y”.
When prompt ( Supply a decimal value for "sysid (165=FreeBSD)"  ) enter the value of 12.
Then at prompt (Are we happy with this entry? [n] ) enter value of y for yes.
And at the end you get prompt (Should we write new partition table? [n] ) enter value y for yes.
# newfs_msdos -F32 /dev/da0s1
Will format the slice 1 partition for MSDOS file system. Elapse running time is dependant on hard disk size.
If at this point you un-plugged the USB cable from the FreeBSD system and plugged it into a Microsoft Windows PC. The USB drive would be accessible by “windows explorer” because a drive letter gets auto-assigned. That’s because Window’s now sees this hard drive as a windows drive. Which is really true because the slice sysid contains the 12 value.
FreeBSD Install Guide www.a1poweruser.com
Last edited by FBSD; 1st May 2010 at 07:56 AM.
|Thread||Thread Starter||Forum||Replies||Last Post|
|Live OS with file system encryption?||eurovive||Other BSD and UNIX/UNIX-like||0||18th February 2010 06:56 PM|
|File system not properly dismounted||rex||FreeBSD General||6||12th September 2008 03:45 PM|
|File system at more than 100%||michaelrmgreen||FreeBSD General||4||28th July 2008 02:52 PM|
|Which file system use to share data on Bsd system?||aleunix||Other BSD and UNIX/UNIX-like||2||1st June 2008 05:14 PM|
|What is good support to the file system ext3?||aleunix||Solaris||3||29th May 2008 04:50 PM|