Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Symlink at /usr

  1. #1

    Question Symlink at /usr

    I have spent three months with Linux and I need to save space in the root partition because I'm running out of space. If i move /usr folder to another partition where i have a lot of free space and make a symlink to it: will Suse work normally ?

    I dont want to reformatting or similar because i have important things here including programs.

    Thanks.

  2. #2

    Default Re: Symlink at /usr

    Quote Originally Posted by berserkerjmb View Post
    including programs.
    'Programs' under Linux are usually free, and thus may be re-installed without any problem.

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Symlink at /usr

    On 2014-03-06 22:46, berserkerjmb wrote:
    >
    > I have spent three months with Linux and I need to save space in the
    > root partition because I'm running out of space. If i move /usr folder
    > to another partition where i have a lot of free space and make a symlink
    > to it: will Suse work normally ?


    Ugh. I'm not sure.

    Either that or a bind mount.

    > I dont want to reformatting or similar because i have important things
    > here including programs.


    You can have "/usr" on a separate partition of its own, but as a
    symlink... I have never tried it.

    You could try the experiment: using an external rescue disk (I suggest
    the XFCE image from the opensuse download page), rename the usr
    directory to usr.old, and copy it all to the directory you intended to
    use. Then do the symplink, and see if it boots.

    Or rather, a bind mount, I think it is safer.


    If it does not boot, just revert the rename...

    If it boots, keep the rescue media close to that machine. If the system
    needs to go to emergency mode, as it will not be able to access "/usr"
    (and most things live there), it can fail to boot to emergency mode, and
    even if it does, many things will not run.

    A separate "/usr" works because the needed things are in the initrd
    image, but that has only about 20 megabytes. But obviouly many things
    are missing.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,287

    Default Re: Symlink at /usr

    maybe tricky. You must not move anything that maybe need at boot before the partition is mounted.

    I don't know if anything in /usr is need before the fstab mount is done. I know you cant move /etc that has the fstab in it. /tmp is ok I think but there are several directories that are virtual ie do not contain files that live on the disk. There maybe section of /usr that are safe???

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Symlink at /usr

    On 2014-03-07 00:46, gogalthorp wrote:

    > I don't know if anything in /usr is need before the fstab mount is done.
    > I know you cant move /etc that has the fstab in it. /tmp is ok I think
    > but there are several directories that are virtual ie do not contain
    > files that live on the disk. There maybe section of /usr that are
    > safe???


    You can have "/usr" in a different partition. I do.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  6. #6
    Join Date
    Sep 2012
    Posts
    7,100

    Default Re: Symlink at /usr

    Quote Originally Posted by gogalthorp View Post
    I don't know if anything in /usr is need before the fstab mount is done.
    For a start, it needs /usr/bin/mount.

  7. #7
    Join Date
    Nov 2013
    Location
    Kamloops, BC, Canada
    Posts
    4,029

    Default Re: Symlink at /usr

    Quote Originally Posted by berserkerjmb View Post
    I have spent three months with Linux and I need to save space in the root partition because I'm running out of space. If i move /usr folder to another partition where i have a lot of free space and make a symlink to it: will Suse work normally ?

    I dont want to reformatting or similar because i have important things here including programs.

    Thanks.
    Just be sure you have a decent backup before proceeding with any of the suggestions you get. That will save you all the reinstalling and reconfiguring.

    However, keep in mind how quick and easy it is to install openSUSE Linux, how easy it is to access and install the free software applications, and so on. So, mostly when using it, you are really only concerned about saving your important data, not as much worrying about an operating system that takes days to set up after a long install, and even software that takes days to install, update, & get set up properly again.

    I find that reinstalling openSUSE and all my software (and I have a lot of software) takes only about a day or so, including backing up again, where many of my Windows installs would take a week or two of hours-a-day to get back to the point I was at.

    For backing up, you could use Clonezilla. You could generally follow this guide, which is a guide to back up to a USB Flash Key:
    https://forums.opensuse.org/showthre...03#post2623103

    Instead of a flash key, you could always back up to a 2nd HD, or to an external disk, depending on what you have at your disposal.
    "Take a Walk on a Sunny Day, Greet everyone along the way, and Make Somebody Smile, Today"
    Gerry Jack Macks"Walk On A Sunny Day" GerryJackMacks.net

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Symlink at /usr

    On 2014-03-07 03:36, arvidjaar wrote:
    >
    > gogalthorp;2629071 Wrote:
    >> I don't know if anything in /usr is need before the fstab mount is done.

    >
    > For a start, it needs /usr/bin/mount.


    The initrd file is a cpio archive. If you expand it, you see:

    Code:
    ..
    ├── bin
    ├── boot
    ├── config
    ├── dev
    ├── etc
    │   ├── modprobe.d
    │   ├── splashy
    │   │   └── themes -> /usr/share/splashy/themes
    │   ├── sysconfig
    │   │   └── network
    │   │       ├── anterior
    │   │       ├── if-down.d
    │   │       ├── if-up.d
    │   │       ├── providers
    │   │       └── scripts
    │   └── udev
    │       └── rules.d
    ├── lib
    │   ├── firmware
    │   ├── modules
    │   │   └── 3.11.10-7-desktop
    │   │       ├── kernel
    │   │       │   ├── arch
    │   │       │   │   └── x86
    │   │       │   │       └── crypto
    │   │       │   ├── crypto
    │   │       │   ├── drivers
    │   │       │   │   ├── acpi
    │   │       │   │   ├── ata
    │   │       │   │   ├── gpu
    │   │       │   │   │   └── drm
    │   │       │   │   ├── hid
    │   │       │   │   ├── scsi
    │   │       │   │   │   └── device_handler
    │   │       │   │   ├── thermal
    │   │       │   │   └── usb
    │   │       │   │       └── host
    │   │       │   ├── fs
    │   │       │   │   ├── btrfs
    │   │       │   │   └── xfs
    │   │       │   └── lib
    │   │       │       ├── raid6
    │   │       │       └── zlib_deflate
    │   │       └── weak-updates
    │   │           └── updates
    │   └── udev -> ../usr/lib/udev
    ├── lib64
    ├── proc
    ├── root
    ├── sbin
    ├── sys
    ├── tmp
    ├── usr
    │   ├── bin
    │   ├── lib
    │   │   ├── firmware -> ../../lib/firmware
    │   │   ├── systemd
    │   │   └── udev
    │   │       ├── hwdb.d
    │   │       └── rules.d
    │   ├── lib64
    │   │   └── directfb-1.6-0
    │   │       ├── inputdrivers
    │   │       ├── interfaces
    │   │       │   ├── IDirectFBFont
    │   │       │   └── IDirectFBImageProvider
    │   │       ├── systems
    │   │       └── wm
    │   ├── sbin
    │   └── share
    │       ├── splashy
    │       │   └── themes
    │       │       └── default
    │       └── zoneinfo
    └── var
    ├── lib
    │   └── dhcpcd
    ├── log
    └── run
    In that small /usr/bin/, there is of course a "mount". And in
    /usr/sbin/, there is an fsck. I even see "mkfs.btrfs", no idea why
    (because there is no "mkfs.ext3" or any other, for instance).


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  9. #9

    Thumbs up Re: Symlink at /usr

    The reason why i dont want to reinstall SUSE is that i have a lot of software like processing, android sdk, jdownloader, etc that i dont know if i would be able to make them work as they work actually. I will try to see which directories can i symlink and then if I cant boot then I will just insert an usb live and revert my actions. Give me good luck =/ .

    Anyway i think that i will still be able to boot windows from grub ? true ?

    And if you know which directories have no problem with symlink (or bind mount) It will be helpful if you tell me. Maybe the lib, lib64 and share ?

    Thanks for the replies.

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Symlink at /usr

    On 2014-03-07 13:36, berserkerjmb wrote:
    >
    > The reason why i dont want to reinstall SUSE is that i have a lot of
    > programs like processing, android sdk, jdownloader, etc that i dont know
    > if i would be able to make them work as they work actually. I will try
    > to symlink and if I cant boot then I will just insert an usb live and
    > revert my actions. Give me good luck =/ .


    Better than symlink, I think it is better to bind mount. An entry like
    this in fstab:

    Code:
    /data/usr/ /usr   none    bind 0 0

    > Anyway i think that i will still be able to boot windows from grub ?
    > true ?


    Yes, should work fine.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •