Page 3 of 3

Re: Wrong Disk names

PostPosted: Wed Oct 10, 2012 8:36 pm
by jbv
Hi Steen,

Glad to hear it. I'm pretty sure I know what did it. Having a hectic week professionally, so please give me a night or two to confirm, and I will report back.

Cheers, Brenton

Re: Wrong Disk names

PostPosted: Thu Oct 11, 2012 8:26 pm
by jbv
Hi Steen,

The only thing I did that would have really changed anything during start-up was to remove /etc/mtab from your snapshot.

Please remember that I am far from a Linux expert or professional and have only been playing with it for about a year now. What I think was happening was ...

I think the /etc/mtab file is sort of like a working copy of /etc/fstab that is built and maintained by the system from /etc/fstab, which is where you would traditionally place your fixed mount points that you want the system to load during start-up. As FoxyRoxyLinux is a "live" system, it can not and does not have an etc/fstab. This is what allows it to basically wake-up and start working. When it wakes-up, it creates it's own /etc/mtab which is what the actual mount points are. If it did have an etc/fstab it would use that, although this would also tie it to the specific machine layout with regard to disk drives, mount points etc. So, while your snapshot contained an /etc/mtab I think that when the system woke-up, it may have either used the /etc/mtab from the snapshot, or just having it there was creating confusion if the physical devices did not exactly match those in the "mtab" file.

What I think was/is also happening is what I see on my USB ports. While you have found the one USB port on your machine that always gets initialised as the "Boot" port, I have not. On the FoxyDevelopment machine, I think this is one of Front Panel USB ports, that I have not made a header for yet. Basically, it seems to me that with the exception of this special USB port, the other USB ports appear to be mounted in the sequence they are found in and this also ties into the start-up time of the USB device that is plugged into the port at power-up. With the playing I have done to date, I can say that USB sticks all seem to initialise at slightly different times (some of these timing differences could be micro-seconds). What I mean by this is that for one power-up a USB stick may become operative and be enumerated first, but on the next power-up it may be the second or third device seen and enumerated. This then seems to have an impact on exactly where in the /dev chain that the socket is assigned to. In turn, this would affect the low-level mount point. Combine these things with the way we try to mount USB sticks into the /media directory by Label, and I think you can see how things could get pretty ugly, pretty quick.

Basically, I think a race-condition at power-up, combined with the existence of the mtab file was wreaking havoc, which is also why I think we end up with devices actually being mounted by their UUID (a unique to every USB device serial number), then the label mounting stuff try's to do it's best, but can't. This was somewhat confirmed by looking at the dmesg file and some of the backup dmesg files that were also in the snapshot.

While I may have some of the specifics wrong in the above description, I am pretty sure that this is sort-of-kind-of what is going on. Sadly, this is another area where (within Unix/Linux) there have been so many changes over the years (and so many different ways of doing stuff), knowing what version of what document to read is really frustrating if not impossible, so all I can do (have done) is try to read what I can, and then make sense out of what I see.

I hope this helps and sort-of explains what was/is going on.

If you run the 95-clean script over your 95-snap it will remove the mtab file and some other things that start to tie things to a specific hardware configuration. However, as with all of the scripts, please look at them with a text editor first. Try to see what it will do, and turn on/off options that you think are appropriate for your intentions.

Cheers, Brenton