Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 70

Thread: Unnecessary var, tmp, and usr Partitions.

  1. #21
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Unnecessary var, tmp, and usr Partitions.

    Quote Originally Posted by Pjotr123 View Post
    Often there are many ways to achieve a goal, neither of which is wrong.... As in this case. You can choose the one you like best.

    Personally, I tend to favour the way that I think is the most simple. Simple systems are the most reliable and bother-free in the long run, is my experience...
    What they said.

    Quote Originally Posted by BlinkinCat View Post
    Thanks Pjotr123 - I will take what you say onboard, however as I was relying on CharlesA to get rid of /usr, /var and /tmp I will wait to get further input from him. Even in the short discussions on this thread we have differing viewpoints, which only tend to confuse matters to me. It seems with all of the available documentation there are still issues of non-standardization. I am leaning towards reducing the partitions by three, If I can achieve that I believe I will be content - but time will tell.

    Thanks to dino99 also.

    Cheers -
    This will be.. interesting. I found this: http://outhereinthefield.wordpress.c...her-partition/

    But I do not know if it will be all that helpful.

    I would recommend doing the next part from a livecd instead of a running system, so there is nothing writing to the partitions while you move things around. It would also be a good idea to backup the stuff in /home because messing with partitions isn't foolproof.

    Once you have booted off the livecd, run these commands from a terminal:

    Code:
    cd && mkdir root tmp boot usr var
    
    # Mount /
    sudo mount -t ext4 UUID=a50390f0-0910-48db-9941-89a0ab7ffa29 ~/root
    
    # Mount /tmp
    sudo mount -t ext4 UUID=f5707e5c-41a3-4e55-97aa-ea5f48f75767 ~/tmp
    
    # Mount /boot
    sudo mount -t ext4 UUID=3ac4709e-9e4d-4a5b-9da5-d88f78e35402 ~/boot
    
    # Mount /usr
    sudo mount -t ext4 UUID=6d64bcaf-c555-400b-b8bc-7516d0b3fdf3 ~/usr
    
    # Mount /var
    sudo mount -t ext4 UUID=51c8465d-0f8c-407a-9c0c-11c610aaea6b ~/var
    Verify with df -h and/or blkid:
    Code:
    df -h "should" look like this:
    
    /dev/sda1       9.2G  1.3G  7.6G  14% /home/ubuntu/root
    /dev/sda6       9.2G  150M  8.6G   2% /home/ubuntu/tmp
    /dev/sda2       463M  147M  293M  34% /home/ubuntu/boot
    /dev/sda3       7.4G  3.3G  3.8G  47% /home/ubuntu/usr
    /dev/sda5       3.7G  731M  2.8G  21% /home/ubuntu/var
    Once you have verified that is right, proceed with the copy - I added the dry-run switch so you can verify the copy will work before actually doing it for real.

    Code:
    # Copy
    sudo rsync -ai --dry-run ~/tmp ~/root/
    sudo rsync -ai --dry-run ~/boot ~/root/
    sudo rsync -ai --dry-run ~/usr ~/root/
    sudo rsync -ai --dry-run ~/var ~/root/
    Verify with ls

    Comment out the lines that are mounting /tmp, /boot, /usr and /var in fstab:

    Code:
    nano /home/ubuntu/root/etc/fstab
    unmount everything and you should be good to go to reboot.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  2. #22
    Join Date
    Nov 2008
    Location
    uk
    Beans
    131
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Unnecessary var, tmp, and usr Partitions.

    I would like to search out some books that would help me with the various aspects of Linux.
    Personally I would not bother buying books on Linux, which are usually written for a very broad audience and they are frequently not up-to-date with current develoments. I suggest that you borrow one or two from the library, or from Linux-using friends. Save your cash for some hardware.

    In my opinion it is much easier (and cheaper) to use online tutorials and forums such as UF to access the specific area or problem you need to target.

    These are just a few:

    Guide to Ubuntu 12.04:
    http://ubuntuguide.org/wiki/Ubuntu_Precise

    Command line:
    https://help.ubuntu.com/community/UsingTheTerminal

    Package management with APT:
    https://help.ubuntu.com/community/Ap...ct=AptGetHowto

  3. #23
    Join Date
    Aug 2011
    Location
    Melbourne, Australia.
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Unnecessary var, tmp, and usr Partitions.

    Hi Charles, I really appreciate your help, -

    I will back up as much as I can.

    I am a little confused about "how I Unmount everything"

    Could you give me an example please ?

    Edit - For Example, would I Unmount / like this ?

    sudo umount -t ext4 UUID=a50390f0-0910-48db-9941-89a0ab7ffa29 ~/root

    Also, how do I operate the "dry-run" switch ?
    Last edited by BlinkinCat; January 11th, 2013 at 05:04 PM. Reason: Added Edit.
    PopularPages: A very handy Documentation Search Tool used by many.
    PopularPages Wiki Thread
    My New Blog

  4. #24
    Join Date
    Aug 2006
    Beans
    144

    Re: Unnecessary var, tmp, and usr Partitions.

    I'm old school unix and would still put var and perhaps tmp on their own partitions.

    The only reason I would suggest redoing it is if you did not put /home on it's own partition.

    Keeping your home directory on a unique partition will let you get through many upgrades of ubuntu without loosing your stuff. I've had the same physical home directory since version 9 and I have never "upgraded".. I've always formatted the system partitions.

  5. #25
    Join Date
    Aug 2011
    Location
    Melbourne, Australia.
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Unnecessary var, tmp, and usr Partitions.

    Quote Originally Posted by jbeiter View Post
    I'm old school unix and would still put var and perhaps tmp on their own partitions.

    The only reason I would suggest redoing it is if you did not put /home on it's own partition.

    Keeping your home directory on a unique partition will let you get through many upgrades of ubuntu without loosing your stuff. I've had the same physical home directory since version 9 and I have never "upgraded".. I've always formatted the system partitions.
    Thanks for your comments jbeiter - to be honest I am a little confused about the right way to go although it seems the majority these days favour a trimmer system. I haven't started the alteration yet, until I get my questions answered by CharlesA. I am definitely retaining /home.

    Cheers -

    Edit - Thanks to forkandles for his links too! They look great!
    Last edited by BlinkinCat; January 11th, 2013 at 05:22 PM. Reason: Added edit.
    PopularPages: A very handy Documentation Search Tool used by many.
    PopularPages Wiki Thread
    My New Blog

  6. #26
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Unnecessary var, tmp, and usr Partitions.

    Quote Originally Posted by BlinkinCat View Post
    Hi Charles, I really appreciate your help, -

    I will back up as much as I can.

    I am a little confused about "how I Unmount everything"

    Could you give me an example please ?

    Edit - For Example, would I Unmount / like this ?

    sudo umount -t ext4 UUID=a50390f0-0910-48db-9941-89a0ab7ffa29 ~/root
    sudo umount /path/to/mountpoint, so it would look like this when you are done:

    Code:
    sudo umount /home/ubuntu/tmp
    sudo umount /home/ubuntu/boot
    sudo umount /home/ubuntu/usr
    sudo umount /home/ubuntu/var
    Also, how do I operate the "dry-run" switch ?
    You can run a dry-run first, where it will tell you what it will do, but not actually copy anything, when you are sure it looks right, you can remove -dry-run and it will copy everything where you tell it to.

    I would unmount everything except ~/root and run df -h to make sure everything copied ok before unmounting it. Be sure to edit fstab before you unmount /root
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  7. #27
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Unnecessary var, tmp, and usr Partitions.

    Quote Originally Posted by Pjotr123 View Post
    In my opinion a separate /home is useless, because for real safety you need an *external* backup of your valuable files anyway. On an external medium, like an external USB hard disk.
    Obviously from my earlier post in this thread I disagree that a separate /home is useless, but I don't consider it to be in any way associated with "real safety." My purpose for having it is to permit me to do a (semi)clean install of a new long-term-support version every few years without having to copy dozens of gigabytes of virtual machine files back from backups.

    Since BlinkinCat has not dozens, but hundreds, of GB of video files there, that's adequate reason for him to keep one also.

    For safety, nothing can replace an external backup, but for such a large partition flash drives aren't really practical. Only an external hard drive, at least as large as the one in the main machine, will do. It can connect via USB and if reformatted to a Linux file system such as ext4 will do a great job. From the store, such drives are usually formatted as NTFS to be compatible with Windows, and this system won't preserve all Linux file attributes -- but even without reformatting, the drive can hold your data including video safe...
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  8. #28
    Join Date
    Aug 2011
    Location
    Melbourne, Australia.
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Unnecessary var, tmp, and usr Partitions.

    Quote Originally Posted by CharlesA View Post
    sudo umount /path/to/mountpoint, so it would look like this when you are done:

    Code:
    sudo umount /home/ubuntu/tmp
    sudo umount /home/ubuntu/boot
    sudo umount /home/ubuntu/usr
    sudo umount /home/ubuntu/var
    You can run a dry-run first, where it will tell you what it will do, but not actually copy anything, when you are sure it looks right, you can remove -dry-run and it will copy everything where you tell it to.

    I would unmount everything except ~/root and run df -h to make sure everything copied ok before unmounting it. Be sure to edit fstab before you unmount /root
    Thanks Charles - that helps a lot - I will be taking the plunge shortly -
    PopularPages: A very handy Documentation Search Tool used by many.
    PopularPages Wiki Thread
    My New Blog

  9. #29
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Unnecessary var, tmp, and usr Partitions.

    Quote Originally Posted by JKyleOKC View Post
    Since BlinkinCat has not dozens, but hundreds, of GB of video files there, that's adequate reason for him to keep one also.

    For safety, nothing can replace an external backup, but for such a large partition flash drives aren't really practical. Only an external hard drive, at least as large as the one in the main machine, will do. It can connect via USB and if reformatted to a Linux file system such as ext4 will do a great job. From the store, such drives are usually formatted as NTFS to be compatible with Windows, and this system won't preserve all Linux file attributes -- but even without reformatting, the drive can hold your data including video safe...
    +1. I have my server backed up to external media daily/monthly as well as to the cloud, so I have an offsite backup.

    However, I only back up my RAID array, not my home directory because I store anything important on the RAID array.

    Quote Originally Posted by BlinkinCat View Post
    Thanks Charles - that helps a lot - I will be taking the plunge shortly -
    Good luck!
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  10. #30
    Join Date
    Aug 2011
    Location
    Melbourne, Australia.
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Unnecessary var, tmp, and usr Partitions.

    Hi again Charles,

    One more thing - do I unmount root like sudo umount /home/ubuntu/root ?

    It has become a little confusing to read with all the spread out posts -

    With kind regards BlinkinCat.
    PopularPages: A very handy Documentation Search Tool used by many.
    PopularPages Wiki Thread
    My New Blog

Page 3 of 7 FirstFirst 12345 ... LastLast

Bookmarks

Posting Permissions

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