Linux Mint Rescue

Discussion in 'Linux Guides (Generic)' started by booman, Mar 18, 2020.

  • by booman, Mar 18, 2020 at 5:17 PM
  • booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,344
    Likes Received:
    626
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    The Problem

    There will be a day when Linux stops working, booting or just has a random problem. Sometimes it may require hours of research, posting questions and trial-n-error to fix it. It is good to learn how to fix issues, but sometimes you are in a pinch and need it fixed quickly.

    The solution

    Install Linux in the free space on your hard drive, then set your old Mint as your /home

    When most people install Linux they end up using the entire hard drive as a single partition. This is the easy way to get it installed quickly and efficiently, but there is a downside...
    • What if Linux will not boot?
    • What if Grub stops working?
    • What if it keeps crashing?
    There is a plethora of issues that can happen to your computer just like with Windows or Mac. I found a fairly quick and painless way to rescue your operating system and data without a lot of trouble.

    Outline
    1. Install Live Disk on a USB Drive
    2. Install Linux on hard drive free space
    3. Mount old Linux partition
    4. Move /home to root
    5. Get Parition UUID
    6. Edit FSTAB
    7. Install missing applications
    8. Configure missing settings
    Step 1
    Install Linux on a USB drive

    If you don't already have a USB drive with Linux Live Disk on it, get one!
    USB drives are fairly cheap these days and you only need one that is around 4GB or more.

    Download your favorite distro (Mint Cinnamon) and use a spare computer or friends computer to install Live Disk on it. Chances are, you have already done this before. Just get the newest version of your Distro on it.
    Boot to the USB Drive

    upload_2020-3-20_5-11-16.png

    Step 2
    Install Linux on free space

    Warning!!
    This step is very important because you can accidentally erase your existing Linux partition and all of your files.

    Please double-check everything before continuing! There is no turning back once you begin the installation.

    Linux Mint 19.3 has a great installer with an option to install Linux along-side your old Linux. It basically uses the free-space on your hard drive

    upload_2020-3-18_8-53-33.png

    This is the quickest and easiest way to install Linux Mint again, granted you have enough free space.
    If you do not have free space, mount the old Linux partition and start deleting files you don't need. Again be careful as you don't want to delete your /home, games pictures, videos, etc.

    Note: If this option isn't available, you can use gparted during your Live Disc session to add free space to your hard drive, then be sure to install Linux on the free space.

    Continue with the installation and Reboot

    Step 3
    Mount Old Linux Partition

    In Mint you can open a Window and the left column should display any drives available. Click the drive for your old Linux installation. Mint should mount it and give you a shortcut on your desktop.

    Step 4
    Mount Old /home as the Partition Root

    If you are like me, you have hundreds of Gigabytes in games, pictures and videos. There is no way its all going to fit in the new Linux partition. So we are going to keep that old partition and make it your new /home.

    • Navigate to your old Linux partition
    • Create a new temp folder in the root of the partition
    • Select everything but /home
    • Move or cut-n-paste all the system folders into the temp folder
    • Open /home
    • Cut and paste your personally named home folder /home/username into the root of the old partition
    • Now the partition should only show two folder: temp & username
    Step 5
    Get UUID of Old Partition

    In order to automatically mount the old partition as /home we need the UUID
    • Open Menu
    • Type: disk
    • Select the old partition (disk)
    • Copy the UUID
    upload_2020-3-20_5-0-35.png

    Step 6
    Edit /etc/fstab (File System Tables)

    There are several ways to edit the file system tables in Linux. You can do it from the Terminal with nano or you can open it in Text Editor (easy way)
    • Open a folder in Mint
    • Click "File System" in the left column
    • Right-Click etc Folder
    • Click "Open as root" (may show "open as administrator")
    • Enter your password
    • Find fstab
    • Right-click fstab
    • Open with
    • Find Text Editor on the list
    • Add new mount using UUID

    upload_2020-3-20_5-3-23.png

    upload_2020-3-20_5-4-51.png

    fstab - File System Table will probably look strange, but we are going to just add one more line at the bottom.

    Click at the bottom and follow these steps:
    • Type a note: # Old Linux Home
    • Press Enter
    • Type: UUID=paste-ID-here
    • Press Tab
    • Type: /home
    • Press Tab
    • Type: ext4
    • Press Tab
    • Type: defaults
    • Press Tab
    • Type: 0
    • Press Tab
    • Type: 0
    • Save fstab
    It should look similar to this

    upload_2020-3-20_5-6-13.png

    Note: Its ok if the ext4 defaults 0 0 do not line up with the devices above them

    Reboot!
    If everything is setup appropriately your next reboot should display your old Desktop files, shortcuts, icons, wallpaper and everything else you setup before.

    Step 7
    Install Missing Applications

    Inevitably there are going to be some applications you installed previously are now missing.
    I had to install the following for my Mint gaming PC:
    • Mint Updates
    • Nvidia 430 Drivers
    • Google Chrome
    • ia32-libs
    • xterm
    • Steam
    • PlayOnLinux
    • Wine-Stable
    • GZDoom
    • Minetest
    upload_2020-3-20_5-7-49.png

    Step 8
    Check Configurations and Settings

    Some settings have probably defaulted to the Mint standard setup. You will have to visit the System Preferences to set them up again:
    • Power Options
    • Panel Settings
    • Favorites
    • Apps on Panel
    • Network Settings
    • Login Screen
    • Themes
    upload_2020-3-20_5-8-52.png

    Conclusion:
    Once everything is setup and installed, you should have a new system read to use. Hopefully this only costs you and hour or so to get going again. I was just very happy to not download 100GB of PlayOnLinux/Steam games and installing shortcuts. This would have taken a few days to get all setup again.
    Last edited: Mar 20, 2020
  • Categories:

Comments

Discussion in 'Linux Guides (Generic)' started by booman, Mar 18, 2020.

  1. Daniel~
    Boo you have my admiration! Well done. A bit more than I'm willing to take on. I'll have to get by on Backups.

    Thank you for taking the time to help those a bit more daring than I. Even with instructions these waters flow over my head.":O}
  2. booman
    No problem of course!
    I just wanted to share my success with a failing computer. With Linux you have so many flexible solutions, this is just one that saved me a LOT of time troubleshooting.

    Its actually not that much, I broke it down into very clear steps to keep it simple.
    So it looks like a lot, but once you have done it, the next time it will take a few minutes to setup after installing Linux again.

Share This Page