Mount USB Device: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
= eFAT =
To Mount a USB device
To Mount a USB device
<pre>
<pre>
Line 9: Line 11:
</pre>
</pre>


= Linux ext4 =
To mount on boot
To mount on boot
<pre>
<pre>
Line 14: Line 17:
</pre>
</pre>


For Linux partition
<pre>
/dev/sda1      /mnt/usb-hd1    ext4    defaults          0      0
</pre>
= FAT 32 =
For FAT32 Partition
<pre>
/dev/sda1      /mnt/usb-hd1    exfat  defaults          0      0
</pre>
= NTFS =
<pre>
apt-get install libfuse2 ntfs-3g
</pre>
<pre>
vi /etc/fstab
</pre>
<pre>
/dev/sda1      /mnt/usb-hd1    ntfs-3g defaults          0      0
</pre>
= Move root folder to USB =
<pre>
/dev/sda1          /mnt/usb-hd0    ext4    defaults          0      0
/mnt/usb-hd0/root  /root          ext4    defaults,bind    0      0
</pre>
= Move core Linux folders to USB =
<pre>
<pre>
/dev/sda1      /mnt/usb-hd1   ext4    defaults          0      3
/dev/sda1         /root          ext4    defaults          0      1
/dev/sda5        /var/log        ext4    defaults          0       2
/dev/sda6        /mnt/usb-hd0   ext4    defaults          0      2
</pre>
</pre>


[[Category : Linux]]
[[Category : Linux]]

Latest revision as of 23:48, 20 April 2015

eFAT

To Mount a USB device

apt-get install exfat-fuse exfat-utils
mkdir /mnt/usb-hd1
mount /dev/sda1 /mnt/usb-hd1/

Linux ext4

To mount on boot

vi /etc/fstab

For Linux partition

/dev/sda1       /mnt/usb-hd1    ext4    defaults          0       0

FAT 32

For FAT32 Partition

/dev/sda1       /mnt/usb-hd1    exfat   defaults          0       0

NTFS

apt-get install libfuse2 ntfs-3g
vi /etc/fstab
/dev/sda1       /mnt/usb-hd1    ntfs-3g defaults          0       0

Move root folder to USB

/dev/sda1          /mnt/usb-hd0    ext4    defaults          0       0
/mnt/usb-hd0/root  /root           ext4    defaults,bind     0       0

Move core Linux folders to USB

/dev/sda1         /root           ext4    defaults          0       1
/dev/sda5         /var/log        ext4    defaults          0       2
/dev/sda6         /mnt/usb-hd0    ext4    defaults          0       2