New HDD

Preston Hagar prestonh at gmail.com
Mon Oct 14 21:07:29 UTC 2013


On Sun, Oct 13, 2013 at 4:21 PM, Peter Smout <smoutpete at gmail.com> wrote:

> Thanks Colin! I know they are cheap (£15 online) but it wont be here in
> time for my couple of days off work (today / tomorrow), and although its
> been on my mind to upgrade my hand is somewhat forced by SMART errors,
> and I can spend all day tomorrow playing around to put it right!
>
> I wasnt aware that the DVD drive was broken until I go to use it earlier
> today (hasn't been used since last clean install on this machine in 2010)
>
> Pete S
>
>
>

I know this isn't your ideal, but it should work:

Boot to your old drive and load the new drive in the USB caddy and plug
into the laptop.

Follow this guide:

http://www.tolaris.com/2008/10/01/moving-your-linux-root-partition-to-raid/

except disregard the raid parts.  In general (double check and replace as
needed the /dev/sda, /dev/sdb, etc with the correct values:

sfdisk -d /dev/sda | sfdisk /dev/sdb

parted /dev/sdb
(parted) toggle 1 boot
mkfs.ext4 /dev/sdb1
mkswap /dev/sdb5

 Create a file, /root/rsync-filter, with the following content.

If running Ubuntu 11.10 or newer:

- /dev/
- /home/*/.gfvs
- /lib/modules/*/volatile/
- /mnt/
- /proc/
- /run/
- /sys/


mkdir /mnt/new_drive
mount /dev/sdb1 /mnt/new_drive

rsync -avx --delete -n --exclude-from /root/rsync-filter / /mnt/new_drive/


If you are sure the above rsync command looks good.  Run it again without
the -n to make it actually copy over

cd /mnt/new_drive/
mkdir -p dev/ mnt/ proc/ run/ sys/
for i in /lib/modules/*/volatile ; do mkdir -p /mnt/new_drive/$i ; done

mount --rbind /dev /mnt/new_drive/dev
mount --rbind /proc /mnt/new_drive/proc
chroot /mnt/new_drive


I'll leave the rest off of the email and you can check the above linked
guide for setting up grub with UUIDs after you chroot.

I've done this lots of times and it works well.  The trickiest part is
usually the grub-install after the chroot (that's why I left it out so you
could read the guide with all the walkthrough).

The only other thing I would know of would be to get a new DVD drive.

Hope this helps,

Preston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20131014/88cc9d0e/attachment.html>


More information about the ubuntu-users mailing list