Formatting a MS-DOS FAT32 disk partition under Solaris 10/OpenIndiana

Useful links:

Mount a USB key under Sol

Dated but still good "Solaris x86 FAQ", (9.10) How do I mount a DOS partition from the hard drive?

You can run GParted from OpenIndiana's graphical environment via:

Starting GParted from Applications->System Tools->GParted Partition Editor

or clicking on the GParted desktop icon :-).

Here's what GPartEd looks like after a bit of partitioning...

aris

Key to DOS filesystem use on Solaris is remembering that Solaris calls this

Magic filesystem type pcfs .

First determine the partition name:

Here I've used GParted to break the large disk into two parts, first for FAT32 and the

second for a ZFS file system.

So the disk we want to format is: /dev/dsk/c4t0d0p1

(this is actually a disk connected on the USB bus).

We can check on the disk information via iostat -En

root@openindiana:~# iostat -En

[... other drives here...]

c4t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0

Vendor: WDC WD10 Product: WD-WCAW3169 Revision: 01.0 Serial No:

Size: 1000.20GB <1000204886016 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0

Illegal Request: 58 Predictive Failure Analysis: 0

[... more happy drives here...]

root@openindiana:~#

Yup, that is the muy macho 1 Terabyte, not 1 Tebibyte :-(, drive.

While Solaris does have an fdisk that can format DOS partitions,

it is along the lines of the original DOS FDISK. That is not too flexible.

Happily, OpenIndiana includes gparted (the graphical version) but strangely

FAT formatting isn't enabled.

But OpenIndiana also includes parted (the text version) which does include

FAT formatting. Interestingly it echoes each command and parameter typed in.

root@openindiana:~# parted /dev/dsk/c4t0d0p0

GNU Parted 1.8.8

Using /dev/dsk/c4t0d0p0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print

print

Model: Generic Ide (ide)

Disk /dev/dsk/c4t0d0p0: 1000GB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

Number Start End Size Type File system Flags

1 32.3kB 105GB 105GB primary

2 105GB 1000GB 895GB primary

(parted) help mkfs

help mkfs

mkfs NUMBER FS-TYPE make a FS-TYPE file system on

partititon NUMBER

NUMBER is the partition number used by Linux. On MS-DOS disk labels,

the primary partitions number from 1 to 4, logical partitions from 5

onwards.

FS-TYPE is one of: ext2, fat32, fat16, linux-swap, ntfs

(parted) mkfs

mkfs

Warning: The existing file system will be destroyed and all data on the

partition will be lost. Do you want to continue?

Yes/No? Y

Y

Partition number? 1

1

File system type? [ext2]? fat32

fat32

(parted) print

print

Model: Generic Ide (ide)

Disk /dev/dsk/c4t0d0p0: 1000GB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

Number Start End Size Type File system Flags

1 32.3kB 105GB 105GB primary fat32 lba

2 105GB 1000GB 895GB primary

(parted) quit

quit

root@openindiana:~#

Doing a Control-R to refresh GParted we now see:

So now we can try to mount the partition:

root@openindiana:~# mount /dev/dsk/c4t0d0p0

mount: Mount point cannot be determined

root@openindiana:~#

Darn! apparently the new partition isn't known by the system.

Perhaps if we nudge the volume manager :-)

root@openindiana:~# volcheck

root@openindiana:~#

Wow! up pops the following window showing a nice file system, all mounted and such :-)

Let's check how that mounted:

root@openindiana:~# mount |grep c4t0

/media/NO NAME on /dev/dsk/c4t0d0p0:1 read/write/nosetuid/nodevices/hidden/nofoldcase/clamptime/noatime/timezone=0/dev=4341110 on Wed Mar 14 11:37:05 2012

root@openindiana:~#

Look at all the mount options!

Notes:

Here we struggle with Linux style types: msdos,vfat,fat32,fat and dos :-(

How much free space is there?

root@openindiana:~# df -h |egrep '^F|c4' # egrep to skip other entries...

Filesystem Size Used Avail Use% Mounted on

/dev/dsk/c4t0d0p0:1 98G 64K 98G 1% /media/NO NAME

root@openindiana:~# df |egrep '^F|c4'

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/dsk/c4t0d0p0:1 102385728 64 102385664 1% /media/NO NAME

root@openindiana:~#

Is it busy?

root@openindiana:~# fuser -c -u /media/NO\ NAME/

/media/NO NAME/:

root@openindiana:~# # Nope, not used by any one right now :-)

root@openindiana:~# mount |grep c4

/media/NO NAME on /dev/dsk/c4t0d0p0:1 read/write/nosetuid/nodevices/hidden/nofoldcase/clamptime/noatime/timezone=0/dev=4341110 on Wed Mar 14 11:37:05 2012

root@openindiana:~# umount /dev/dsk/c4t0d0p0:1

root@openindiana:~#

Check if it is no longer mounted!

root@openindiana:~# mount |grep c4

root@openindiana:~# ls -l /media

total 0

root@openindiana:~#

volcheck only works to pick up the partition the first time :-(

root@openindiana:~# volcheck

root@openindiana:~# mount |grep c4

root@openindiana:~# ls -l /media

total 0

root@openindiana:~#

Let's kick the whole "rmvolmgr - HAL-aware removable volume manager"

root@openindiana:~# svcadm restart svc:/system/filesystem/rmvolmgr:default

root@openindiana:~# ls -l /media

total 64

drwxrwxrwx 1 root root 65536 2012-03-14 12:28 NO NAME

root@openindiana:~#

We can also dismount use the device name c4t0d0p0:1

root@openindiana:~# mount |grep c4

/media/NO NAME on /dev/dsk/c4t0d0p0:1 read/write/nosetuid/nodevices/hidden/nofoldcase/clamptime/noatime/timezone=0/dev=4341110 on Wed Mar 14 13:50:59 2012

root@openindiana:~# umount /dev/dsk/c4t0d0p0:1

root@openindiana:~# mount |grep c4

root@openindiana:~# ls -l /media

total 0

root@openindiana:~# # Yeah!, it is dismounted :-)

root@openindiana:~# parted /dev/dsk/c4t0d0p0

GNU Parted 1.8.8

Using /dev/dsk/c4t0d0p0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) p

p

Model: Generic Ide (ide)

Disk /dev/dsk/c4t0d0p0: 1000GB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

Number Start End Size Type File system Flags

1 32.3kB 105GB 105GB primary fat32 lba

2 105GB 1000GB 895GB primary

(parted) toggle

toggle

Partition number? 1

1

Flag to Invert? boot/hidden/raid/lvm/lba/palo/prep? boot

boot

(parted) print

print

Model: Generic Ide (ide)

Disk /dev/dsk/c4t0d0p0: 1000GB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

Number Start End Size Type File system Flags

1 32.3kB 105GB 105GB primary fat32 boot, lba

2 105GB 1000GB 895GB primary

(parted) quit

quit

root@openindiana:~# mkfs -F pcfs -o b=MYFAT32,fat=32,v /dev/rdsk/c4t0d0p0:1

Opening destination device/file.

Partition size (from FDISK table) = 204796557 sectors.

Partition's offset: Sector 3f.

DKIOCG determined number of heads = 255

DKIOCG determined sectors per track = 126

compute_cluster_size: Sectors per FAT32 = 24997

Construct a new FAT file system on /dev/rdsk/c4t0d0p0:1: (y/n)? y

Disk has a file area of 3199164 allocation units,

each with 64 sectors = 1750990848 bytes.

Request to install DOS boot block.

Building FAT.

BUILD FAT.

24997 sectors per fat.

First sector of FAT

00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f

------------------------------------------------

000000: f8 ff ff 0f ff ff ff 0f f8 ff ff 0f 00 00 00 00 ................

000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Dump of the boot sector

00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f

------------------------------------------------

000000: eb 3c 90 4d 53 44 4f 53 34 2e 30 00 02 40 20 00 .<.MSDOS4.0..@ .

000010: 02 00 00 00 00 f8 00 00 7e 00 ff 00 3f 00 00 00 ........~...?...

000020: 8d f2 34 0c a5 61 00 00 00 00 00 00 02 00 00 00 ..4..a..........

000030: 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000040: 80 00 29 00 00 00 00 4d 59 46 41 54 33 32 20 20 ..)....MYFAT32

000050: 20 20 46 41 54 33 32 20 20 20 a4 06 1f c6 45 fe FAT32 ....E.

000060: 0f 8b 0e 18 7c 88 4d f9 89 47 02 c7 07 3e 7c fb ....|.M..G...>|.

000070: cd 13 72 7c 33 c0 39 06 13 7c 74 08 8b 0e 13 7c ..r|3.9..|t....|

000080: 89 0e 20 7c a0 10 7c f7 26 16 7c 03 06 1c 7c 13 .. |..|.&.|...|.

000090: 16 1e 7c 03 06 0e 7c 83 d2 00 a3 50 7c 89 16 52 ..|...|....P|..R

0000a0: 7c a3 49 7c 89 16 4b 7c b8 20 00 f7 26 11 7c 8b |.I|..K|. ..&.|.

0000b0: 1e 0b 7c 03 c3 48 f7 f3 01 06 49 7c 83 16 4b 7c ..|..H....I|..K|

0000c0: 00 bb 00 05 8b 16 52 7c a1 50 7c e8 87 00 72 20 ......R|.P|...r

0000d0: b0 01 e8 a1 00 72 19 8b fb b9 0b 00 be db 7d f3 .....r........}.

0000e0: a6 75 0d 8d 7f 20 be e6 7d b9 0b 00 f3 a6 74 18 .u... ..}.....t.

0000f0: be 93 7d e8 51 00 32 e4 cd 16 5e 1f 8f 04 8f 44 ..}.Q.2...^....D

000100: 02 cd 19 58 58 58 eb e8 bb 00 07 b9 03 00 a1 49 ...XXX.........I

000110: 7c 8b 16 4b 7c 50 52 51 e8 3a 00 72 e6 b0 01 e8 |..K|PRQ.:.r....

000120: 54 00 59 5a 58 72 c9 05 01 00 83 d2 00 03 1e 0b T.YZXr..........

000130: 7c e2 e2 8a 2e 15 7c 8a 16 24 7c 8b 1e 49 7c a1 |.....|..$|..I|.

000140: 4b 7c ea 00 00 70 00 ac 0a c0 74 29 b4 0e bb 07 K|...p....t)....

000150: 00 cd 10 eb f2 3b 16 18 7c 73 19 f7 36 18 7c fe .....;..|s..6.|.

000160: c2 88 16 4f 7c 33 d2 f7 36 1a 7c 88 16 25 7c a3 ...O|3..6.|..%|.

000170: 4d 7c f8 c3 f9 c3 b4 02 8b 16 4d 7c b1 06 d2 e6 M|........M|....

000180: 0a 36 4f 7c 8b ca 86 e9 8a 16 24 7c 8a 36 25 7c .6O|......$|.6%|

000190: cd 13 c3 0d 0a 4e 6f 6e 2d 53 79 73 74 65 6d 20 .....Non-System

0001a0: 64 69 73 6b 20 6f 72 20 64 69 73 6b 20 65 72 72 disk or disk err

0001b0: 6f 72 0d 0a 52 65 70 6c 61 63 65 20 61 6e 64 20 or..Replace and

0001c0: 70 72 65 73 73 20 61 6e 79 20 6b 65 79 20 77 68 press any key wh

0001d0: 65 6e 20 72 65 61 64 79 0d 0a 00 49 4f 20 20 20 en ready...IO

0001e0: 20 20 20 53 59 53 4d 53 44 4f 53 20 20 20 53 59 SYSMSDOS SY

0001f0: 53 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa S.............U.

Dump of the fs info sector

00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f

------------------------------------------------

000000: 52 52 61 41 00 00 00 00 00 00 00 00 00 00 00 00 RRaA............

000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001e0: 00 00 00 00 72 72 41 61 bb d0 30 00 03 00 00 00 ....rrAa..0.....

0001f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa ..............U.

Dump of the backup fs info sector

00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f

------------------------------------------------

000000: 52 52 61 41 00 00 00 00 00 00 00 00 00 00 00 00 RRaA............

000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0001e0: 00 00 00 00 72 72 41 61 bb d0 30 00 ff ff ff ff ....rrAa..0.....

0001f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa ..............U.

Writing FAT(s). 12798464 bytes times 2.

Wrote 12798464 bytes

Wrote 12798464 bytes

Building root directory.

First two directory entries

00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f

------------------------------------------------

000000: 4d 59 46 41 54 33 32 20 20 20 20 28 00 00 00 00 MYFAT32 (....

000010: 00 00 00 00 00 00 28 70 6e 40 00 00 00 00 00 00 ......(pn@......

000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Writing root directory. 32768 bytes.

root@openindiana:~#

Check if file system is sane.

root@openindiana:~# fsck -F pcfs -o v /dev/rdsk/c4t0d0p0:1 # See man fsck_pcfs

** /dev/rdsk/c4t0d0p0

** Scanning allocation units

..done

** Scanning file system meta-data

** Correcting any meta-data discrepancies

6160384 bytes.

0 bytes in bad sectors.

0 bytes in 1 directories.

0 bytes in 0 files.

6127616 bytes free.

32768 bytes per allocation unit.

188 total allocation units.

187 available allocation units.

root@openindiana:~#

root@openindiana:~# mkfs -F msdos #Whoops! msdos is not it!

mkfs: special not specified

Usage:

mkfs [-F FSType] [-V] [-m] [-o specific_options] special

mkfs [operands]

root@openindiana:~# mkfs -F msdos /dev/null # Use /dev/null so we avoid kill a device

mkfs: FSType msdos not installed in the kernel

root@openindiana:~# mkfs -F vfat /dev/null

mkfs: FSType vfat not installed in the kernel

root@openindiana:~# mkfs -F fat32 /dev/null

mkfs: FSType fat32 not installed in the kernel

root@openindiana:~# mkfs -F fat /dev/null

mkfs: FSType fat not installed in the kernel

root@openindiana:~# mkfs -F dos /dev/null

mkfs: FSType dos not installed in the kernel

root@openindiana:~# mkfs -F pcfs /dev/null

Construct a new FAT file system on /dev/null: (y/n)? y

Arithmetic Exception (core dumped)

root@openindiana:~# uname -a # Apparently /dev/null upsets mkfs for pcfs :-)

SunOS openindiana 5.11 oi_151a i86pc i386 i86pc Solaris

root@openindiana:~# cat /etc/motd # Oh, OpenIndiana is based on illumos

OpenIndiana (powered by illumos) SunOS 5.11 oi_151a September 2011

root@openindiana:~#

root@openindiana:~# find -L /usr/man -print |grep -i pcfs # anymore pcfs commands

/usr/man/man1m/fsck_pcfs.1m

/usr/man/man1m/mkfs_pcfs.1m

/usr/man/man1m/mount_pcfs.1m

/usr/man/man7fs/pcfs.7fs

root@openindiana:~#

root@openindiana:~# man pcfs #This mentions the :boot suffix

File Systems pcfs(7FS)

NAME

pcfs - FAT formatted file system

SYNOPSIS

#include <sys/param.h>

#include <sys/mount.h>

#include <sys/fs/pc_fs.h>

int mount(const char *spec,

const char * dir, int mflag,

"pcfs", NULL, 0, char *optptr,

int optlen);

DESCRIPTION

pcfs is a file system type that enables direct access to

files on FAT formatted disks from within the SunOS operating

system.

Once mounted, pcfs provides standard SunOS file operations

and semantics. Using pcfs, you can create, delete, read,

and write files on a FAT formatted disk. You can also create

and delete directories and list files in a directory.

pcfs supports FAT12 (floppies) and FAT16 and FAT32 file sys-

tems.

[...]

Boot Partitions

On x86 systems, hard drives may contain an fdisk partition

reserved for the Solaris boot utilities. These partitions

are special instances of pcfs. You can mount an x86 boot

partition with the command:

mount -F pcfs device-special:boot directory-name

or you can use:

mount directory-name

if the following line is in your /etc/vfstab file:

device-special:boot - directory-name pcfs - no rw

device-special specifies the special block device file for

the entire hard disk (/dev/dsk/cNtNdNp0)

directory-name specifies the location where the file system

is mounted.

All files on a boot partition are owned by super-user. Only

the super-user may create, delete, or modify files on a boot

partition.

root@openindiana:~# man mount_pcfs # This explains :c suffix (it's the DOS C: drive!)

[...]

o A DOS logical drive on a hard disk expressed as

device-name:logical-drive , where device-name

specifies the special block device-file for the

whole disk and logical-drive is either a drive

letter (c through z) or a drive number (1 through

24). Examples are /dev/dsk/c0t0d0p0:c and

/dev/dsk/c0t0d0p0:1.

[...]

Hmmm. We seem to accumulate /media/NO\ NAME* directories...

root@openindiana:~# svcs |grep rmvol

online 14:08:05 svc:/system/filesystem/rmvolmgr:default

root@openindiana:~# svcadm restart svc:/system/filesystem/rmvolmgr:default

root@openindiana:~# volcheck

root@openindiana:~# ls -l /media

total 33

drwxr-xr-x 2 root root 512 2012-03-14 14:08 NO NAME

drwxrwxrwx 1 root root 32768 2012-03-14 14:15 NO NAME-1

root@openindiana:~# mount |grep c4

/media/NO NAME-1 on /dev/dsk/c4t0d0p0:1 read/write/nosetuid/nodevices/hidden/nofoldcase/clamptime/noatime/timezone=0/dev=4341110 on Wed Mar 14 14:15:42 2012

root@openindiana:~# umount /dev/dsk/c4t0d0p0:1

root@openindiana:~# mount |grep c4

root@openindiana:~# ls -l /media

total 2

drwxr-xr-x 2 root root 512 2012-03-14 14:08 NO NAME

drwxr-xr-x 2 root root 512 2012-03-14 14:15 NO NAME-1

root@openindiana:~# rmdir /media/NO*

root@openindiana:~# ls -l /media

total 0

root@openindiana:~# volcheck

root@openindiana:~# ls -l /media

total 0

root@openindiana:~# svcadm restart svc:/system/filesystem/rmvolmgr:default

root@openindiana:~# volcheck

root@openindiana:~# ls -l /media

total 32

drwxrwxrwx 1 root root 32768 2012-03-14 14:16 NO NAME

root@openindiana:~#

==========================NTFS stuff==========================

Before fiddling about:

root@openindiana:~# fsck -F ntfs

root@openindiana:~# fsck -F ntfs /dev/dsk/c4t0d1p1:1

fsck: operation not applicable to FSType ntfs

root@openindiana:~# mkfs -F ntfs /dev/dsk/c4t0d1p1:1

mkfs: FSType ntfs not installed in the kernel

root@openindiana:~# parted /dev/dsk/c4t0d1p1 #WRONG!!!!!!!!!!!

GNU Parted 1.8.8

Using /dev/dsk/c4t0d1p1

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print

print

Error: /dev/dsk/c4t0d1p1: unrecognised disk label

(parted) quit

quit

root@openindiana:~# parted /dev/dsk/c4t0d1p0

GNU Parted 1.8.8

Using /dev/dsk/c4t0d1p0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print

print

Model: Generic Ide (ide)

Disk /dev/dsk/c4t0d1p0: 1000GB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

Number Start End Size Type File system Flags

1 32.3kB 10.5GB 10.5GB primary

2 10.5GB 1000GB 990GB primary

(parted) mkfs

mkfs

Warning: The existing file system will be destroyed and all data on the

partition will be lost. Do you want to continue?

Yes/No? Yes

Yes

Partition number? 1

1

File system type? [ext2]? ntfs

ntfs

mkntfs -f -s 512 -S 126 -H 255 -p 0 /dev/dsk/c4t0d1p1

Cluster size has been automatically set to 4096 bytes.

Creating NTFS volume structures.

mkntfs completed successfully. Have a nice day.

(parted) quit

quit

root@openindiana:~#

After this fiddling (and a Control-R in GParted to refresh the device list):

[...]