Wanting to change hard drive and keep everything the way it

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
3lud13

Wanting to change hard drive and keep everything the way it

Post by 3lud13 »

Ive finally got everything set up and running nicely however since the hard drive in my laptop is tiny (150gb) I am putting something a little bigger in it.
The thing is though I dont wanna have to download all my programs and do all my settings again. I recall reading something at some stage you can just copy everything over and it will work fine.
Just checking how much truth is in this and is there any precautions or anything I should take before doing it?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
usbtux

Re: Wanting to change hard drive and keep everything the way

Post by usbtux »

You could use clonezilla, to make a backup then you'll need to expand the partitions on the new drive once youve restored the image.
You could make a list of programs installed then using that list automatically install to the new harddrive installation , then copy your home ove the new one to get all the settings previously made.

To output this information to a file in your home directory you would use,

dpkg --get-selections > installed-software

And if you wanted to use the list to reinstall this software on a fresh mint setup,

dpkg --set-selections < installed-software

followed by

dselect
tchocolo

Re: Wanting to change hard drive and keep everything the way

Post by tchocolo »

Yes it is true, providing you do it in the right way! There are several ways but here is the way I would do it:
Obviously you will need to have both hard drives connected simmultaneously to copy the system across, - I use a small USB powered external hard drive enclosure which takes the 2.5" laptop disks (you can get one for less than £10 eg http://www.scan.co.uk/products/dynamode ... red-pc-mac for £7.
Download and burn to disk http://www.sysresccd.org/Download
connect both drives and go into your bios to boot off the SysRescueCD, select "boot directly into graphical environment".
From the System menu start Gparted, from here you can partition and format your new drive and note how the system names your partitions.
your origional disc will probably be sda1 if you did a clean install and are not dual booting with windows, personally have a seperate partition for the / (root system) and the /home partition.
Now you can copy partition to partition directly using dd eg.
dd if=/dev/sda1 of=/dev/sdb1 conv=noerror,sync
and if you have grub installed on the mbr it will have to be copied across aswell:
dd if=/dev/sda of=/dev/sdb bs=512 count=1

refresh Gparted and set the boot flag on sdb1.
This partition will be the same size as the old one so you can increase the size to the empty space using gparted an/or add partition(s) above it.
and you are done, install the new drive in place of the old one & reboot.

...and someone else has posted a away whilst I was writing this but my post does not show, maybe there is a delay for vetting.
Locked

Return to “Installation & Boot”