Welcome! Log In Create A New Profile

Advanced

Clone Root USB Stick - Password Issue

Posted by malcolmslaney 
Clone Root USB Stick - Password Issue
February 24, 2011 03:11PM
I am very happy that I got my DockStore working with Debian. Thank you!

But I didn't start with a big enough memory stick. I bought a new one, and figured out how to clone the drive. (Rsync worked, but copy -ax didn't... it was hard to get the special devices in /dev copied over...)

The new stick boots, but I can't log in.

SSH complains that the SSH key has changed. I'm not sure why. But I can edit my local copy of known_keys and get around that problem.

More importantly, I can't login to either my personal account or the root account on the new image. Both /etc/password and /etc/shadow are there, but login doesn't work.

I don't know if the two problems are related. Seems like neither one should be an issue, but it seems strange.

Is the HASH somehow dependent on the file system? Copying the files should be safe. But yet it's not.. Any ideas?

- Malcolm
John Doe
Re: Clone Root USB Stick - Password Issue
February 24, 2011 04:18PM
The host key is part of the configuration and should have been cloned with the system, so there should be no warning when you connect. If there is a host-key warning, then the cloned system probably hasn't started. Try to log in as root with the password stxadmin. If that works, then the original Pogoplug OS is running.
Re: Clone Root USB Stick - Password Issue
February 26, 2011 09:50AM
Copy it on another linux system with dd. Pop it in your original but don't mount it. Also pop in a second larger one. Use dd to make a full image of the device (it'll copy both partitions, assuming you have the swap partition) to the new device, with dd if=/dev/sdb of=/dev/sdc. Just be damn sure you know which stick is which device so you don't copy the wrong way, overwriting your boot disk.

Alternatively you could write an image to another filesystem first and then copy that image to the other stick to be safe.
pop in original stick
dd if=/dev/sdb of=/path/to/disk.img
remove original
pop in new stick
dd if=/path/to/disk.img of=/dev/sdb
done

You will then need to use parted to delete the swap partition and grow the ext2 partition (again assuming you have the standard two partition configuration.) After you grow the ext2 partition, you can then either add a new swap partition or use a swapfile instead.

If you don't have a linux desktop system, you can boot a live disk image, like knoppix. It should include gparted which is a nice gui version of parted. You could probably also use something like clonezilla or PING.

On windows, there's a tool called USBIT (USB Image Tool). But then you still have the problem of needing something to change the partition table. I'm sure there are tools for that, but I don't know of any to recommend.
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: