5 ms·
Debian putting everything on the /usr
- parent5446 10y agoWhat's the point? Why not do it the other way around and put everything in /bin? It almost feels like /usr is the new root.
- duskwuff 10y ago1. Less disruption. Most software is already installed to /usr. 2. Installing all software to /usr means that /usr can be made read-only when not installing/upgrading software. This isn't possible if installing to the root, as directories like /etc and /var have to be left writable.
- parent5446 10y agoAh, thanks for the quick explanation.
- rhizome 10y ago/etc doesn't generally have to be writable, and in a read-only root environment /var will be on its own slice.
- pkaye 10y agoDo you mean the partition containing /usr will be mounted ad read-only?
- saalaa 10y agoHe said can be made, that's an option.
- xyproto 10y agoNever heard of /usr/etc and /usr/var ...
- deleted 10y ago[deleted]
- gkafkg8y8 10y agoSo, I'm of two minds on this: On one hand, I'd go farther. I like apt, but I wish that distros would use the same packaging system and same package format. There is little value to them being different between distros, it just causes more work for repackaging/deployment/config. Even distros that build everything could all do that the same way, so any distro and its apps could be fully built from source, if the source is available. On the other hand, this isn't great. Having variety in paths, although it's basically security via obscurity like using non-standard ports, is still an additional level of security. And think of all of the existing config/repackaging scripts/etc. that will fail. But, I'm not an admin nor in devops, so I'll defer to those that actually are impacted...
- SwellJoe 10y agoI think you're going to need to explain how /bin and /usr/bin provides more security than just /usr/bin. I don't see how it is at all like changing ports for services. Packages and scripts will not (often) fail because they're adding symlinks from the old locations to the new. Other distros have already made this move, without anyone really noticing. It'll be fine.
- daenney 10y agoOn one hand, I'd go farther. I like apt, but I wish that distros would use the same packaging system and same package format I agree however that's rather off topic. This is not about harmonising between Linux distributions. The fact that other distros did it is merely used as an argument to show it's possible and without any major issues for anyone involved. Having variety in paths, although it's basically security via obscurity like using non-standard ports, is still an additional level of security. No, it isn't. The way you find binaries (when paths aren't hard coded) is by looking through the $PATH environment variable. Both /usr/bin and /bin are part of that on any Linux distro so there is no obscurity or any kind of security gained from this. Though the advantage of having everything in /usr/bin is that /usr can be mounted read-only meaning an attacker will have a much harder time modifying the binaries initially (unless they can do some local privilege escalation and remount the partition). And think of all of the existing config/repackaging scripts/etc. that will fail. They won't. Even those with hardcoded paths to things in /bin won't be affected since usrmerge will provide the symlinks for those binaries. And anything properly written will be searching for binaries through $PATH and be equally unaffected. There's a few crucial tools that will likely need to be updated to be aware of this change but the Debian project will take care of those.
- Sanddancer 10y agoIn my opinion, this is getting rid of a minor historical relic, instead of the major relic of Linux booting. That ugly hack known as initramfs should have been obsoleted at least ten years ago. It was useful back when you had to worry about keeping all your boot files below the 2gb mark on a disk, but these days, all it does is create a second, ephemeral, userland in a more difficult to debug container. Put the various boot binaries into /bin and /sbin, statically linked, and completely visible to even the running system. Cleaning relics should start with getting rid of entire filesystems that just make it harder to administer a system.
- phs2501 10y agoinitramfs isn't (and wasn't) at all about keeping your boot files below the 2gb mark on a disk. It's about actually mounting your root filesystem, either on a fully-modularized kernel where all of your (hundreds of) block drivers are in modules, or where root is coming over a network block device, or a USB disk, or a SAN, or a complex RAID, or an encrypted disk where you need to enter a password or use a hardware token or whatever. Basically, rather than encoding tons and tons of crazy special-purpose logic into the kernel to mount every insane iteration of root filesystem, you just get the bootloader to stick a CPIO image in RAM for the kernel to get at and then use the normal userland tools to do what you want. IMHO, initramfs is the opposite of an ugly hack.
- drvdevd 10y agoThough I take your point and mostly agree, is there any reason this couldn't be done with a static boot binary entirely in RAM? Since the kernel is modular anyway, much of the special purpose cruft loaded by the initramfs could just be loaded and unloaded with a boot script of some kind right? I mean: it could all sit on the same filesystem without having a CPIO image on disk? Grub supports pretty much every filesystem already so loading this initial kernel image from the network or wherever could just start there.
- dfox 10y agoMounting root file system might nowadays conceivably involve some non-trivial userspace code that never even was implemented in kernel space. Few examples: - Searching for root filesystem based on it's contents (in simple case UUID, but mechanisms like "contains this file" are used sometimes) instead of "physical" location - Encrypted root filesystem (requires some kind of UI for entering the passphrase) - LVM2 (which is set of userspace utilities that configure more general kernel modules that know nothing about the actual on-disk format) - while there is slightly hackish kernel support for configuring network interfaces before having userspace and mounting rootfs from NFS, such thing cannot possibly deal with all variants of network configuration (eg. VLANs, 802.1x, ...) and possible network filesystems/block devices. - root on ramdisk, copy-on-write overlay filesystem or something like that. To summarize: it's entirely possible to have the system boot of PXE, authenticate via WPA-EAP on wifi and fetch it's own root filesystem into ramdisk via HTTPS while storing writes onto NFS somewhere. Implementing all which is required for that in kernel space is neither possible nor useful. By the way, the point of initramfs is that it is loaded into memory by bootloader using whatever means the bootloader has and the image does not have to be on rootfs accessible to kernel (for PXE it typically isn't).