Move an installed Linux to a bootable USB drive

Hi Bob,
You can dd the root partition.
If it is gpt disk you can dd the ESP system partition
but if it is an msdos disk, I am not sure how you dd the MBR,
unless you simply dd’d the whole disk , rather than partitions
Is that what you are saying?
Yes I guess that would work… it would be like cloning the disk. Should copy grub and everything.
Not so convenient if you have multiple distros on the disk… it would clone everything.
Have you tried it?

I regularly move root partitions around on the HD. I use rsync for that.

Regards
Neville

I’ve had varying degrees of success cloning SSDs onto USB sticks. I’m just not sure if it’s the choice of thumb drive, or something else. I know that the sizes are not equivalent. I’ve been using 256G SSD and 512G USB.

In the clone copy
Look at /etc/fstab … check the UUID’s of each mount… use
uuid’s, not device names

When you move something, get rid of /boot/grub/grub.cfg, …
grub will boot without it. Then when you get it to boot, remake it with update-grub .

Some people say format the flash drive to ext4 before you dd to it. It is supposed to get rid of any Microsoft nonsense on the flash drive. There is no logical reason for a reformat, dd is supposed to overwrite everything.

and , as you say, flash drives vary in quality.

1 Like