symlinks can be powerful tools
|
Author | Content |
---|---|
gus3 Sep 27, 2010 11:30 AM EDT |
Sure, they have their common uses, like mirroring the directory structure of the Xorg source code, or relocating configuration files under /etc. But I like the ability to point /boot/vmlinuz to /usr/src/linux/arch/i386/boot/bzImage (which itself contains a symlink at /usr/src/linux). Since /boot isn't in its own volume, Grub's ext2 stage will merrily trace the path I provide, until it finds the kernel image. No more of this "copy to /boot, cd to /boot, erase symlinks, provide new symlinks" stuff; the only symlink to adjust is at /usr/src/linux, to point to the new source tree. Once I have the kernel built and the modules installed, I can reboot immediately to try the new kernel. |
azerthoth Sep 27, 2010 7:12 PM EDT |
Nice trick. You can find them in my systems, which end up with 3 or 4 installs at a time using them to link storage partitions into user accounts. They get mounted in /mnt/ then linked to where ever I want them, I never have to think about it as the fstab entry stays the same for them regardless what install I'm booted into. btw have I mentioned I despise grub2, autodetect that doesnt, and 40_custom which some distros refuse to protect so thusly gets overwritten? |
gus3 Sep 27, 2010 7:14 PM EDT |
@az: If you're using Ext2/3/4, look into "chattr +i". |
azerthoth Sep 27, 2010 7:17 PM EDT |
will do, thanks. Anyone else have handy uses for symlinks? |
Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]
Becoming a member of LXer is easy and free. Join Us!