Thread: Resizing /usr
View Single Post
  #9   (View Single Post)  
Old 18th November 2010
jewsofeast jewsofeast is offline
Port Guard
Join Date: Nov 2010
Posts: 26

Originally Posted by jggimi View Post
Step-by-step instructions for "resizing" /usr, using /home as a temporary storage facility. Warning: This is just typed up here for your convenience, just now. I have not -tested- this procedure as written, and may have made a mistake. Or two. Hint: If you blindly copy/paste these commands without understanding them, you are likely to get into trouble.
  1. Boot in single user mode. At the boot> prompt, enter "-s".
  2. Back up the existing /usr. It is assumed that /usr and /tmp and /home are defined in fstab(5):
    1. # mount /tmp
    2. # mount /home
    3. # dump -0af /home/usr.dump /usr
  3. Delete and recreate your /usr partition using disklabel(8) and newfs(8). This assumes you have the desired free space, and that the existing partition is on wd1d:
    1. # disklabel -E wd1
    2. d d
    3. a d
    4. [select your starting LBA]
    5. [select your size]
    6. [press ENTER to take the default FFS partition type]
    7. q
    8. # newfs wd1d
  4. Restore /usr from backup
    1. # mount -o async,noatime /dev/wd1d /usr
    2. # cd /usr
    3. # restore -rf /home/usr.dump
    4. # rm restoresymtable
  5. Reboot
    1. # reboot
Thanks mate, I will give it a rip in arvo.

I know swap can save life but i am on i386 atm and that doesnt read my complete ram. I will resize '/home' and put the swap at the end of the disk.


Reply With Quote