Difference between revisions of "HDD Format"

From ElphelWiki
Jump to: navigation, search
m
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
  
 
Open a command window (terminal).
 
Open a command window (terminal).
 
+
<font size='2'>
 
  telnet 192.168.0.9  #(If the default IP hasn't been changed.  Or you can connect via 'ssh' using [http://www.chiark.greenend.org.uk/~sgtatham/putty/ putty] for example)
 
  telnet 192.168.0.9  #(If the default IP hasn't been changed.  Or you can connect via 'ssh' using [http://www.chiark.greenend.org.uk/~sgtatham/putty/ putty] for example)
 
Login: root
 
Login: root
Line 14: Line 14:
  
 
'''Step 2:'''
 
'''Step 2:'''
+
<font size='2'>
 
  cat /proc/partitions   
 
  cat /proc/partitions   
 +
</font>
 
This will show you a list that should include: hda, hdb, etc... if you have storage devices connected.
 
This will show you a list that should include: hda, hdb, etc... if you have storage devices connected.
 
If these devices have been partitioned, then you will also see in the list: hda1, hdb1, etc...  Or if they have multiple partitions: hda1, hda2, hdb1, hdb2, hdb3, etc...
 
If these devices have been partitioned, then you will also see in the list: hda1, hdb1, etc...  Or if they have multiple partitions: hda1, hda2, hdb1, hdb2, hdb3, etc...
Line 21: Line 22:
  
 
'''Step 3:'''
 
'''Step 3:'''
 
+
<font size='2'>
 
  fdisk /dev/hda   
 
  fdisk /dev/hda   
 +
</font>
 
This will allow you to partition, or re-partition the hard drive, before it can be formatted.  It is recommended to make one partition using the full capacity of the drive.
 
This will allow you to partition, or re-partition the hard drive, before it can be formatted.  It is recommended to make one partition using the full capacity of the drive.
  
 
More parameters:
 
More parameters:
 +
<font size='2'>
 
  '''m'''  (This shows the help screen)
 
  '''m'''  (This shows the help screen)
 
  '''d'''  (If you need to delete any previous partitions)
 
  '''d'''  (If you need to delete any previous partitions)
Line 31: Line 34:
 
  '''p'''  (To show the new partition table that you just created on the screen, and verify that it is correct.)
 
  '''p'''  (To show the new partition table that you just created on the screen, and verify that it is correct.)
 
  '''w'''  (To save the partition table to the disk, and exit.)
 
  '''w'''  (To save the partition table to the disk, and exit.)
 
+
</font>
 
''Update:'' since release 8.0.9 cameras support 4K sectors disks, you may create a single primary partition (selecting '''n''', then '''p''', then '''1''') and agree to the prompted defaults.
 
''Update:'' since release 8.0.9 cameras support 4K sectors disks, you may create a single primary partition (selecting '''n''', then '''p''', then '''1''') and agree to the prompted defaults.
  
 
'''Step 4:'''
 
'''Step 4:'''
 
+
<font size='2'>
  mkfs.ext2 /dev/hda1 -m0 -Tlargefile4
+
  mkfs.ext2 /dev/hda1 -m0 -T largefile4
 +
</font>
 
This formats the drive with the proper file system.  This will only work after the drive has been partitioned. -'m0' means that no space should be left exclusively to the superuser and -Tlargefile4 optimizes system for storing large files (and this is what is normally done with the camera). You do not need to add any extra parameters for the 4K sectors.
 
This formats the drive with the proper file system.  This will only work after the drive has been partitioned. -'m0' means that no space should be left exclusively to the superuser and -Tlargefile4 optimizes system for storing large files (and this is what is normally done with the camera). You do not need to add any extra parameters for the 4K sectors.
  
  
 
'''Step 5:'''
 
'''Step 5:'''
 
+
<font size='2'>
  mount /dev/hda1 /mnt/0
+
  mount /dev/hda1 /mnt/0  
 +
</font>
 
This will mount your newly partitioned and formatted drive to 'Mount 0' so that the system knows where to look for it.  
 
This will mount your newly partitioned and formatted drive to 'Mount 0' so that the system knows where to look for it.  
  
  
 
'''Step 6:'''
 
'''Step 6:'''
 
+
<font size='2'>
 
  ls /mnt/0   
 
  ls /mnt/0   
 +
</font>
 
This is just a quick check to see that the camera can read the drive now.  You should see just one directory called 'lost_and_found'.
 
This is just a quick check to see that the camera can read the drive now.  You should see just one directory called 'lost_and_found'.

Latest revision as of 10:09, 4 June 2012

This guide can be used for formatting camera internal hard drives or compact flash medium, etc.


Step 1:

Open a command window (terminal).

telnet 192.168.0.9  #(If the default IP hasn't been changed.  Or you can connect via 'ssh' using putty for example)

Login: root

Password: pass

Alternatively you may just open the terminal in the browser - http://192.168.0.9/phpshell.php (change the ip if your camera has a different one)

Step 2:

cat /proc/partitions  

This will show you a list that should include: hda, hdb, etc... if you have storage devices connected. If these devices have been partitioned, then you will also see in the list: hda1, hdb1, etc... Or if they have multiple partitions: hda1, hda2, hdb1, hdb2, hdb3, etc...


Step 3:

fdisk /dev/hda  

This will allow you to partition, or re-partition the hard drive, before it can be formatted. It is recommended to make one partition using the full capacity of the drive.

More parameters:

m  (This shows the help screen)
d  (If you need to delete any previous partitions)
n  (To create a new partition.  Follow the prompts and type 'p' and then '1', to make it the first primary partition, and then hit 'enter' twice to use the full capacity.)
p  (To show the new partition table that you just created on the screen, and verify that it is correct.)
w  (To save the partition table to the disk, and exit.)

Update: since release 8.0.9 cameras support 4K sectors disks, you may create a single primary partition (selecting n, then p, then 1) and agree to the prompted defaults.

Step 4:

mkfs.ext2 /dev/hda1 -m0 -T largefile4 

This formats the drive with the proper file system. This will only work after the drive has been partitioned. -'m0' means that no space should be left exclusively to the superuser and -Tlargefile4 optimizes system for storing large files (and this is what is normally done with the camera). You do not need to add any extra parameters for the 4K sectors.


Step 5:

mount /dev/hda1 /mnt/0 

This will mount your newly partitioned and formatted drive to 'Mount 0' so that the system knows where to look for it.


Step 6:

ls /mnt/0  

This is just a quick check to see that the camera can read the drive now. You should see just one directory called 'lost_and_found'.