Afin qu’il soit lisible par d’autres systèmes (par exemple un disque USB pour des sauvegardes), voici les différentes étapes pour initialiser un disques en FAT32. Prenons l’exemple avec disque sd1 ajouté. Il faut d’abord initialiser sa table des partitions :
# fdisk -i sd1 ----------------------------------------------------- ------ ATTENTION - UPDATING MASTER BOOT RECORD ------ ----------------------------------------------------- Do you wish to write new MBR and partition table? [n] y
On indique ensuite que la partition est de type FAT32 :
# fdisk -e sd1 Enter 'help' for information fdisk: 1> p Disk: sd1 geometry: 60801/255/63 [976773168 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused *3: A6 0 1 1 - 60800 254 63 [ 63: 976768002 ] OpenBSD fdisk: 1> e 3 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- *3: A6 0 1 1 - 60800 254 63 [ 63: 976768002 ] OpenBSD Partition id ('0' to disable) [0 - FF]: [A6] (? for help) ? Choose from the following Partition id values: 00 unused 20 Willowsoft 67 Novell AB MacOS X boot 01 DOS FAT-12 24 NEC DOS 68 Novell AF MacOS X HFS+ 02 XENIX / 38 Theos 69 Novell B7 BSDI filesy* 03 XENIX /usr 39 Plan 9 70 DiskSecure B8 BSDI swap 04 DOS FAT-16 40 VENIX 286 75 PCIX BF Solaris 05 Extended DOS 41 Lin/Minux DR 80 Minix (old) C0 CTOS 06 DOS > 32MB 42 LinuxSwap DR 81 Minix (new) C1 DRDOSs FAT12 07 HPFS/QNX/AUX 43 Linux DR 82 Linux swap C4 DRDOSs < 32M 08 AIX fs 4D QNX 4.2 Pri 83 Linux files* C6 DRDOSs >=32M 09 AIX/Coherent 4E QNX 4.2 Sec 84 OS/2 hidden C7 HPFS Disbled 0A OS/2 Bootmgr 4F QNX 4.2 Ter 85 Linux ext. DB CPM/C.DOS/C* 0B Win95 FAT-32 50 DM 86 NT FAT VS DE Dell Maint 0C Win95 FAT32L 51 DM 87 NTFS VS E1 SpeedStor 0E DOS FAT-16 52 CP/M or SysV 8E Linux LVM E3 SpeedStor 0F Extended LBA 53 DM 93 Amoeba FS E4 SpeedStor 10 OPUS 54 Ontrack 94 Amoeba BBT EB BeOS/i386 11 OS/2 hidden 55 EZ-Drive 99 Mylex EE EFI GPT 12 Compaq Diag. 56 Golden Bow 9F BSDI EF EFI Sys 14 OS/2 hidden 5C Priam A0 NotebookSave F1 SpeedStor 16 OS/2 hidden 61 SpeedStor A5 FreeBSD F2 DOS 3.3+ Sec 17 OS/2 hidden 63 ISC, HURD, * A6 OpenBSD F4 SpeedStor 18 AST swap 64 NetWare 2.xx A7 NEXTSTEP FF Xenix BBT 19 Willowtech 65 NetWare 3.xx A8 MacOS X 1C ThinkPad Rec 66 NetWare 386 A9 NetBSD Partition id ('0' to disable) [0 - FF]: [A6] (? for help) 0B Do you wish to edit in CHS mode? [n] offset: [63] size: [976768002] fdisk:*1> w Writing MBR at offset 0. fdisk: 1> q
La partition est ainsi accessible en sd1i comme l’indique disklabel :
# disklabel sd1 disklabel: warning, DOS partition table with no valid OpenBSD partition # /dev/rsd1c: type: SCSI disk: SCSI disk label: HM500JI flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 60801 total sectors: 976773168 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # microseconds track-to-track seek: 0 # microseconds drivedata: 0 16 partitions: # size offset fstype [fsize bsize cpg] c: 976773168 0 unused 0 0 i: 976768002 63 MSDOS
Enfin, on la formate ensuite en FAT32 :
# newfs_msdos sd1i /dev/rsd1i: 974863936 sectors in 121857992 FAT32 clusters (4096 bytes/cluster) bps=512 spc=8 res=32 nft=2 mid=0xf8 spt=63 hds=255 hid=63 bsec=976768002 bspf=952016 rdcl=2 infs=1 bkbs=2
Tutoriel volé sur le wiki d'evolix.