LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 07-20-2005, 08:43 AM   #1
hanasi
Member
 
Registered: Jul 2005
Distribution: SUSE Linux v9.2
Posts: 85

Rep: Reputation: 15
Linux sees partition, doesn't see its content


I have SUSE v9.1 multibooted with OS/2. Because I want a means of communication between the two OSes, I set up (in OS/2) a partition with a drive letter, formatted with JFS, which is one of the file-system formats thea SUSE can mount. SUSE mounts the partition at boot time, and sees the partition, the name of which is "images" at the moment.

By "sees", I mean that when I write <ls /mnt> in a terminal, SUSE reports "images" in a tasteful blue (I think). I am now the owner of the images directory.

From OS/2, I have populated the images partition with two files and a subdirectory which contains several files (none of them hidden or with any wierd attributes).

At present, the permissions for the images directory are:

drwxrwxrwx 2 stan users 48 2005-07-10 12:10
drwx--xr-x 3 root root 72 2005-07-10 12:10

(I made the permissions so broad for experimental purposes, they won't remain that way.)

I don't know what the 2 and 3 are; I don't know what the 48 and 72 are. I assume that the second line is meant to show what the permissions were before the most recent change.

But mainly what I don't know, and want very much to understand, is why I have found no way to display the direrctory of the directory "images" When I do <ls -a /mnt/images>, what I get is a miniscule display consisteing of dots, arranged thusly: <. ..>, i.e. a dot, then two spaces, then two more dots. Samuel F.B. Morse must be turning in his grave. What is this? Why don't I get a directory listing?
 
Old 07-20-2005, 09:38 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Well, first you are seeing the images directory. Or, at least, part of it. The ./ and ../ are elements of every *NIX directory. The first is a short-hand for "this directory" and the second means "this directory's parent directory."

When that's all you see, it means that the directory has been reported as "empty." In this case, I suspect It means that the OS/2 file access settings are blocking your Linux access attempts. Try a couple of things:

1) Create a small "test" file in the Images directory from Linux. For example
Code:
$ touch /mnt/Images/test
should create an empty file called "test" in the Images directory. If that works, a
Code:
$ ls -la /mnt/Images
should list the test file. (Oh, if you don't want to see the . and .. entries, use -lA instead of -la in the ls command.)

2) Reboot into OS/2 and see if you can see the "test" file in the OS/2 directory listing of Images. If you can, check the OS/2 access controls on the directory and files, and see how they differ (if they do) from those on the "test" file. If they do differer, change the others to have the same ACL info as the "test" file.

On the other hand, if you can't see the "test" file from OS/2, there is, I think, some security setting mismatch between the two systems that you'll need to correct. (Sorry, I don't know OS/2, and can't offer any advice there.)
 
Old 07-20-2005, 09:47 AM   #3
d.goldthwaite
LQ Newbie
 
Registered: Oct 2003
Location: Boston
Distribution: Slackware 10.1
Posts: 2

Rep: Reputation: 0
Can't read partition

I have a couple of thoughts on your predicament. First, make sure you have JFS compiled into your kernel. I think it would complain more when mounting if it didn't have the support, but verify it anyway.


I am assuming that you have "Images" listed in your /etc/fstab since you mount it using its name. Try mounting it using: mount /dev/hd## -t <filetype> /mnt/Images. Replace the # with the appropriate drive information. For example, if you have an ide drive and Images is on the 3rd partition, you would type: mount /dev/hda3 -t JFS /mnt/Images (to mount the partition in a directory named Images located under /mnt).

If you get it to mount, then do: df -hT and see what it reports for file system.

About the numbers in the output for ls, the 2 and 3 are the number of links to the file, the 48 and 72 are sizes. Try doing an ls man or info ls for a good description of the output and the many options. Info and man files can be tough going, especially for a newbie, but once you gain a little familiarity, the answer to many a problem can be found there.

Hope this helps you off towards a solution.
 
Old 07-20-2005, 12:55 PM   #4
hanasi
Member
 
Registered: Jul 2005
Distribution: SUSE Linux v9.2
Posts: 85

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by PTrenholme
Well, first you are seeing the images directory. Or, at least, part of it. The ./ and ../ are elements of every *NIX directory. The first is a short-hand for "this directory" and the second means "this directory's parent directory."

When that's all you see, it means that the directory has been reported as "empty." In this case, I suspect It means that the OS/2 file access settings are blocking your Linux access attempts. Try a couple of things:

1) Create a small "test" file in the Images directory from Linux. For example
Code:
$ touch /mnt/Images/test
should create an empty file called "test" in the Images directory. If that works, a
Code:
$ ls -la /mnt/Images
should list the test file. (Oh, if you don't want to see the . and .. entries, use -lA instead of -la in the ls command.)

2) Reboot into OS/2 and see if you can see the "test" file in the OS/2 directory listing of Images. If you can, check the OS/2 access controls on the directory and files, and see how they differ (if they do) from those on the "test" file. If they do differer, change the others to have the same ACL info as the "test" file.

On the other hand, if you can't see the "test" file from OS/2, there is, I think, some security setting mismatch between the two systems that you'll need to correct. (Sorry, I don't know OS/2, and can't offer any advice there.)
I never thought to relate the three dots to this idea, which is in fact very familiar to me. That's probably because of the quaint way that ls organizes its output, side by side on a single line, so that the three dots look like.... well ... three dots. Had the output been colunar (which would made any listing too easy to read), it would have been obvious. After I pass the current problem, the first item on my agenda will be to find a way to rationalize directory listings; I'm sure it must be possible.

So the problem remains -- why doesn't it see the files that I know are there. OS/2 does not do permissions; it has attributes. As I mentioned, the files do not have "hidden, or other wierd attributes, so they should be visible.

I think I can make out barely enough of your suggestion (1) to make a test file. Most of it, being in Linuxese, is still impenetrable to me, but I will study it carefully.

In (2) -- again, there are no access controls. The files have no attribute other than Archive, and should be visible to anything that looks in the directory/partition. If there is a security mismatch, it can only be that the files have not been affected by the act of setting the Linux permissions. OS/2 is, in this case, entirely passive, and therefore blameless.

Many thanks for your suggestion, which I will atempt later this evening or tomorrow.
 
Old 07-20-2005, 01:14 PM   #5
hanasi
Member
 
Registered: Jul 2005
Distribution: SUSE Linux v9.2
Posts: 85

Original Poster
Rep: Reputation: 15
Re: Can't read partition

Quote:
Originally posted by d.goldthwaite
I have a couple of thoughts on your predicament. First, make sure you have JFS compiled into your kernel. I think it would complain more when mounting if it didn't have the support, but verify it anyway.


I am assuming that you have "Images" listed in your /etc/fstab since you mount it using its name. Try mounting it using: mount /dev/hd## -t <filetype> /mnt/Images. Replace the # with the appropriate drive information. For example, if you have an ide drive and Images is on the 3rd partition, you would type: mount /dev/hda3 -t JFS /mnt/Images (to mount the partition in a directory named Images located under /mnt).

If you get it to mount, then do: df -hT and see what it reports for file system.

About the numbers in the output for ls, the 2 and 3 are the number of links to the file, the 48 and 72 are sizes. Try doing an ls man or info ls for a good description of the output and the many options. Info and man files can be tough going, especially for a newbie, but once you gain a little familiarity, the answer to many a problem can be found there.

Hope this helps you off towards a solution.
I have not yet any idea of how to recompile the kernel, but the concept scares me. I keep reading that nowadays one almost neveer needs to do that.

I didn't mount it using its name; it found ithe name of the partition which I have established in LVM of OS/2, when I made the partition. I will look in /etc/fstab for "images"; if it is there, the OS did it, because I didn't.

Thanks much for your explanations above.

I will investigate your very orderly suggestions when next I boot to SUSE. If nothing else, I'm sure they will help me with the non-mnemonic command names; I may even find a way to remember some of them. BTW, I _have_ visited the man and info pages for ls. They are not nearly as helpful as they might be, because they explain very little, but simply list unexplained facts and non-mnemonic options. There is little or no effort to make information accessible.

Thanks much. I'll be back in a day or so with a report.
 
Old 07-20-2005, 04:39 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally posted by hanasi
[snip]
I think I can make out barely enough of your suggestion (1) to make a test file. Most of it, being in Linuxese, is still impenetrable to me, but I will study it carefully.[snip]
Hum. Well then, if you don't mind, a few "new Linux user" notes:

First, I assume that you are familiar with the "command line" or "console" usage, since you talked about using the "ls" command.

For almost every *nix command there is "on line documentation" available by using $ man <command> or $ info <command> (where <command> is, of course, the command for which you want information. For a briefer command description, a $ <command> --help often works.

For example, the first page of the dir command (an "alais" of the ls] command) help looks like this:
Code:
$ dir --help | more
Usage: dir [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuSUX nor --sort.

Mandatory arguments to long options are mandatory for short options too.
  -a, --all                  do not hide entries starting with .
  -A, --almost-all           do not list implied . and ..
      --author               print the author of each file
  -b, --escape               print octal escapes for nongraphic characters
      --block-size=SIZE      use SIZE-byte blocks
  -B, --ignore-backups       do not list implied entries ending with ~
  -c                         with -lt: sort by, and show, ctime (time of last
                               modification of file status information)
                               with -l: show ctime and sort by name
                               otherwise: sort by ctime
  -C                         list entries by columns
      --color[=WHEN]         control whether color is used to distinguish file
                               types.  WHEN may be `never', `always', or `auto'
  -d, --directory            list directory entries instead of contents,
                               and do not dereference symbolic links
  -D, --dired                generate output designed for Emacs' dired mode
  -f                         do not sort, enable -aU, disable -lst
  -F, --classify             append indicator (one of */=@|) to entries
      --format=WORD          across -x, commas -m, horizontal -x, long -l,
                               single-column -1, verbose -l, vertical -C
      --full-time            like -l --time-style=full-iso
  -g                         like -l, but do not list owner
  -G, --no-group             inhibit display of group information
  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)
      --si                   likewise, but use powers of 1000 not 1024
  -H, --dereference-command-line
                             follow symbolic links listed on the command line
      --dereference-command-line-symlink-to-dir
                             follow each command line symbolic link
                               that points to a directory
      --indicator-style=WORD append indicator with style WORD to entry names:
                               none (default), classify (-F), file-type (-p)
  -i, --inode                print index number of each file
  -I, --ignore=PATTERN       do not list implied entries matching shell PATTERN
  -k                         like --block-size=1K
  -l                         use a long listing format
  -L, --dereference          when showing file information for a symbolic
                               link, show information for the file the link
                               references rather than for the link itself
  -m                         fill width with a comma separated list of entries
--more--
[The pipe ("|") takes the output of the first command as input to the second one.]

Thus, to do what you want, a
Code:
$ dir -lA /mnt/Images
should work. (Another "trick" is that, when the options are preceded by a single dash, and they take no arguments, they can be "concatenated," so -l -A becomes -lA

Another useful "trick" is the man -k <something> command which lists all the commands having manual pages containing the "<something>". You can also use info --apropos <something> for a similar search.

A third nice feature is "command completion:" If you type the first few characters of a command, hitting the <tab> key will complete the command or, if nothing happens, a second <tab> will usually list all possible completions. (Entering two <tab> keys on an empty line will offer to list all the commands recognized by the shell. In my case, I'm offered a list of 4024 commands, which is a bit much . . .)

The "completion" usually works other places in the command line. For example, when entering a file name.

There are on-line tutorials available in this forum, and they can be quite helpful. Click the "Tutorials" button at the top of the page for a menu.

Hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux sees 2003 Domain, windows sees Linux ..but.... Stealthy_C Linux - Networking 4 06-14-2005 03:27 PM
where can i see what processor linux sees? jrwizzard Linux - Newbie 3 08-26-2004 04:47 PM
Linux sees drives not controller... Present Linux - Distributions 7 02-23-2004 08:34 PM
Windows<-->Linux box. Linux sees win, not vice versa NPSHr Linux - Networking 7 10-16-2003 09:41 PM
Linux sees my cd burner as a scsi(?) Chijtska Linux - Software 2 02-07-2002 08:42 AM


All times are GMT -5. The time now is 10:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration