[KPhotoAlbum] How to make share auto mount on system start

Shawn Willden shawn-kimdaba at willden.org
Mon May 7 04:23:35 CEST 2007

(Note:  I CC'd the list, on the theory that you didn't mean to send only to 
me, and that others might have suggestions as well.  Excuse me if you 
intended this to be a private conversation).

On Sunday 06 May 2007 02:44:04 pm Neil Paisnel wrote:
> Hey, that is a great idea, but for me at the moment will have to wait till
> I acquire another machine and set that up, or can clone the HDD on this
> machine to a bigger HDD.  The HDD on here is only 20Gb, and I have well
> over that in photos.  Any easy way to clone the main drive in linux?  In
> Windows I have a drive image/clone backup utility that makes the job easy,
> but what do I use in Kubuntu/linux?

Couple of ways.  Simplest is if you can put both drives in the computer.  If 
you can do that, just partition and build the file systems you want on the 
new drive, then mount the new dive somewhere convenient, like /mnt and then 
use cp -a (as root) to copy from your root file system to the new file 

If you can't put both drives in one machine, there's a fairly simple way to 
ship the data over a network connection.  The basic idea is that you "tar" 
the data from the source machine, but rather than writing it into a file, you 
send the tar data to stdout and then pipe it to netcat, which is like cat but 
over TCP.  On the other end you pipe from netcat into tar and unpack the 

So, the sending side looks like:

	tar cvf - / | nc <remote IP> <port>

And the receiver looks like:

	nc -p <port> -l | tar xvf -

After you have all of the files copied over, all that's left is to make your 
new drive bootable.  Again, there are a few options, but the easiest is 

1.  Shut down the machine and swap drive cables so the machine will boot off 
of the new drive.
2.  Boot the machine on your Ubuntu LiveCD
3.  Start a terminal window and use it to mount your drive somewhere 
convenient (like /mnt).
4.  Run "grub-install --root-directory=/mnt"
5.  Unmount the new drive and reboot without the LiveCD.  It should boot 

Note that there probably are ways to do most or all of this from the GUI 
rather than the command line, but I've never felt any need to look.

> I think I see how you would enable rsync and create the conf file after
> reading the example conf file, but am unsure on a couple of points
> How do I check if Cygwin has the rsync package selected?  I have it
> installed from when I was looking at trying to complie KPA for windows but
> no idea if rsync was with the package.

Run the cygwin setup program again.  You can use that to install more 
packages, or update the ones you have.

> Also how to create a shell script in windows to take the command you
> suggested for the sync operation?

Just create a file with the command in it as the second line.  The first line 
should be "#!/bin/sh".  You might also have to use chmod +x to make it 
executable.  As for how to create the shortcut... sorry, it's been way too 
long since I was forced to muck with Windows for me to remember that :)  
maybe someone else can help.


More information about the KPhotoAlbum mailing list