Thursday, October 28, 2010

How to Make and Use External USB Hard Disk on Windows and Linux Fedora

 

How to Make and Use External USB Hard Disk on Windows and Linux Fedora

To make external USB disk or external hard disk portable between Linux and Windows operating system, we need to partition and then formatting the external USB hard disk using vfat filesystem. The step by step command example below show the procedure and command to format the external USB hard disk using vfat filesystem with mkfs command to make USB hard disk can be use on Linux and Windows system.



Step:
1. Log in as root user on your Linux Fedora system or use the su command to execute the command example below.
2. Install and locate the external USB hard disk and the partition that need to format.
3. Make sure no data inside the partition that need to be partitioning and formatted. This partitioning formatting procedure will remove all the data inside that partition.
4. Partitioning the external USB hard disk....



Usually default partition type create under linux system is 83 Linux
[root@fedora ~]# fdisk -l /dev/sdb



Disk /dev/sdb: 40.0 GB, 40007761920 bytes
64 heads, 32 sectors/track, 38154 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00b4c6f2



Device Boot Start End Blocks Id System
/dev/sdb1 1 38154 39069680 83 Linux
[root@fedora ~]#



5. In order to use the USB hard disk on Windows and Linux you need to change the partition system and ID to Windows partition type ID c System W95 FAT32 (LBA). Follow the link on the step by step article on how to change Linux partition filesystem type from Linux partition ID 83 System Linux to Windows partition type ID c System W95 FAT32 (LBA)



Format external USB hard disk using vfat filesystem.

After change the Linux filesystem type ID, then format the hard disk partition using vfat filesystem in order to make the USB hard disk portable between Linux Fedora and Windows system. The example below show step by step using mkfs command to format the USB hard disk to use on Windows and Linux Fedora operating system.



6. Formatting the external USB hard disk to vfat filesystem. Please note that 4 mkfs command example below show different way using mkfs command to formatting the USB hard disk for vfat file system.



[root@fedora ~]# mkfs -t vfat -v /dev/sdb1
mkfs.vfat 2.11 (12 Mar 2005)
Auto-selecting FAT32 for large filesystem
/dev/sdb1 has 64 heads and 32 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 78139360 sectors;
file system has 2 32-bit FATs and 32 sectors per cluster.
FAT size is 19068 sectors, and provides 2440662 clusters.
Volume ID is 491c040e, no volume label.



or... The mkfs command to format and label the USB hard disk drive partition. The example below show that the USB disk is label as usbdisk, or you can label the disk latter using the e2label command.
[root@fedora ~]# mkfs -t vfat -n usbdisk -v /dev/sdb1
mkfs.vfat 2.11 (12 Mar 2005)
Auto-selecting FAT32 for large filesystem
/dev/sdb1 has 64 heads and 32 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 78139360 sectors;
file system has 2 32-bit FATs and 32 sectors per cluster.
FAT size is 19068 sectors, and provides 2440662 clusters.
Volume ID is 4959f684, volume label usbdisk .



or... Use the mkfs.vfat command as show on the example below to format the USB hard disk to vfat filesystem.



[root@fedora ~]# mkfs.vfat -v /dev/sdb1
mkfs.vfat 2.11 (12 Mar 2005)
Auto-selecting FAT32 for large filesystem
/dev/sdb1 has 64 heads and 32 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 78139360 sectors;
file system has 2 32-bit FATs and 32 sectors per cluster.
FAT size is 19068 sectors, and provides 2440662 clusters.
Volume ID is 491c04cd, no volume label.



or... The mkfs.vfat command to format and label the USB hard disk drive partition. The example below show that the USB disk is label as usbdisk, or you can label the disk latter using the e2label command.



[root@fedora ~]# mkfs.vfat -n usbdisk -v /dev/sdb1
mkfs.vfat 2.11 (12 Mar 2005)
Auto-selecting FAT32 for large filesystem
/dev/sdb1 has 64 heads and 32 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 78139360 sectors;
file system has 2 32-bit FATs and 32 sectors per cluster.
FAT size is 19068 sectors, and provides 2440662 clusters.
Volume ID is 4959f80b, volume label usbdisk .



7. Verify the change made to the external USB hard disk drive.
[root@fedora ~]# fdisk -l /dev/sdb



Disk /dev/sdb: 40.0 GB, 40007761920 bytes
64 heads, 32 sectors/track, 38154 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00b4c6f2



Device Boot Start End Blocks Id System
/dev/sdb1 1 38154 39069680 c W95 FAT32 (LBA)
Now you can test mount the USB hard disk on Windows system and on Linux fedora system.

No comments:

Post a Comment