Welcome! Log In Create A New Profile

Advanced

How to transfer Debian installed on USB stick to HDD

Posted by archat68 
archat68
How to transfer Debian installed on USB stick to HDD
September 04, 2010 11:04AM
I'm a newbie to Linux but successfully installed and configured Debian on the USB stick on my Dockstar with the help of this forum and another member Varkey from another tech forum Techenclave.

I now want to transfer the installed Debian to an external HDD without reinstall. Will a simple copy/paste of the whole file system do -or I need to do something else?

Pls. advice!!
Re: How to transfer Debian installed on USB stick to HDD
September 04, 2010 05:19PM
I am not a linux expert either so I cannot tell if the method you described will work or not. Below is the way I did for transferring the root system installation on an USB to a HDD. It has been tested working.
1. Back up the usb root partition on a PC. On a linux box, I used partimage. On a Windows, I used Acronis True Image. Other back up software should also work but these were what I use. (Acronis has an advantage to be able to reinstall on a partition smaller than the original one but it is probably not important in this case.)
2. Partition the HDD on a linux box to contain at least two partitions using fdisk. The first one should be large enough to contain the USB stick's root system and formatted as ext2 or ext3 using mkfs. The last partition should be formatted using mkswap as swap, which should be 256MB or larger for Dockstar. You could have additional partitions to contain data after you properly mount it. To begin with, it is probably good enough to have two partitions.
3. Restore the backup image to the first partition on HDD. That's it.
There might be better way to do the transferring but at least the approach described above will work.
Hope this helps.
Re: How to transfer Debian installed on USB stick to HDD
September 14, 2010 09:00AM
simple:

1.- mount your devices on your usual GNU/Linux computer:

eg: /media/USB and /media/harddrive

and as root: rsync -av /media/USB/ /media/harddrive/
(do not forget the terminal sign /)

Unmount.
Plug the harddrive.

The partition scheme should be the same for swap (default sda2) and root (default sda1) partitions.
But you can change that easily under pogoplug.

Eg: for sda2 (/)
#fw_setenv usb_root /dev/sda2
#fw_setenv usb_device 0:2
0 -> first USB detected device by the Dockstar 0 = sda 1 = sdb ...
2 -> 2nd device partition, sda2

You'll be able to go for ext3 if you've had journalising with tune2fs -j
#fw_setenv usb_rootfstype ext3



Edited 2 time(s). Last edit at 09/14/2010 09:14AM by Sagittarius.
ano
Re: How to transfer Debian installed on USB stick to HDD
September 26, 2010 03:58PM
thx Sagittarius! small addition to your howto:

if fw_setenv doesn't work on the pogoplug (/usr/sbin not in $PATH), use /usr/sbin/fw_setenv ...

after rsync, check /media/harddrive/etc/fstab:
# /dev/root = /dev/sda1
/dev/root      /               ext3    errors=remount-ro 0       1
/dev/sda2      none            swap    sw                0       0

create/activate swap after first harddisk boot:
mkswap /dev/sda2
sync; sync; sync
swapon /dev/sda2



Edited 1 time(s). Last edit at 09/26/2010 05:07PM by ano.
Re: How to transfer Debian installed on USB stick to HDD
October 24, 2010 10:48AM
i just tried to move my debian install from a stick to a hdd.

i formated the hdd the same way as my stick is.

/dev/sda1 = root (formated in ext3 instead of ext2 now)
/dev/sda2 = swap

the sizes are different ofc.

rsync worked fine. i tried to boot from it. but my dockstar boots automatically to jeff's rescuesystem.
is there anyway to get my dockstar boot from my hdd :x
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: