It always happens: your HD fills up and you have to move everything to a new, bigger one.
Well, yes there are clone tools, but sometime you just want the damn thing and of course you don’t need to install software or find that special CDROM or DVD-R with what-was-that-program-name? …. ;-)

Moreover if you have a virtual machine you want to clone, you probably wouldn’t need a 12GB disk for everything, so you start minimal with a 1GB disk for little apps and you want to use the basic setup for all your VMs, keeping vmware-tools and stuff like that.

I know everybody who has done that once in his/her life, knows the procedure, but sometimes you forget a command and thigs just blow up!

So here is a list of commands – for my own convenience – everybody may use.

1. If you are cloning to a new machine, you may want to have your sshd get a new key pair, so just run

rm /etc/ssh/ssh_host_*
dpkg-reconfigure -plow openssh-server

2. Then change hostname, check DNS, hosts, etc

pico -w /etc/hostname
...
pico -w /etc/resolv.conf
...
pico -w /etc/hosts
...
/etc/init.d/hostname.sh

Also check for your fstab for wrong mounts (or add new if you plan to add a separate partition) and change the static ip if using one

pico -w /etc/fstab
...
pico -w /etc/network/interfaces

…but if you do those, be sure you check software configs like Apache and stuff like that, before asking “why that doesn’t work anymore?”

3. Now setup the new disk (you have properly installed as secondary)

fdisk /dev/sdb

And create your partitions (don’t forget to add the bootable flag)

Here we’re assuming there are only a primary and a swap partition.

4. Setup filesystems
mkfs -t ext3 /dev/sdb1
mkswap /dev/sdb5

5. Copy everything
mkdir /mnt/second
mount /dev/sdb1 /mnt/second/
cp -ax / /mnt/second/.

6. Now set up GRUB and fstab

blkid /dev/sdb1
cd /mnt/second/boot/
cd grub/
pico -w menu.lst

blkid /dev/sdb5
pico -w /etc/fstab

7. Next init the grub setup
grub-install --recheck /dev/sdb
umount /mnt/second

…just to be sure the device.map is updated

8. If you need to configure anything, just run
mount /dev/sdb1 /mnt/second/
mount -t proc none /mnt/second/proc
mount -o bind dev /mnt/second/dev
chroot /mnt/second

9. Ensure the new device map is ok (this is the command after chroot, but you don’t need to chroot to edit device.map)
pico -w /boot/grub/device.map
"(hd0) /dev/sda"
shutdown -h now

10. Now let’s do the trick with the Grub console:

  • Boot
  • Press ESC at the Grub prompt
  • Press c to enter console

Then write

root (hd0,0)
grub> find /boot/grub/stage1
setup (hd1)

11. Now shutdown and swtich the hard drives: yes, I know this sounds strange, but I always get “Grub Hard Disk Error”, so just do it :-D

12. Boot again and enter Grub console again, then:
root (hd0,0)
find /boot/grub/stage1
setup (hd0)

13. Now you may shutdown and remove the old hard drive and you’re done

14. If you use this HD in a different VM, be sure either to set the correct MAC address as the original (not recommended) or make Ubuntu use the new MAC address as eth0. Just
pico -w /etc/udev/rules.d/70-persistent-net.rules

And search and change eth1 to eth0
Usually it’s the last line

16. Don’t forget to check for changed things like
/etc/resolv.conf
/etc/mailname (postfix)
/etc/postfix/main.cf

17. Ubuntu 8.04 seems to hang on the resume device: to speed up the thing you’ll have to
blkid /dev/sdb5
pico -w /etc/initramfs-tools/conf.d/resume

insert the correct UUID of your swap and then rebuild initramfs
update-initramfs -u

18. End

  • Share/Bookmark

Related posts

Related External Links

Rating

Not useful/interestingUseful/Interesting (No Ratings Yet)
Loading ... Loading ...

Kodak Zi6 first impressions

June 30th, 2009

I’ve done a couple of tests on this ultra portable video camera, and I’d like to report them here.

First of all I was right in my previous post: the video is not high quality in poor lighting conditions.
The clips are quite fluid at 60fps, but there’s a lot of noise.
On the other hand, there’s a big jump in quality, when being outdoor in the sunshine: noise becomes very little and one may appreciate the 720p 60fps on a big screen (I tested the Zi6 on my 37” Samsung).
Zi6 snapshot 1 Zi6 snapshot 2 Zi6 snapshot 3
One thing that left me helpless is that my T5600 notebook can’t handle correctly the 60fps stream: VLC just shows a couple of still images every 2-3 seconds. All fine if you connect the Zi6 directly to the TV set.

I also wanted to use the macro switch on the lenses and it turned out that you have to be really close to stay on focus: so I just took a picture on a still object. It was something like 2cm close.
Zi6 macro image
It takes nice 2048×1536 (3Mpixel) images, but the sensor has still the same noise problems of the video function (it seems like it interpolates, as the picture is not very sharp)

My conclusion is that this is a very nice gadget, because has HD and 60fps, it’s really handy and portable, so that you can bring the Zi6 with you all the time and be ready to shot in a couple of seconds from extracting to being operational: you’ll never loose a face expression or a sudden event.
On the contrary, the Zi6 cannot be used as a professional video camera because of the noise and the poor quality in low light conditions, does not shows important information, like remaining recording time and space on the display and does not have advanced settings like shutter and color (white balance) adjustments and zoom lenses (only fixed focus).

Anyway, the price around 100-150 euros puts the Zi6 in a mid-low end user level and so, perfect for a pocket video camera!

  • Share/Bookmark

Most Commented Posts

Related External Links

Rating

Not useful/interestingUseful/Interesting (No Ratings Yet)
Loading ... Loading ...