doublezz
Group: Members
Posts: 5
Joined: Dec. 2005 |
|
Posted: Dec. 16 2005,17:52 |
|
UPDATE!!! Thanks to Doobit, AwPhuch and cbagger01 who offered three simpler solutions than mine, my post I see is a long way away from being the best method. (I feel like a real newbie for overlooking the obvious and instead searching for needles in the haystack.) Simply put if you want a graphical solution, use EmelFM > find the /mnt/hda1 folder or what ever other device folder you want to mount, right click and select mount. Simple and easy without any command line commands. or use the mount.app applet in the application dock called 'Slit' on the bottom right of the enhanced desktop, use the arrows to navigate all the mount points and simply mount/unmount by clicking on the mount button with the bolt symbol (green when mounted, black when unmounted) If you are not on the enhanced desktop, simply right click on the desktop > apps > tools > mount.app or alternatively select run command and type: P.S. If you double click on the mount.app icon for each mounted drive, the Midnight Commander file manager opens, and if you want to read a mount.app FAQ run the following command: Code Sample | mount.conf -H | If you prefer a command line mount solution, alternatively, in Xterm, type as any user the following simple command: Code Sample | mount /mnt/hda1 | and voila! It mounts your hard disk as read and write, or read only if it is a WinXP/2000 NTFS file system formatted drive. For more details, read the rest of my post ... but as I said these three solutions seem easier. :-) Thanks guys. Now if this can only be added to newbie documentation.!
-----------------------------------------------------
Original post ...
After initially having problems mounting my hard drive in the DSL LiveCD and finding almost no useful help in the forum or in the DSL Documentation Project, I thought I would post this HOWTO or rather HOWIDUNNIT!!! :-) (PS: Warning! I have not tested this on a WindowsNT or WindowsXP NTFS file system, and I would imagine that DSL LiveCD may not have the tools to do that safely, so beware if you try mounting Windows drives that are not vfat type formated! NTFS is very tricky to work with in Linux!)
The DSL LiveCD installer's Knoppix autoconfiguration did a good job of detecting both of my hard drives: one with Windows on it, and one with both Windows partitions and Linux partitions.
Unfortunately when I mounted them I kept getting 'permission denied' messages when I tried to access them as the damnsmall user. (NB: Mounting for newbies is the linux term for adding another file system to the already existing single file system that linux creates on startup.)
The problem I faced initially was that the default damnsmall user does not have permissions to mount other file systems, and when I initially mounted my hard drives as the root user, the damnsmall user still could not view them since it lacked permission by default to access root-owned files.
So having described the problems I faced, let's describe the method that worked for me -- that is how to get the root user to mount my hard disks in such a way that the damnsmall defaul user could both read and write to them! :-)
1) Use either a) Xterm or b) EmelFM file manager if you want a graphic window, or c) just the simple bash shell (e.g ctrl-alt-f1, NB: ctrl-alt-f2 returns you to the xwindows graphical desktop).
2) Next look to see what hard drive partitions were found when the DSL LiveCD was loaded by typing the following command line:
Code Sample | cat /etc/fstab |
into any of our command line interfaces. You will see a list of all known drive partitions on your computer.
This is what mine looked like: proc /proc proc defaults 0 0 pts /dev/pts devpts mode=0622 0 0 /dev/fd0 /mnt/auto/floppy auto user,noauto,exec,umask=000 0 0 /dev/cdrom /mnt/auto/cdrom auto user,noauto,exec,ro 0 0 # Added by KNOPPIX /dev/hdc1 /mnt/hdc1 vfat noauto,users,exec,umask=000,uid=1001,gid=500 0 0 # Added by KNOPPIX /dev/hda1 /mnt/hda1 vfat noauto,users,exec,umask=000,uid=1001,gid=500 0 0 # Added by KNOPPIX /dev/hda5 /mnt/hda5 ext2 noauto,users,exec 0 0 # Added by KNOPPIX /dev/hda6 none swap defaults 0 0 # Added by KNOPPIX /dev/hda7 /mnt/hda7 reiserfs noauto,users,exec 0 0
It found two hard drives: hda and hdc (hda is the first hard drive on my first IDE strip while hdc is the first hard drive on my second IDE strip) In addition it found four hard disk partitions on my hda hard disk: hda1 (windows type vfat), hda5 (linux type ext2) hda6 (linux type swap), and hda7 (linux type reiserfs, a journalled file system). (NB: if you also want to see which devices are currently mounted into your linux filesystem, type at the command line prompt: Code Sample | cat /etc/mtab | which shows you your mount table of mounted devices.)
(NB: at a minimum DSL LiveCD should have found one hard drive with one partition hda, if there is any hard drive at all in your computer.)
3) To mount a hard drive partition (meaning to merge it with the currently running linux file system), you will have to enter some command lines as the root user to mount your hard drives and to be able for all users to view and use files on that hard drive. (NB: This is not difficult for Newbies, as long as they type carefully and exactly as instructed, including any blank spaces or lack of blank spaces).
- that means to become the root user, if you use Xterm or a bash shell you will need to type to switch to the root user (NB:If you are going to work as a root user it is highly recommended to set your password for security purposes by typing and then entering a 5 to 8 letter password when prompted). - if you are using EmelFM you just type on the same line preceding any command you want to execute as root user (i.e. , to view the present working directory as viewed by the root user, probably /ramdisk/home/damnsmall ). 'sudo', I believe, means 'superuser do' which grants root privelages temporarily to another user.
4) HERE IS THE IMPORTANT PART:
To mount my 'hda1' windows drive, I typed the following into the Xterm root prompt, as a root user (see above):
Code Sample | mount /dev/hda1 /mnt/hda1 -o umask=000 |
The command reads: a) mount the hda1 device to the folder named '/mnt/hda1' (i.e. the hda1 folder, found in the mnt folder, found in the root directory, which is sort of like the c:\ drive in Windows) b) with the '-o' option named umask=000 (NB: that is three zeros not three letter Os) which is the critical option that allows all users access to the files on the hard drive. (NB: Without the umask=000 option all other users except root will get "permission denied" error messages when they try to access the files on the newly mounted hard disk.)
If you are using the command line provided in EmelFM, the graphical file system manager on your DSL desktop, then you would type instead in the damnsmall@box textbox the command prefaced with 'sudo':
Code Sample | sudo mount /dev/hda1 /mnt/hda1 -o umask=000 |
There it's now done! The hard drive is mounted as readable and writable. Now you just have to view it.
5) VIEWING your hard drive.
In Xterm or bash, to list the files, type: (or whatever folder you mounted it to). Of course this only lists in a command line view the files.
If you prefer a graphical file browser like explorer then use the EmelFM which is found as an icon on the enhanced DSL desktop or in the apps > tools menu if you right click on the desktop. Just click on the UpDir(ectory) icon until you reach the root directory that contains a folder named 'mnt' then click on the 'mnt' folder and again on the 'hda1' folder (if that was where you mounted your hard drive) and you will see all your files. You can copy, move, delete, etc. to your heart's content. (Hint: to create an empty file named test.txt type at the command prompt Code Sample | touch test.txt | ) :-)
6) As some final hints, you might want to create a folder in your damnsmall user's folder as a place to mount your hard drive's files instead of the default locations in the 'mnt' folder that were created on startup (Hint: try the list command ). In Xterm for example when you typed to change to the root user you were placed by default in the /ramdisk/home/damnsmall folder. To create a new folder here type (or in EmelFM if that is what you are using):
(or what ever name you want to give it) This will make a directory named 'hda1' in the damnsmall folder.
Then to mount your drive here, type:
Code Sample | mount /dev/hda1 ./hda1 -o umask=000 | (for Xterm) or
Code Sample | sudo /mount /dev/hda1 ./hda1 -o umask=000 | (for EmelFM) The './hda1' mount location will default to the newly created directory. To list the files, type: or navigate to the folder with the mouse in the graphical EmelFM interface.
Another option that you might want to add to your mount command if you are afraid of doing some damage to your files on your window drive is the 'ro' option which means 'read only' By default the drives are mounted 'rw' meaning read write. You might accidently modify them if they are 'writable'. To only view and read the files, for security purposes, use the 'ro' option instead by typing:
Code Sample | mount /dev/hda1 /mnt/hda1 -o ro,umask=000 | (if in Xterm) or
Code Sample | sudo mount /dev/hda1 /mnt/hda1 -o ro,umask=000 | (if EmelFM).
Have fun! Doublezz Sorry about the long post but I want to be helpful to newbies too.
|