2

I decided to make a small Arch Linux USB flash drive to carry around when I need Linux. So I successfully installed it on an awful 8GB flash drive with 5GB on / and 3GB on /home.

I would like to do this properly now that I have it working so I ordered a PNY Turbo 128GB USB 3.0 Flash Drive (P-FD128TBOP-GE) and want to move the installation to this new drive.

I also decided to go to a single partition so I don’t end up with one being full and the other not. How can I go about moving the installation to the new drive and switching to one main partition?

1

Having a secondary distribution is essential.

  1. You would boot off a live fdd or whatever to get into a running linux environment.
  2. Format the entire new flash drive as ext4 or your preferred fstype.
  3. Make a folder: /transfer.
  4. Mount your old fdd's / in /transfer/old
  5. Mount old fdd's /home in /transfer/old/home
  6. Mount new fdd in /transfer/new
  7. Cd to /transfer
  8. Copy everything in old to new(keeping permissions might be smart)

To recap:

whoami #should give root
cd /
mkdir transfer
cd transfer
mkdir -p old new
mkfs.ext4 /dev/sdc1 #replace ext4 with preferred fstype
mount /dev/sdb1 /transfer/old #old root partition
mount /dev/sdb2 /transfer/old/home #old home partition
mount /dev/sdc1 /transfer/new #new fdd
cp -rfv --preserve=all old/* new/ #r:copy recurring,f: force copy, v: be verbose
umount /transfer/*
shutdown -rf now #remove live distro and enjoy new fdd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.