Changes

From SME Server
Jump to navigationJump to search
86 bytes added ,  22:34, 4 November 2015
Line 183: Line 183:  
We use hal for the first and manually create and mount for the second
 
We use hal for the first and manually create and mount for the second
   −
=====Find Device Name=====
+
=====Find the Drive Name=====
 
To find  the device name, label, filesystem and the uid
 
To find  the device name, label, filesystem and the uid
 
Create the file hal-find-by-property.sh
 
Create the file hal-find-by-property.sh
Line 211: Line 211:  
The output will tell you the device, volume label, file system type, and the uid. If this is a new drive you have to run fdisk to create a partition and format the drive before you can mount it.
 
The output will tell you the device, volume label, file system type, and the uid. If this is a new drive you have to run fdisk to create a partition and format the drive before you can mount it.
   −
=====Run fdisk on the Device=====
+
=====Run fdisk on the Drive=====
    
To create a partition with fdisk, use the device output from the hal-find-by-property.sh script as the argument to the fdisk command. If the output from hal-find-by-property.sh is /dev/sdb1 the fdisk command will be
 
To create a partition with fdisk, use the device output from the hal-find-by-property.sh script as the argument to the fdisk command. If the output from hal-find-by-property.sh is /dev/sdb1 the fdisk command will be
Line 219: Line 219:     
If this is a new drive, you will need to create a new primary partition. Do this by entering an n at the prompt followed by p for primary. Enter a partition number of 1. fdisk will then ask for the first and last sector. If you are formatting a new disk, hit enter at both questions. This will use the entire disk. When the process ends, hit p to verify you have the disk setup like you want it. Once you are happy with the partition table, hit w to write the partition table and exit fdisk.
 
If this is a new drive, you will need to create a new primary partition. Do this by entering an n at the prompt followed by p for primary. Enter a partition number of 1. fdisk will then ask for the first and last sector. If you are formatting a new disk, hit enter at both questions. This will use the entire disk. When the process ends, hit p to verify you have the disk setup like you want it. Once you are happy with the partition table, hit w to write the partition table and exit fdisk.
 +
 +
=====Format The Drive=====
    
You now need to format the drive. ext4 is recommended. To format the drive with an ext4 filesystem located at /dev/sdb1 and give it a label of usbdrive, issue the following command:
 
You now need to format the drive. ext4 is recommended. To format the drive with an ext4 filesystem located at /dev/sdb1 and give it a label of usbdrive, issue the following command:
 
  mkfs ext4 -L usbdrive /dev/sdb1
 
  mkfs ext4 -L usbdrive /dev/sdb1
 +
 +
=====Mount The Drive=====
    
Finally you mount the drive. As mentioned before, the mount point has to exist before you issue the mount command. A typical place for USB drives to be mounted is /media. If there is already a mount point in /media you can check it by listing the directory contents of media.  
 
Finally you mount the drive. As mentioned before, the mount point has to exist before you issue the mount command. A typical place for USB drives to be mounted is /media. If there is already a mount point in /media you can check it by listing the directory contents of media.  
Line 230: Line 234:  
  mount /dev/sdb1 /media/usbdrive
 
  mount /dev/sdb1 /media/usbdrive
 
  ls -lh /media/usbdrive/
 
  ls -lh /media/usbdrive/
 +
 +
=====UnMount the Drive=====
    
Unmount the drive before unplugging it with
 
Unmount the drive before unplugging it with
70

edits

Navigation menu