How to transplant bootable file system across disks
by jeenuv from LinuxQuestions.org on (#4YSEA)
TLDR: I installed GalliumOS on a 64GB pend drive. How can I duplicate that onto a 16GB pen drive?
The 64GB drive is a fresh install, and at the moment will easily fit onto a 16GB disk.
This was the layout of the 64GB disk, according to fdisk:
Code:Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 3999743 3997696 1.9G 83 Linux
/dev/sdd2 4001790 120174591 116172802 55.4G 5 Extended
/dev/sdd5 4001792 120174591 116172800 55.4G 83 LinuxI created basically a strucutral clone as follows on the 16GB one:
Code:Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 2099199 2097152 1G 83 Linux
/dev/sdb2 2099200 30031871 27932672 13.3G 5 Extended
/dev/sdb5 2101248 30031871 27930624 13.3G 83 LinuxPartition numbers match, but sizes obviously don't. I've mounted and copied respecitve contents in partitions across.
Trouble is that the Chromebook doesn't boot from the new 16GB disk. I've a feeling that this is because the grub config files in the first partition needing suitable modification (they were blindly copied across), or the MBR needs some changes?
Can someone advise? Is there a standard way to achieve this?
Thanks.


The 64GB drive is a fresh install, and at the moment will easily fit onto a 16GB disk.
This was the layout of the 64GB disk, according to fdisk:
Code:Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 3999743 3997696 1.9G 83 Linux
/dev/sdd2 4001790 120174591 116172802 55.4G 5 Extended
/dev/sdd5 4001792 120174591 116172800 55.4G 83 LinuxI created basically a strucutral clone as follows on the 16GB one:
Code:Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 2099199 2097152 1G 83 Linux
/dev/sdb2 2099200 30031871 27932672 13.3G 5 Extended
/dev/sdb5 2101248 30031871 27930624 13.3G 83 LinuxPartition numbers match, but sizes obviously don't. I've mounted and copied respecitve contents in partitions across.
Trouble is that the Chromebook doesn't boot from the new 16GB disk. I've a feeling that this is because the grub config files in the first partition needing suitable modification (they were blindly copied across), or the MBR needs some changes?
Can someone advise? Is there a standard way to achieve this?
Thanks.