Quote:
Originally Posted by jr_bob_dobbs
So I've got a bedrock system set up and working. Manual install, so global is its own strata, as is rootfs. The Bedrock boots, gets net, runs x-windows (including keyboard & mouse input functionality), browses the web and plays audio. So far so good. I've not tested video playback yet but with everything else working the way it is, I can't see why that would not.
|
Excellent, good start.
Quote:
Originally Posted by jr_bob_dobbs
At the moment, the only partitions mounted by the fstab are the "/" partition and the swap partition.
I have a partition that is Fat32, for use in sharing files with windows. I also have a partition used for the permanent /home directory and a miscellaneous files partition.
|
That all makes sense.
Quote:
Originally Posted by jr_bob_dobbs
Now, I can put entries for the above in the global fstab file, that much I understand. There is no need to mount these partitions early, before one picks the init and strata to finish booting from.
|
I'm not sure what exactly you mean by global fstab. There are two fstabs:
- The typical fstab at /etc/fstab
- The Bedrock specific one at /bedrock/etc/fstab
Both are global. That is, all processes see the same thing when they look at either of those paths. If one process messes with one of those files, all the other processes will see the result.
/etc/fstab is intended to be your normal /etc/fstab, nothing special there.
/bedrock/etc/fstab is intended for the weird situation where you need to mount the stratum that provides init. Most distros don't have this because they require the init system to be on the root filesystem, but Bedrock's flexibility tries to offer the choice to have it on another filesystem.
Per the documentation I wrote, either should work. The convention
would be to use `/etc/fstab` since `/home` doesn't need to be mounted before the init, as you mentioned. However, there seems to be an issue between the way Bedrock handles these things and some versions of `mount` that I'm working on narrowing down. Essentially, Bedrock mounts something to `/home`
before `/etc/fstab` is read with the expectation that mount will read `/etc/fstab` and mount over the preexisting mount. However, some `mount` versions see the existing mount and just silently skip the `/etc/fstab` entry. As a work around, you could either:
- Put a `mount` line in `/etc/rc.local` (or whatever your init's equivalent is). Something like `mount /dev/sda2 /home`. That should then mount *over* the existing mount as originally intended
- Put a fstab line in `/bedrock/etc/fstab`. This will be mounted before Bedrock does its own mounts and avoids the confusion. As you mentioned, it shouldn't normally be necessary to do this.
I plan to rework the relevant bit of documentation soon (hopefully tomorrow) now that I understand what the actual issue is. I also have thoughts on how to remedy it for the upcoming release.
Quote:
Originally Posted by jr_bob_dobbs
However...
My understanding of the Bedrock documentation is that since global is not rootfs, /home should be mounted to /bedrock/strata/global/home, not to /home. in the fstab. The default framework settings will then ensure it is accessible in the other strata. The idea is that it will appear as /home once booted into bedrock?
|
When Bedrock is actively running, assuming nothing is wrong, global paths should be the same for all strata. Every process will see the same thing at /home. When the system is powered off, the bits are only going to be in one place, though, which with your described setup is /bedrock/strata/global/home. Generally, you want to interact with global files without the `/bedrock/strata/<strata-which-provides-global>` prefix. If you want to edit your vimrc on a Bedrock system, the convention would be to edit `/home/<username>/.vimrc` rather than worry about `/home/strata/global/home/<username>/.vimrc`. This pattern includes mounting - if you mount something into `/home/<username>/dvddrive` all processes will see the mounted files at `/home/<username>/dvddrive`. You *can* use `/bedrock/strata/global` for these things as well, but only situationally; the `/bedrock/strata/` path isn't infinitely recursive and will give you something different in some situations for global paths. It's only guaranteed to be useful for local ones.
Mount points mounted by `/bedrock/etc/fstab` is a bit weird, though, as they are mounted
before Bedrock sets up all the global share stuff. I'm actually not sure whether a line in `/bedrock/etc/fstab` would prefer `/home` or `/bedrock/strata/global/home`, or if it even makes a difference. You may need to guess and check, and just try the other one if the first doesn't work. Or use `/etc/rc.local` as I mentioned above, which would then work with either but `/home` would be the convention.
Quote:
Originally Posted by jr_bob_dobbs
A second question, does a "share = /home" need to be added to the default framework section of the /bedrock/etc/strata.conf file? Or no?
|
It's already there. If it wasn't, though, yeah - you'd add a new `share` entry.
Quote:
Originally Posted by jr_bob_dobbs
Or would it instead be "share = /bedrock/strata/global/home"?
|
It'd be `share = /home`. The value there is a path that should look the same from the point of view of all processes, which is what you care about. The fact the actual bits on disk happen to be in `/bedrock/strata/global/home` when the power is off isn't of much consequence most of the time. You've already configured which stratum provides global elsewhere - Bedrock looks that up when it sets up `share =` items.
Quote:
Originally Posted by jr_bob_dobbs
A third question: to mount the actual windows ntfs partition requires me specifying ntfs-3g (fuse) like so:
/dev/sda1 /win7 ntfs-3g fmask=111,dmask=000 1 0
My understanding is that the global fstab is interpreted by the busybox mount command, not the chosen strata's mount. If this is so, will the use of ntfs-3d (fuse) be parsed OK?
|
Again, I'm not sure which fstab you mean by "global fstab". /bedrock/etc/fstab is interpreted by busybox and
may not understand ntfs-3g. I'm not sure how ntfs-3g is implemented.
/etc/fstab is interpreted by the stratum you select to provide init and should support ntfs-3g fine if the corresponding distro would normally support it.
Bedrock doesn't do anything to make `/win7` global. Only the stratum that mounts it will be able to access files in there by default. You
could edit the default framework to add a `share=` field for it, although then you have the headache I described above with `/home`. Another option would be to put it in `/mnt`, e.g. `/mnt/win7`, if that's not a problem for you workflow/muscle-memory. `/mnt` is
global by default and it's not mounting directly on top of another mount point so the mount/fstab confusion won't happen (as its mounting in a subdirectory instead).
Quote:
Originally Posted by jr_bob_dobbs
Thank you.
|
Happy to help
Nyla's handle of this whole area is, IMO, overly complicated and easily confused. Let me know if that didn't make sense and I can try to rephrase. I'm planning on completely reworking this for the upcoming release to be much simpler, plus provide more examples in the documentation.