mount Iomega external hard drive on debian squeeze, how to use mount command
Hello all.
I was about to start a thread asking how to mount and I have just been able to mount the Iomega external Hard Drive. However I would like to ask for an explanation of the mount command just so I understand what I should do next time. And is there a way to make this automatic? My squeeze instalation is a fresh install and I did not choose the graphic desktop because I installed xorg and fluxbox. Am I missing any package that would make the mounting of usb's and external hard drives more simple or automatic upon insertion? This is the line I added to the /etc/fstab: Code:
/dev/sdb1 /mnt/usb ntfs noauto,user,fmask=133,dmask=022 0 0 Code:
mount /mnt/usb What can you explain to me about the rest? Thankyou in advance =) |
Code:
sudo mount -vvvv LABEL=.chip /mnt FIRST... I had specified to mount mine (a partition, but this also works for external USB drives with file system labels) by LABEL, which means mount looks it up by label SECOND... Once it finds the label, it looks for other information by that label, like the node that bears the label THIRD... The node having been found, it finds the target which is where you want to mount it FOURTH... The target being called the node (yes, the device node is what you are mounting, but that is spec, which means special), it looks for the filesystem type (in this example, I did not say what type, so it tries vfat) as well as anything like 'ro' for read-only or whatever else you say FIFTH... That information being known, it issues the mount command Now, if you are mounting that one all the time and do not have a label, you can try this: use the UUID. mount looks at the UUID and with your options, does all of the stuff said earlier. My system has in its fstab file some of the information like that which you have provided, only it uses UUIDs (those are things or labels that are placed on the disk at format time). Because the first part of your fstab contains the device, if only UUID or label (specified by UUID= or LABEL=, respectively), then mount, as said above, looks up the device you want (not a bother, just a different way of looking it up). After that, in that file, it looks for where you want it, then what type it is, and any options you have Using a UUID or label (you want this put at /mnt/usb?), you can just issue Code:
mount /mnt/usb Device names (sda, sdb, etc...) change at times, but the labels or UUIDs I do not think change (to check you have the right info, run 'sudo vol_id /dev/sda1' and make a note of the information; if done right, it should mount with only the location you want) I do not know if this helps (I hope it does); other than that, I am uncertain if I can help |
=)
Hello, thank you for your reply, it is helpful.
I do not have installed vol_id, should I install it? Is volname the same thing? Thanks. |
volname is not the same thing, it works for CDs or other ISO9660 type stuff (the ISO-9660 is common for things like CDs, DVDs, or CD or DVD image files of that form); udev would handle finding out what you would like. I am guessing your kernel version is at least 2.6.13 or something? You should already have that there (if not, run your system update tool; there is a very good chance you do have it on there, as I believe udev is something that runs in the background...you may not see it, but it is there); if not, use your system package manager or update tool to search for and install udev (there may be other packages required; just install them if it so mentions, and if need be, restart the system)
|
kernel version
This is my kernel version:
2.6.32-5-686 |
udev
indeed I do have udev. I do not have vol_id
|
Well, I think vol_id is an available command (it should be, as I believe it comes with udev), so if you need to, use
Code:
vol_id --uuid /dev/sdb1 Code:
vol_id --label /dev/sdb1 Code:
UUID=BLEEP Code:
LABEL=BLEEP |
not found
Bash: command not found (vol_id)
And should I write the label I want where you wrote BLEEP? |
reminder
I would like to remind the readers that my installation of squeeze was not the default installation with the Graphical Desktop. I unchecked this option during the installation (tasksel I think).
So perhaps this is why I do not have vol_id. |
You do not have the graphical install or whatever (that may or mat not be a reason); where BLEEP is though you should put your UUID (that is why I used the word BLEEP; it is supposed to be replaced with the thing, in this case, the UUID, you want to use). However, some commands might be on your system and you might be unaware of it. After looking on the Internet for some time, I came across something on blkid, but I was not sure if I had it on my system, so I did (locate and whereis, by the way, can be used on any command or whatever, if you think you got something on the system, but are unsure, or if you want to search):
Code:
quant@quant-laptop:~$ locate blkid Code:
quant@quant-laptop:~$ sudo blkid Code:
quant@quant-laptop:~$ sudo blkid | grep "sda4" I believe a different posting I have read somewhere said that Debian Squeeze was missing vol_id; maybe use blkid instead? |
Oh, yeah, type the precise path (that is, as shown); otherwise, the system might not recognize the command
|
Hello again, I would like to thank your answers, they are really helpfull, I found blkid and I can see the labels now, thankyou again =)
|
I don't use sudo so I just enter su - and then use blkid directly, it works.
So when I am mounting manually I can define the LABEL and UUID, if I understood correctly? Thanks. |
nevermind.
Nevermind the last question.
What I mean is: when I plug in a usb or sd card and it does not automout, I can define its label first using /dev/s** ? And then mount it using the label or UUID? |
When I type
Code:
sudo blkid Code:
/dev/sda1:... Code:
sudo ls -al /dev/disk/by-label Code:
sudo ls -al /dev/disk/by-uuid Code:
.chip -> ../../sda4 Code:
/dev/disk/by-uuid...the 4F38-00D9 -> ../../sda4 Code:
mount LABEL=.chip /mnt Code:
mount UUID=4F38-00D9 /mnt |
All times are GMT -5. The time now is 08:15 PM. |