You are not logged in.
I did some googling, but could not find a howto which replicated my situation...
I bought a new SSD for my netbook and I am wondering what the best way to go about transferring my arch install to it without going thru an install-from-scratch would be...
I'm planning to partition the new drive with / (10GB) and /home (the rest) in separate partitions.
I bought a usb hdd external enclosure and plan to connect the SSD to it to make the changes.
my old hard drive is 160GB and the new one will be 30GB, so I'm guessing dd would not work well? Or rather, I am not sure how to use dd in this situation (in part because some kind of "partition alignment" is needed for SSDs, which I guess dd would break? and the size mismatch would cause me trouble?). any pointers?
I'm guessing rsync would help me in this situation (I'm more familiar with it as I do my backups via rsync -av --delete --checksum), but then, how do I transfer grub to the new drive, so that when I (internally) connect the SSD and boot, all I have to do would be to wait as it boots to *my* Arch without me having to do anything.
also, if I do an rsync, which files would I need to change so the thing boots ok? I know I will have to change fstab entries to get the id of the partitions right, but what else?
any ideas, or pointers, or links would be very much appreciated.
thanks and sorry for this newbie question...
update: solved using the following:
pyther's comment below:
) Boot Live CD
2) Partition New Drive
3) mount old drive and all partitions /boot, /home, etc... (/mnt/old)
4) mount new drive and all partitions /boot, /home, etc... (/mnt/new)
5) Use cp or any tool that allows you to transfer files, make sure to preserve permissions. I would suggest the following command cp -av /mnt/old/* /mnt/new/*
6) Mount /proc, /dev, /sys (mount -t proc none /mnt/new/proc; mount -o bind /dev /mnt/new/dev; mount -o bind /sys /mnty/new/sys)
7) chroot /mnt/new /bin/bash
8) Modify any configuration files (ex. fstab and menu.list)
9) Rebuild initrd image mkinitcpio -p kernel26
10) Install grub
11) unmount everything
12) reboot
panuh's link
Quick search gave me this: http://www.linuxjournal.com/article/10093
things to be careful about: (1) grub's menu.list has both uuid and hd(X,Y) fields that need to be updated, (2) if you use an ubuntu live cd and chroot's grub-install doesn't work for you, ubuntu comes with grub2. when it craps on you during boot, see http://wiki.archlinux.org/index.php/GRU … ue_console . using this, after booting to arch, use grub-install along with --recheck http://www.gnu.org/software/grub/manual … stall.html
Last edited by vajorie (2010-03-10 23:41:24)
Offline
Quick search gave me this: http://www.linuxjournal.com/article/10093
Try a search for migrate instead of transfer. I think this might help. There are lots of articles.
Offline
Basically partition the new drive, boot into a live cd and copy -a or rsync whatever over the partitions, then chroot into the new machine and rebuild your images.
I wrote a howto for this on a LinHES system (based on Arch) which you can read here. Be aware that I wrote it for newbies so there way more in there than you'll need.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Graysky covered fairly nicely I'll add my own notes...
1) Boot Live CD
2) Partition New Drive
3) mount old drive and all partitions /boot, /home, etc... (/mnt/old)
4) mount new drive and all partitions /boot, /home, etc... (/mnt/new)
5) Use cp or any tool that allows you to transfer files, make sure to preserve permissions. I would suggest the following command cp -av /mnt/old/* /mnt/new/*
6) Mount /proc, /dev, /sys (mount -t proc none /mnt/new/proc; mount -o bind /dev /mnt/new/dev; mount -o bind /sys /mnty/new/sys)
7) chroot /mnt/new /bin/bash
8) Modify any configuration files (ex. fstab and menu.list)
9) Rebuild initrd image mkinitcpio -p kernel26
10) Install grub
11) unmount everything
12) reboot
Edit: Don't be afraid to ask for more help
Last edited by pyther (2010-03-08 22:29:55)
Offline
Have a look at the simple 'rsync -av --delete' route in these threads:
http://bbs.archlinux.org/viewtopic.php? … 24#p677924
http://bbs.archlinux.org/viewtopic.php? … 44#p664844
Offline
I would think that tar could also copy with permissions, if you pipe its output to a partition and not a file.
Offline
+1 for tar ...
(cd $SOURCE && tar cf - .) | (cd $TARGET && tar xvpf -)
Offline
I didn't know you have to build the initrd after copying; is this the case after using rsync as well (ninian's links seem to suggest otherwise)?
Now, I'm waiting for my new little hard drive / toy
thanks so much for the great responses!! all of them have been quite helpful (also thanks for the keyword suggestion; indeed, "migrate" works much better while searching)..
Offline
I did this once by adapting an Arch wiki article to my needs. I combined the Full System Backup one with some migrate articles I found.
I did this using rsync, worked perfectly.
Last edited by Ultraman (2010-03-10 11:17:48)
Offline
@op - might wanna make your thread as solved
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline