Can't Create SymLinks on CF Card

2011-02-22 Thread Hal Vaughan
I found this when using tar to unpack an OS image archive.  I've been doing 
this for a while on another CF card and had no problem.  But now, when I untar 
the archive, I keep getting cannot create symlink and operation not 
permitted.

I bypassed tar and tried creating some of the symlinks by hand and got the same 
error.  The CF card is mounted in /mnt/flash.  I umounted the drive, cd'ed back 
to /mnt/flash and ran the very same tar command again and it created the files 
and symlinks without any problem.

So I can create the symlinks to that directory when nothing is mounted, but 
when I have a CF card mounted there, I can't create symlinks (and have other 
problems with tar).

For example, if the boot directory is there, with the files in it, and vmlinuz 
is in /mnt/flash/boot, then I do cd /mnt/flash and ln -s boot/vmlinuz ./ I 
get the same error: Operation not permitted.

But if the drive is NOT mounted and I create (from the archive) 
/mnt/flash/boot, with the same file structure, and do the same two commands to 
get in /mnt/flash and create the symlink, it works just fine.

The only difference is that at one point the files exist on a CF card and the 
other time they're on the virtual hard drive (this is in a VM in Parallels, the 
guest OS is Squeeze).

I've tried this with another CF card and it works fine.  I've even tried it in 
another mount point and it works.  The only time it does NOT work is with this 
particular CF card.  I can unpack files to it and they are there and verified, 
but I can't create symlinks on the card.

Unfortunately, ln doesn't provide any useful information with the verbose mode 
(other than listing the files it's working on).

Does anyone have any idea why I can create and save files on this CF card and 
cannot make symlinks on it?


Thanks for any thoughts on this!



Hal

--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/2d7e5954-b4cc-430f-8587-a902426e3...@halblog.com



Re: Can't Create SymLinks on CF Card

2011-02-22 Thread Sven Joachim
On 2011-02-22 21:14 +0100, Hal Vaughan wrote:

 I found this when using tar to unpack an OS image archive.  I've been
 doing this for a while on another CF card and had no problem.  But
 now, when I untar the archive, I keep getting cannot create symlink
 and operation not permitted.

Looks like the card is formatted with an unsuitable filesystem
(e.g. FAT32).

 Does anyone have any idea why I can create and save files on this CF card and 
 cannot make symlinks on it?

Most probably because the filesystem on the card does not support
symlinks.

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87y657pxhm@turtle.gmx.de



Re: Can't Create SymLinks on CF Card

2011-02-22 Thread Boyd Stephen Smith Jr.
On Tuesday 22 February 2011 14:14:37 Hal Vaughan wrote:
 I found this when using tar to unpack an OS image archive.  I've been doing
 this for a while on another CF card and had no problem.  But now, when I
 untar the archive, I keep getting cannot create symlink and operation
 not permitted.
 
 I've tried this with another CF card and it works fine.  I've even tried it
 in another mount point and it works.  The only time it does NOT work is
 with this particular CF card.  I can unpack files to it and they are there
 and verified, but I can't create symlinks on the card.
 
 Does anyone have any idea why I can create and save files on this CF card
 and cannot make symlinks on it?

Check the file system type.  FAT and NTFS aren't real UNIX file systems, so 
they can't store certain types of files.  NTFS supports hard links after a 
fashion, and MS Windows supports symlinks, sort of but not at the same level 
as a UNIX filesystem.

There may also be other troublesome file systems, but all the old stand-bys 
(ext*, reiser*, xfs, jfs) and newcomers (btrfs, zfs) work fine.  The problems 
almost always are in compatibility file systems.  (Even the iso9660 file 
format had to be extended to support UNIX semantics, but those came before 
Linux, IIRC.)

[I didn't mention many the kFreeBSD file systems, but that's just because I'm 
not familiar with running on kFreeBSD.]

I seem to remember that there was a tool I contributed to that check a file 
system for proper UNIX semantics.  It was originally destined to test fuse 
file systems to see if they were acceptable as a home directory (e.g. making 
/home/myuser a fuse-webdav mount point), but I believe it does at least check 
for symlinks being available.  It is written in C, but it is fairly easy to 
read.
-- 
Boyd Stephen Smith Jr.   ,= ,-_-. =.
b...@iguanasuicide.net  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/


signature.asc
Description: This is a digitally signed message part.


Re: Can't Create SymLinks on CF Card

2011-02-22 Thread Chris Brennan
On Tue, Feb 22, 2011 at 4:32 PM, Boyd Stephen Smith Jr.

[I didn't mention many the kFreeBSD file systems, but that's just because
 I'm
 not familiar with running on kFreeBSD.]


Debian/kFreeBSD uses UFS2 (Universal File System version 2) which also fully
supports posix syntax for symlinks.

C-

-- 
Did you know...

If you play a Windows 2000 CD backwards, you hear satanic messages,
but what's worse is when you play it forward
  ...it installs Windows 2000
   -- Alfred Perlstein on chat at freebsd.org


Re: Can't Create SymLinks on CF Card

2011-02-22 Thread Hal Vaughan

On Feb 22, 2011, at 4:31 PM, Sven Joachim wrote:

 On 2011-02-22 21:14 +0100, Hal Vaughan wrote:
 
 I found this when using tar to unpack an OS image archive.  I've been
 doing this for a while on another CF card and had no problem.  But
 now, when I untar the archive, I keep getting cannot create symlink
 and operation not permitted.
 
 Looks like the card is formatted with an unsuitable filesystem
 (e.g. FAT32).
 
 Does anyone have any idea why I can create and save files on this CF card 
 and cannot make symlinks on it?
 
 Most probably because the filesystem on the card does not support
 symlinks.

You're right on target with that.

This is part of a program to install Squeeze on an embedded system and a 
Compact Flash card wasn't working, so I made a quick trip out to buy a few 
more.  In that time I forgot I had commented out the command in the code to 
partition the CF card and format the partition.  The report I got from sfdisk 
had the same numbers for the partition size as what I was specifying, so I saw 
the numbers and assumed it was okay -- without realizing it specified the FS 
was FAT.

So it was my fault -- I forgot my program was not formatting and read the 
numbers and not the additional data.

It's behaving nicely now.

Thanks for picking up on something that was so obvious I missed it!



Hal

--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/9b2c27ee-3cf8-420d-b606-32b4c0cd0...@halblog.com



Re: Can't Create SymLinks on CF Card

2011-02-22 Thread Michael Tsang
On Wednesday 23 February 2011 04:14:37 Hal Vaughan wrote:
 I found this when using tar to unpack an OS image archive.  I've been doing
 this for a while on another CF card and had no problem.  But now, when I
 untar the archive, I keep getting cannot create symlink and operation
 not permitted.
Is your drive read-only?
 
 I bypassed tar and tried creating some of the symlinks by hand and got the
 same error.  The CF card is mounted in /mnt/flash.  I umounted the drive,
 cd'ed back to /mnt/flash and ran the very same tar command again and it
 created the files and symlinks without any problem.
 
 So I can create the symlinks to that directory when nothing is mounted, but
 when I have a CF card mounted there, I can't create symlinks (and have
 other problems with tar).
What options have you used to mount the CF card? What is the filesystem on it?
 
 For example, if the boot directory is there, with the files in it, and
 vmlinuz is in /mnt/flash/boot, then I do cd /mnt/flash and ln -s
 boot/vmlinuz ./ I get the same error: Operation not permitted.

-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


signature.asc
Description: This is a digitally signed message part.