Giter Site home page Giter Site logo

clone-ubuntu's People

Contributors

thiggy01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

clone-ubuntu's Issues

Update grub on $Source - maybe

Hello

Mine is probably a way-out-there scenario, but may be worth mentioning.

I have a second disk in my Ubuntu desktop system which I keep updated as an 'emergency backup.' This is easy, thanks very much to your script. My grub entries on the main disk ($Source) include one for the cloned Ubuntu ($Target), and so I can boot the clone and check that all is well - without having to go to the bios to change boot drive.

After I update a kernel on $Source, I use clone-ubuntu-thiggy. It copies the new kernels to /boot on $Target and the new grub it creates there lists the new kernels from both $Source and $Target - which are both the new ones.

However, grub on $Source still has the old kernels for $Target listed in its grub.cfg, and so $Target won't boot from its entry in the $Source boot menu.

This is easily fixed by running grub-update on $Source, and I've added a line in the script to do that. I don't know if this would be useful for anyone else.

Exclude some dir

You can add an option to exclude some dir on cloning process.
I make it mannually, adding the dir I want to exclude to rsync command and remove the size check.

Failure to put files in EFI partition

System boots from original disk with UEFI
From /etc/fstab:
...
UUID=A346-6D27 /boot/efi vfat defaults 0 1
...
This line is repeated in cloned (target) /etc/fstab .
I created a 100MB partition at the beginning of the target disk, however it remained empty.
What should the contents of this partition be? And what other changes (e.g. in the target /etc/fstab) should there be?

Any additional information I can provide, my email is [email protected]

Cannot read partitions from disk with NVMe disks

Bug

While trying to clone data from an HDD (regular disk partition syntax /dev/sdbX) to a new M.2 SSD (NVMe, disk partition syntax being /dev/nvme0npX) I had an error where fdisk was not able to list the partitions on the target disk.

Cause

After digging a bit in the script, I managed to get it to work by replacing the following line by this one:

    TargetDisk=$(echo "$TargetRootDev" | sed 's/p[0-9]\+$//')

This way instead of trimming only the number at the end of the partition to retrieve the disk name it also trimmed p.

I guess it would probably be more resilient if the updated regular expression was /p\?[0-9]\+$// instead to also handle a regular disk partition syntax.

If you want I can open a PR for this and you can have a look at it when you have some time!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.