1

I was making a spare Mint live USB via Unetbootin and when I was looking for my iso file, I misclicked and moved /etc into my /home directory, which pretty much immediately rendered my system useless. How can I make this partition bootable again?

I tried grabbing the file from a live USB, but permission was denied. I then tried going into Windows and grabbed an ext4 driver that was read only and copied it into that partition, the booted into a live USB and tried to copy the folder into the root directory of my Linux partition, but access was still denied.

How can I revive this system? Is the only way to copy my home directory and reinstall Mint? This is on a Toshiba C55DT-A5106, 12GB RAM, AMD A6 APU, 750 GB HD with 100GB for Mint, the rest to Windows and assorted recovery/swap partitions. The OS in question is Linux Mint 17.2 Cinnamon 64 bit.

2

You need to boot into a linux live USB (preferably mint or ubuntu), make sure your linux HDD partion is mounted read/write, and use the linux mv command to move the directory to the proper location.

This is how I would approach:

  1. Boot your system on a Linux Live USB.
  2. Use the file manager on the Linux live system to find the Linux Mint partition on the hard drive with your /home directory on it.
  3. Open a command terminal on the Linux live system. (ie "drop to the shell", heh)
  4. Type the command mount, which will show you a list of disks and the directories they're mounted on in the live linux system, for example:

    ...
    /dev/sda3 on /media/aaa (ro)
    /dev/sda4 on /mnt/a3d2fe6 (ro)
    ...
    
  5. Find out which directory (the path after "on" in the above output) is your linux mint partition. You need to look at only the lines which begin with "/dev/". For each directory, execute

    ls <dir>/home
    

    replacing <dir> with the directory name. Do not check "/", that's the root directory of the live usb system.

  6. When you find out which mounted directory contains your home directory, issue these commands, replacing "/yourdirectory" with the directory that you've identified in the mount command output:

    sudo mount -o remount,rw  /yourdirectory
    cd /yourdirectory
    sudo mv home/etc etc
    

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.