Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sorry, I'm a newb, and I'm trying to acess media files from my NTFS Partition on my HDA. (well, I think its HDA) Does primary/master and ide 1 or 2 matter? Please help.
Indeed it does. The breakdown is
Primary Master hda
Primary Slave hdb
Secondary Master hdc
Secondary Slave hdd
And if you get into SATA then it's sda/b/c/d
To mount it, you need to make sure the device:
fdisk -l
That's an L but lowercase.
Then you can see what devices exist. If hda1 exists, then:
mkdir /mnt/ntfs
mount /dev/hda1 /mnt/ntfs
should suffice. If not:
mount -t ntfs /dev/hda1 /mnt/ntfs
might.
Short of that, the Live Version may not have the NTFS support built in, nor as module. You could compile the module, but that is far beyond a 'newbie' task, at least at this point.
Ok, now I know what to do (kinda.) Would you mind sharing what those commands actually do, cause thats the only way I'll remember if I need to do it again. Why mount then mount again (mnt)??
Also, the hard drive has partitions, does that matter? When I type in:
sudo mount -t ntfs /dev/hda1 /mnt/ntfs
it says wrong fs type, bad file block, etc.
It may very well be some other filesystem, or the files you need reside on another partition. You can try the different ones, or the fdisk command may give you a hint by the last column shown. It identifies the type of partition it is, HPFS/NTFS or WIN32, or something like that.
The commands are doing the following:
fdisk -l
Is simply listing (-l) what devices there are that fdisk recognizes, it makes no changes to any drives. Nice for seeing what your OS sees.
mount is mounting the device (/dev/hda1) to a certain point, called a mount point. This can be any directory on your filesystem. There is a lot more to this, but this is really the basic idea. The mount point we made with:
mkdir /mnt/ntfs
But we could have make any directory anywhere. mkdir is the command to make a directory. Should the directory be a deep directory, like /mnt/ntfs/and/more/stuff We would have to create each directory seperately, or the mkdir command can be added a -p:
mkdir -p /mnt/ntfs/and/more/stuff
Will create all the directories necessary leading up to 'stuff'. And then we can mount /dev/hda1 at that point:
mount -t ntfs /dev/hda1 /mnt/ntfs/and/more/stuff
ubuntu@ubuntu:~$ sudo mount -t ntfs /dev/hda1/dm-2 /mnt/ntfs (there is a space there)
mount: special device /dev/hda1/dm-2 does not exist
(a path prefix is not a directory)
I don't know why this is working. I understand what everyting means, but I don't really understand what the error is telling me. (by that I meant that I know what I am typing and why, thanks to your explanation.)
Thanks a bunch for explaining and helping me.
The error is telling you, at least this time, that /dev/hda1/dm-2 is not real. You may have /dev/dm-2 however, I don't recognize that device.
Post the output of
sudo fdisk -l
So we can see what that shows you've got.
The above post shows the devices, but I don't know what command you executed to get it, so be sure when you post, include as much identification of what's going on as possible.
Ok, I'm at work now, so I can't check for a couple of hours. I'll edit this post to add the approptiate information. The command I used to get this was "cat ????" I can't remember what it was after cat. The fdisk -l (as I recall) only showed back /hda. I could be wrong on that, but I couldn't get it to display the information of the hda. Perhaps I need to specify hda somehow with the fdisk command? fdisk -l /dev/hda maybe? Thanks
P.S. What does the /dev mean and or do? Is there somewhere (that you know of) that can answer my newb questions like a FAQ or something?
Just as an FYI to anyone reading this post: In Ubuntu on a liveCD you have to say "sudo" before EVERY command.
Originally posted by witiwap
Ok, I'm at work now, so I can't check for a couple of hours. I'll edit this post to add the approptiate information. The command I used to get this was "cat ????" I can't remember what it was after cat. The fdisk -l (as I recall) only showed back /hda. I could be wrong on that, but I couldn't get it to display the information of the hda. Perhaps I need to specify hda somehow with the fdisk command? fdisk -l /dev/hda maybe? Thanks
No. Just the fdisk -l command. That's it. And rather than telling people what you see, it helps others help you if you merely copy and paste the output of the command. For example, when I type it in, this is what I get
Code:
@ubuntu:~$ sudo fdisk -l
Password:
Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1911 15350076 7 HPFS/NTFS
/dev/hda2 1912 18494 133202947+ f W95 Ext'd (LBA)
/dev/hda3 18495 19457 7735297+ 83 Linux
/dev/hda5 1912 14763 103233658+ b W95 FAT32
/dev/hda6 * 14764 16434 13422276 83 Linux
/dev/hda7 18363 18494 1060258+ 82 Linux swap / Solaris
/dev/hda8 16435 18362 15486628+ 83 Linux
Partition table entries are not in disk order
@ubuntu:~$
Quote:
P.S. What does the /dev mean and or do? Is there somewhere (that you know of) that can answer my newb questions like a FAQ or something?
As far as I can tell, /dev stands for device and it actually refers to a directory (/dev) that has all the devices in your computer and connected to your computer.
Quote:
Just as an FYI to anyone reading this post: In Ubuntu on a liveCD you have to say "sudo" before EVERY command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.