Jan 24, 2008

Copying Home Folder

I know this next line needs a lot of explanation, but the resulting tar commandline is one line:

mount /dev/hda5 /newhome;cd /home;tar cvf - .|(cd /newhome;tar xvf - .);umount /newhome;mount /dev/hda5 /home


OK. No panic. I will explain. The "mount /dev/hda5 /newhome" just mounts the newly created partition (I suppose for the sake of simplicity the the newly created partition is hda5). That step is not required at all if you used diskdrake to create the partition, and you clicked the mount button after you created the partition. The "cd /home" means change to the /home directory (similar in effect to selecting a directory in the file manager).

Now the meat: "tar cvf - .|(cd /newhome;tar xvf - .)" This means create, on stdout, a tar archive of the current working directory (i.e /home since in the previous cd instruction we selected the /home as our current working directory) and pipe the created tar file into the second tar instruction which will untar stdin into its current working directory which will be /newhome in this example.

After that we unmount the partition from the /newhome mount point "umount /newhome" and remount it on /home: "mount /dev/hda5 /home"

After that the only thing we have to do edit the /etc/fstab telling the system on the next reboot that our /home directory structre is not part of the / partition anymore but it is a separate partition. The linux command to do this:

echo "/dev/hda5 /home auto defaults 0 0">>/etc/fstab


The >> sign is a special form of redirection meaning append the output to the end of the file (concatenate).

I know, I know a lots of talk, but believe me it is a lot easier to explain (and do) this using the terminal than it would be writing a step by step instruction how to do this with the GUI: clicking here clicking there, dragging from here dropping to there...

Labels:

Jan 15, 2008

Virtualbox Installation on PCLOS 2007


While installing package dkms-virtualbox-1.5.2-1pclos2007:

+ /usr/sbin/dkms --rpm_safe_upgrade add -m virtualbox -v 1.5.2-1pclos2007

Creating symlink /var/lib/dkms/virtualbox/1.5.2-1pclos2007/source ->
/usr/src/virtualbox-1.5.2-1pclos2007

DKMS: add Completed.
+ /usr/sbin/dkms --rpm_safe_upgrade build -m virtualbox -v 1.5.2-1pclos2007

Running PCLinuxOS DKMS build routine. Please Wait....

Building module:
cleaning build area....
make KERNELRELEASE=2.6.22.10.tex1 -C /lib/modules/2.6.22.10.tex1/build M=/var/lib/dkms/virtualbox/1.5.2-1pclos2007/build......
cleaning build area....

DKMS: build Completed.
+ /usr/sbin/dkms --rpm_safe_upgrade install -m virtualbox -v 1.5.2-1pclos2007
Running module version sanity check.

vboxdrv.ko.gz:
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/2.6.22.10.tex1/kernel/3rdparty/vbox/

depmod.....

DKMS: install Completed.
+ /sbin/modprobe vboxdrv
+ /usr/share/rpm-helper/add-service virtualbox 1 virtualbox

Labels: , ,