[conspire] Creating Home Partition
Rick Moen
rick at linuxmafia.com
Thu May 3 17:20:29 PDT 2007
Quoting John Andrews (jla1000 at comcast.net):
> I want to create a Home partition on my computer. I found a good article
> on how to do it. I'm going to shrink Hdb1 and create a new 10 gb free
> space.
By "free space", I assume you mean "allocated to a new filesystem
(partition) to be mounted as /home".
The article shows it being created as a logical partition. However
> when I do it using gparted the 2 choooses are primary and extended and
> logical is grayed out.
> Hdb1 Kanotics 17gb
> Hdb2 Swap 500 mb
> Hdb3 Ubuntu 20gb
> I read that logical partitions are contained within extended
> partitions. Should I use primary or extended for the free space.
Since you're aiming to have only four filesystems total, on that
physical drive, make life easy for yourself, and stick to primary.
1. Boot a maintenance disk (e.g., live CD).
2. Use your favourite tool to nondestructively shrink /dev/hdb1, leaving
some unallocated space on /dev/hdb.[1]
3. Using /sbin/fdisk (or whatever), create new filesystem /dev/hdb4 of
class primary, allocating all of that room to it. Save, and exit
fdisk.
4. "mkfs.ext3 /dev/hdb4".
5. "mkdir /mnt/oldroot /mnt/newhome"
6. "mount /dev/hdb1 /mnt/oldroot"
7. "mount /dev/hdb4 /mnt/newhome"
8. "mv /mnt/oldroot/home/* /mnt/newhome"
Check that dotfiles and dotfile directories didn't get left
behind in /mnt/oldroot/home/ . If they did, move them, too.
9. "$EDITOR-OF-CHOICE /mnt/oldroot/fstab", adding a line like:
/dev/hdb4 /home ext3 nodev,nosuid 0 2
10. Reboot.
More information about the conspire
mailing list