Version 7 (modified by knpa, 13 years ago) (diff) |
---|
Preparing hard disks for delivery
First steps
Plug in the external hard drive.
You will need to have root permissions before you start ('sudo su' and then type in your password).
Run dmesg to find device name. Listed at the bottom if just plugged in.
e.g
SSELinux: initialized (dev sdb, type fuseblk), uses genfs_contexts
or
sd 7:0:0:0: [sdb] 488397168 512-byte hardware sectors (250059 MB)
Device path is then /dev/sdb (not sdb1 etc, this indicates a partition on sdb)
Run mount to find the name of the partition you need to unmount e.g /dev/sdb1
Unmount the partition with umount /dev/partition, e.g. umount /dev/sdb1 (if not already unmounted)
At this point, you either need to make a Linux format disk (ext3) for hyperspectral data or a Windows format disk (NTFS, not FAT32) for all other data types.
Formatting and partitioning
Linux format (ext3) disks [hyperspectral data]
Partition and format the disk (command line)
- Run fdisk /dev/DEVICE_NAME (not partition)
- enter 'p' to print partition table and check you have selected the correct disk
- enter 'd' to delete the current partition (delete them all)
- enter 'n' to create a new partition
- enter 'p' to make new partition the primary partition. If it asks you to give a partition number press 1 and enter. Then press enter twice to fill the whole disk.
- enter 'p' to print new partition table – if all seems fine enter 'w' to write
- To be on the safe side, run dmesg again to make sure device name hasn't changed. You should now see the partition listed as device_name1, e.g. sdb1
- Unmount the partition if it remounted.
- Run mke2fs -j /dev/partition
Remount and fix permissions:
- Unplug the disk and plug back in. The disk space should be located under /media/disk.
- It is wise to check that this destination is correct: 'df /media/disk' to check that this is where the device is mounted.
- Make writable for everyone using chmod a+rwx /media/disk
Copy over your data onto the disk
Copy the delivery folder to /media/disk.
Finalising hard disk
Set permissions and owner:
chmod a+rX,a-w -R /media/disk
chown root.root -R /media/disk
NOTE: Be sure to record the number of the hard disk (or giving it one if it does not yet have one) before packing it.
Windows format (NTFS, not FAT32) disks [everything except hyperspectral data]
Partition and format the disk (GUI)
- run gparted (needs sudo)
- select the correct disk partition (pulldown at top right)
- right click on existing partitions and delete them
- when there is only unallocated space left, right click on it and select new
- change file system to ntfs
- change label to ARSFDAN
- if everything looks ok in the list at the bottom, apply all operations (click big green tick)
This should repartition and quick format the disk.
Partition and format the disk (command line)
- Run fdisk /dev/DEVICE_NAME (not partition)
- enter 'p' to print partition table and check you have selected the correct disk
- enter 'd' to delete the current partition (delete them all)
- enter 'n' to create a new partition
- enter 'p' to make new partition the primary partition. If it asks you to give a partition number press 1 and enter. Then press enter twice to fill the whole disk.
- press 't' to set the partition type, select the partition you just made (1)
- set it to type 7 (HPFS / NTFS)
- enter 'p' to print new partition table – if all seems fine enter 'w' to write
- To be on the safe side, run dmesg again to make sure device name hasn't changed. You should now see the partition listed as device_name1, e.g. sdb1
- Unmount the partition if it remounted.
- Run mkntfs --label ARSFDAN --quick /dev/PARTITION
- Unplug the disk and plug back in. The disk space should be located under /media/ARSFDAN.
- It is wise to check that this destination is correct: 'df /media/ARSFDAN' to check that this is where the device is mounted.
- Permissions fixes aren't needed for NTFS (I think).
Copy over your data onto the disk
Copy the delivery folder to /media/ARSFDAN.
NOTE: Be sure to record the number of the hard disk (or giving it one if it does not yet have one) before packing it.
Return to Procedures/EndUserDelivery