Friday, April 18, 2008

Mounting Other Partitions and USB Devices in DSL

To begin
These examples are based on my hard drive setup:

hda1 (hd0,0) WindowsXP (first original partition)
hda2 (hd0,1) Puppy Linux (added partition)
hda3 (hd0,2) Damn Small Linux (added partition)
hda4 (hd0,3) Swap (added partition)

Open the shortcut to root folder on your desktop(usually a folder icon with " / " below) Right click any emtp space and "create new folder". Name the folder Media. Now open the newly created Media folder and create 3 new folders within, one named, c_windows one named, force, and the third named force_a

To mount Windows
command: sudo mount -t file-sys-type /dev/path-of-drive /media/c_windows
example: sudo mount -t ntfs /dev/hda1 /media/c_windows
example: sudo mount -t vfat /dev/hda1 /media/c_windows
(if you are using FAT file sys)

*NOTICE the spaces between words and letters, (like between hda1 and /media) This is important!
If you are using the root terminal, leave out sudo and just start with mount.
If you are using a regular terminal, you might have to type: su (hit ENTER) enter password (hit ENTER) then type the command starting with mount. Once you have typed the command and hit enter, go back and open the folder: shortcut_to_root ->media -> c_windows...the contents of your Windows should be there.

To mount Linux partition
command: sudo mount -t ext2 /dev/path-of-drive /media/force
example: sudo mount -t ext2 /dev/hda2 /media/force
Once you have typed the command and hit enter, go back and open the folder: short_to_root ->media ->force...the contents of your Linux partition should be there.


If you are using the root terminal, leave out sudo and just start with mount.
If you are using a regular terminal, you might have to type: su (hit ENTER) enter password (hit ENTER) then type the command starting with mount.

To mount USB device

command: sudo mount -t file-sys-type /dev/path-of-drive /media/force_a
example: sudo mount -t vfat /dev/sda1 /media/force_a

Once you have typed the command and hit enter, go back and open the folder: short_to_root->media ->force_a...the contents of your USB drive should be there.
note: in DSL you can open files on another partition or drive but if you drag n drop a file
from another drive/partition it will MOVE it not COPY it. See examples of copying files post.


If you are using the root terminal, leave out sudo and just start with mount.
If you are using a regular terminal, you might have to type: su (hit ENTER) enter password (hit ENTER) then type the command starting with mount.

You can create more folders in the media direcory if you need: like force_b force_c
Sometimes different USB devices claim different titles such as sdb1 instead of sda1.

To Unmount a partition or drive just add u to the mount command...
example: umount -t ntfs /dev/hda1 /media/c_windows
make sure it's umount...not unmount...this little mistake cost me alot of valuable time :)

No comments: