Using that linux from the external drive: I plugged in a USB external drive, where I had linux installed. Original – UEFI booting, using an encrypted LVM.ĭestination - Legacy BIOS booting, and no encryption. This was from one virtual machine to another. I just did something similar, but with Leap 15.0. Is its a easy way to clone 30 GB disk to 120 GB SSD disk partion without to reinstall everything? This entry was posted in Linux and tagged clonezilla, hard disk, linux, lsblk, parted, partition, resize2fs, ssd, ubuntu by dave. I hope this will help you to upgrade your Linux system drives. I found the essential information about this part on this stackexchange page. This is done with the command resize2fs /dev/sdc2 (adjust device and partition name accordingly), which works for ext2, ext3 and ext4 file systems. The last step is to make the whole partition size available to the filesystem. Because of the boot partition, which takes about 512 MB and some additional space needed for the file system, the effective size of the partition is smaller (about 465 GB), but higher values can be entered, resulting in the remaining available space automatically. Because I wanted the partition to take all the remaining space, I entered the complete size of the new SSD (in my case 500GB). You will be promted for the new size of the partition. In the next step, enter resizepart 2 (if 2 is the partition number). In parted, enter print to show the partitions again and verify the number of the partition to be altered (in my case 2). For example, if the new drive has the device name /dev/sdc and the second partition is the one to be altered, run parted /dev/sdc2. To update the partition table, run the command parted with the partition to be altered as parameter. The reason is that the partition tables were also copied, and these now still contain the values for the old drive. You will notice that the new drive still shows the capacity like the old drive. If everything worked fine, your server should start up exactly as before. Refer to this askubuntu page for more details.Īfter clonezilla finished, disconnect the new drive and then reboot the machine with only the new drive connected. Background: dd copies every single byte, even from areas on the source drive that don’t contain any data (zero bytes). I am aware that this could also be achieved using dd, but this is not the best solution because this will result in a lot of unnecessary write operations on the new drive. Ask which action to take after finishing the clone operation.Then press Ctrl + X to start Clonezilla.įor reference, I chose the following options: Locate the parameter keyboard-layouts= and set a value, for example in my case keyboard-layouts=de (an American keyboard layout would be keyboard-layouts=us). Now you should be able to edit the command line. For that, highlight the option Clonezilla live (to RAM) and then press e. I could solve this by editing the command line for the clonezilla option. My clonezilla initially wouldn’t start up because it hung at the step Configuring keyboard. Once clonezilla is started, follow these instructions. Clone the Existing Drive to the New Drive The key to get into the BIOS configuration on startup is also mainboard-specific, but in most cases it is the DEL (delete) key. Alternatively, reconfigure the sequence of the boot devices in your BIOS. While rebooting, press the key for your mainboard’s boot menu (this is mainboard-specific, in my case it was F11) and choose the USB stick. Once the stick is ready, plug it into your server and reboot. The instructions how to create a bootable USB stick can be found here. To clone the SSDs, I used the excellent tool Clonezilla. Once connected, the new drive should show up when entering the command lsblk on the console. Shut down the server and connect the new HD/SSD to your mainboard. Make Backupsīefore doing anything, make backups of everything because the following operations are not trivial and might damage the file system. I decided to summarize how I achieved this for future reference and hope that it might be useful to someone else as well. In my case, the old SSD had a cpacity of 250 GB and the new one 500 GB. Of course I wanted to keep all the existing data and replicate it to the new drive. For an Ubuntu 20.04 server, I bought a new SSD and wanted to replace the existing SSD.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |