|
|||||||||||
|
|
8. Setting up an Ext2 filesystemThe procedures described here will give the entire flash memory device a single partition endowed with the ext2 filesystem. This will make the device more suitable for use between Linux machines. Don't do this if the device is supposed to operate between Linux and Windows machines.
8.1. PartitioningIt is assumed that the flash memory is mapped to /dev/sda. In this section we treat the situation where the whole flash memory device will become devoted to a single ext2 partition. In the example procedure shown below, a 128MB flash memory was formatted for ext2. That is why figures like 131MB and 888 cylinders appear. The fdisk tool, which is used, simply reads that from the device. All operations are done by root. The single partition will be created on /dev/sda (please note: not /dev/sda1 ) The procedure is described in a series of steps with comments. The standard prompt of fdisk is Command (m for help): and you can, at any stage enter m to see the available commands. If you do that the result would be
Your memory stick must be plugged in, but not mounted. Take care that write protect is off. Here goes:
Now is a good time to verify that all went well by printing out the partition details and table.
Make sure that the partition is not set up as bootable. There should not be an asterisk under the heading "Boot" in the partition table. Furthermore, the headings "Id" and "System" should be as they are in the printout shown above. That indicates that you can format the device in ext2 (next section). These are the defaults. If they are not, they can be changed by
If (or when) the partition table is correct, you can conclude the procedure with
That's it! 8.2. Making an ext2 deviceHaving completed the partition part, we go straight on to "formatting" the device in ext2. For this we use the tool mke2fs. This is straightforward.
You might like to watch the led on your memory stick flicker while this is happening. When it stops, the job is done. 8.3. Tests -- ext2To see if you were successful, essentially repeat the procedures described in Section 7.3 and Section 7.4 with two exceptions of detail. In the first place the mount command should be
The second exception is that the permissions on your favourite text file should not change anymore. | ||||||||||
|
|
|
Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account Document on this page is part of "USB Flash Memory HOWTO". See Index Page for more info about Authorship and Copyright. 1999-2008 Linuxinfor.com. No rights reserved. |