Many ''/boot'' folders

Hi users,

i have just installed the new SUSE linux 11.0 distribution on my PC. After all the configuration was completed, I’ve opened the Konqueror to see the file-structure. By clicking the + /boot in this folder I have about 40 /boot subfolders, all with the same content (see attached).
Did I made something wrong and how can I fix it? Thanks in advance!!http://img516.imageshack.us/my.php?image=bildschirmphoto2ek2.png

Do you mean there are lots of symbolic links, from /boot/boot to /boot?

ie you can type /boot/boot/boot/boot/ into your address bar and the contents of /boot are displayed.

If so, this is normal, that is how YaST deals with multiple images.

Thats correct,-but all the boot folders have the same files and content as well the same creation date and time.Is it possible to delete all these folders apart from the first one?

It’s a symlink which “loops” you back to /boot, it’s like one of those doors that lead to the same room as you were. If you delete the files inside it you will render your system unbootable.

So, don’t :slight_smile:

Does it mean that all these folders(42 with the same content)are necessary to keep or are these files created at startup and become more and more? What is the idea behind this behavior?

I doubt if it stops at 42 :slight_smile: , it is eternal.

When you are in /boot and do an ls:

boven:~ # cd /boot
boven:/boot # l
total 9680
drwxr-xr-x  3 root root    4096 Jun 20 11:25 ./
drwxr-xr-x 22 root root    4096 Jun 23 08:29 ../
   ...
lrwxrwxrwx  1 root root       1 Jan 12 16:47 boot -> ./
   ...

you can see that boot points to ./ which is /boot again!
You can now do cd boot, but you will end up in /boot (despite the fact that your prompt may show /boot/boot).
Because you are again at /boot, you will see the same when you type **ls **and this is a sort of perpetuum mobile.

But there is only one /boot, and inside it there is one symbolic link with the name boot and the contents . (one character).

thanks but the reason is not clear.

Rexikis schrieb:
> After all the configuration was completed, I’ve opened the Konqueror to
> see the file-structure. By clicking the + /boot in this folder I have
> about 40 /boot subfolders, all with the same content (see attached).
> Did I made something wrong and how can I fix it?

Nothing is wrong. There is only one /boot folder. It’s just a bug in
Konqueror which shows it to you again and again as if it existed many
times.

You can reassure yourself of this by looking inside the folders. You’ll
notice they all have exactly the same content. If you create a new file
in one of them (which requires administrator privilege) you’ll see it
appear in all of them, and if you delete it again it’ll disappear from
all of them at once, which proves it is really the same folder, just
shown multiple times by Konqueror as in a pair of parallel mirrors.

HTH
T.


Tilman Schmidt t.schmidt@phoenixsoftware.de
Phoenix Software GmbH www.phoenixsoftware.de
Adolf-Hombitzer-Str. 12 Amtsgericht Bonn HRB 2934
53227 Bonn, Germany Geschäftsführer: W. Grießl

OK, Thanks.
It might get fixed with a patch or the next release.

I doubt if this will be ‘fixed’. Tilman Schmidt seees it as a bug, but it may also be seen as a feature. And Konquror is not alone. Bash follows suite:

boven:~ # cd /boot/
boven:/boot # cd boot
boven:/boot/boot # cd boot
boven:/boot/boot/boot # pwd
/boot/boot/boot
boven:/boot/boot/boot #

as does **pwd **as you see. After all it shows how you came there. One can discuss if ‘the path how we came there’ or ‘the path with all symbolic links resolved’ must be shown. The loop we have in our case is certainly not normal and in a more normal case you would be very confused when you, by clicking on a subdirectory, you ends up in a complete different place.

Example:
In the home directory of user test there is a directory /home/test/music, which is a symbolic link to /multimedia/audio. Then as a user test you start at your Home (/home/test/) and click music. Now the address shows /multimedia/audio. When you do not look carefully and now click the up arrow you will land at /multimedia/. Surprise!

So the behaviour as we see it is not too strange after all.

All this brings us a bit away from the question: why is this looped symbolic link made? IMHO it may have something to do with different partners (maybe GRUB and/or LILO among them) think where several files are and that this was solved onece and for all by this link.

hcvv schrieb:
> I doubt if this will be ‘fixed’.

So do I, but for different reasons.

> Tilman Schmidt seees it as a bug, but
> it may also be seen as a feature. And Konquror is not alone. Bash
> follows suite:
>
> Code:
> --------------------
> boven:~ # cd /boot/
> boven:/boot # cd boot
> boven:/boot/boot # cd boot
> boven:/boot/boot/boot # pwd
> /boot/boot/boot
> boven:/boot/boot/boot #
> --------------------

No, that’s a different bug. In fact, I would even accept that as a
feature. :slight_smile:

It’s one thing to display the path you came by instead of the canonical
path in pwd output and in the shell prompt (if you have “\w” in $PS1).
That could indeed be regarded as a feature, and can also be worked
around. (/bin/pwd will display the canonical path, so doing
"cd /bin/pwd" will erase the shell’s memory of how you came to the
current working directory.)

It’s another thing to present a symbolic link as a real subdirectory,
as Konqueror does. That is not a feature, that is just wrong.

A symbolic link is just a reference. It is not the same as the file
or folder it refers to. Klicking on it should take you to its target,
but displaying it as if it was the target itself is just wrong and
leads to confusion, as demonstrated by the OP.

> as does *pwd *as you see. After all it shows how you came there. One
> can discuss if ‘the path how we came there’ or ‘the path with all
> symbolic links resolved’ must be shown.

The ‘path with all symbolic links resolved’ is the canonical path,
found by following the “…” links, and displayed by eg. /bin/pwd.
It is where the folder actually resides physically. In the shell,
both are available, and shell users are (or should be) aware that a
file or directory may be referenced by different paths, so that’s no
problem.

The Konqueror folder tree, OTOH, presents folders graphically as
containers possibly containing other containers. But a symbolic link
is not a container, it’s just a reference. Displaying the referenced
container in its place is misleading.

> The loop we have in our case is
> certainly not normal

Yes, it is. It’s a quite useful and frequent construct in the system
areas of Linux and other unixoid systems. Have a look in
/var/lib/ntp/var/lib for a beautiful example - but not with
Konqueror. :slight_smile:

> and in a more normal case you would be very
> confused when you, by clicking on a subdirectory, you ends up in a
> complete different place.

But a symbolic link is not a subdirectory. You should certainly not
be confused when you end up in a different place by clicking on a
symbolic link, because that’s exactly what symbolic links are for.
The problem is that Konqueror presents symbolic links as if they
were subdirectories. That’s what’s causing the confusion.

> Example:
> In the home directory of user test there is a directory
> /home/test/music, which is a symbolic link to /multimedia/audio. Then
> as a user test you start at your Home (/home/test/) and click music.
> Now the address shows /multimedia/audio. When you do not look carefully
> and now click the up arrow you will land at /multimedia/. Surprise!

This can only come as a surprise if the user created that symbolic
link without knowing what he or she was doing. In fact, what you
describe would be the expected behaviour, and I am very surprised
that Konqueror acts differently.

> So the behaviour as we see it is not too strange after all.

Well, I do find it extremely strange to see the same folder
displayed a potentially infinite number of times, suggesting that I
have an infinite hard disk. :slight_smile: I also find it strange to create a
file in one place and find it appearing in many places at once.
Linux has different notions of place (folder) and roadsign (symbolic
link), and confusing the two is, well, confusing.

> All this brings us a bit away from the question: why is this looped
> symbolic link made? IMHO it may have something to do with different
> partners (maybe GRUB and/or LILO among them) think where several files
> are and that this was solved onece and for all by this link.

No, the reason in that case is to be found in the boot process:
/boot can, and in certain configurations has to, be a mounted
filesystem, ie. separate partition. During early boot, before the
filesystems get mounted, files have to be referenced by their path
within the partition, ie. the mount point must be stripped from the
path. So for example, the file /boot/vmlinuz must in that early phase
be referenced as /vmlinuz if /boot is a separate filesystem, but as
/boot/vmlinuz if it isn’t. The symbolic link “boot -> .” in /boot
avoids this distinction because now /boot/vmlinuz works no matter if
/boot is a separate partition or part of the root filesystem.

The reason for the symbolic link in /var/lib/ntp/var/lib is a different
one btw. It has to do with the possibility of running the NTP daemon in
a chroot jail. There are still other reasons for constructs like that,
all quite sensible and logical if you think about them.

HTH
Tilman


Tilman Schmidt t.schmidt@phoenixsoftware.de
Phoenix Software GmbH www.phoenixsoftware.de
Adolf-Hombitzer-Str. 12 Amtsgericht Bonn HRB 2934
53227 Bonn, Germany Geschäftsführer: W. Grießl

Thanks for clearing this one up. This linux noob has had problems with a chainloader error and grub with my 2kpro / 11.0 dual boot machine and after many attempts to repair it I started digging around in the file system. Imagine the “Huh!” factor. Finding a seemingly never ending tree of boot folders all containing mbr, grub, etc… files. Heh, this thread doesn’t solve my problem but it is an interesting trivia item. Thanks guys.

Infinite file loop? That’s interesting. Is there anyway to replicate this in XP?

snapperfishes schrieb:
> Infinite file loop? That’s interesting. Is there anyway to replicate
> this in XP?

Current versions of NTFS support an equivalent concept to symbolic
links (can’t remember the official MS name of the feature) so yes,
that should be possible.

What are you planning? :slight_smile:


Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany

Hi,

As you stated above siting a bug in konqueror. Is this really specific to konqueror, because reading this thread I open up thunar and it is also showing that infinite loop.

It is an infinite loop by design, as Tilman points out, that has been in the structure of *nix for a long time. There is an explanation somewhere in the SuSE documentation.

AFAIK, there is no precise counterpart in Windows. I would be especially carefully before trying to implement such, either in W$ or for that matter Linux, without first studying all the implications.

conram schrieb:
> As you stated above siting a bug in konqueror. Is this really specific
> to konqueror, because reading this thread I open up thunar and it is
> also showing that infinite loop.

No, it’s not specific to Konqueror. Nautilus shows similar behaviour.
I guess it’s a rather common problem among graphical file system
browsers with a tree representation for the folder hierarchy.
They all seem to follow the same simplistic approach of displaying
symlinks as subfolders in the tree.

At least Nautilus displays a symlink differently in its main area,
with a small arrow in one corner of the folder icon.


Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany