Moving Home

Here is what I have done in my friends Fedora MAC. During installation, I insert the name afiq. Actually his name is afif. Huhuhu. Plus, I install fedora move one of his partition files to another, then I format it to an ext 4 type. Before this was ntfs.


#su

#blkid
Make sure you copy the uuid of the intended partition or remember the label will do.




#mkdir /mnt/home
#mount -t ext4 /dev/sda6 /mnt/home

#init 1

#cd /home

#cp -ax * /mnt/home

3 syntax below is to change user afiq to afif. Due to mistakes during installation.
#usermod -l afiq afif
# mv /mnt/home/afiq /mnt/home/afif
#usermod -d /home/afif afif

#nano /etc/fstab



Insert a new line either with putting in your uuid or label name. So, with nano insert your partition id follow by directory type of partition actions and 1 1 dump(1=on) and fsck(1=normal) options.

#shutdown -r now

After reboot
#mkdir /home/backup
#mount /dev/sda4 /home/backup
#cd /home/backup/home/
#rm -f -r afif

Key:-
su become root
blkid block device id
mkdir  make directory
init initialization (init 1 single user mode; init 5 to gui mode)
cd change directory to
cp copy

  • a same as dpR (d same as --no-dereference --preserve=link; p same as --preserve=mode,ownership,timestamps; R copy directories recursively)
  • x stay on this file system
  • * wildcard meaning all (if *.bat all with .bat)
usermod modify user
  • l user login
  • d home directory
nano open up a nongui text editor

Comments

Popular Posts