4

Taking my first Linux course and, ironically, I think I've hit a problem that could be fixed by someone proficient in Linux!

As part of the course I'm taking, we're required to download and install CentOS 7. I'm having problems with the installation part.

Some context:

  • Downloaded the 'DVD ISO' file from official website
  • File name: CentOS-7-x86_64-DVD.iso
  • File size: 4.33 GB
  • Running OS X El Capitan v10.11

However, when I double-click on the file I get the following error:

The following disk images couldn't be opened:
Image: CentOS-7-x86_64-DVD-1511.iso
Reason: no mountable file systems

I would delete and download the file again but I don't have a stable and/or fast connection, so I would rather not do that as it is a real pain.

Is there a way to fix this? I did some research online and didn't find satisfying solutions. My first thought was perhaps the file is corrupted due to my bad connection but it seems to be a common problem, so perhaps it isn't that?

  • 5
    You can't install it just like clicking it like a .dmg file. You need something like VirtualBox to install CentOS on a Mac. – GMaster Oct 23 '16 at 9:33
  • 7
    Don't try installing it directly on a Mac -- you will have more problems trying to have a dual-boot with CentOS. Install a virtual machine and install it there – RafazZ Oct 23 '16 at 9:40
  • 3
    In general - follow the install instructions... – pjc50 Oct 23 '16 at 15:10
  • Digital signatures of the checksums are provided. – v7d8dpo4 Oct 23 '16 at 16:03
  • 1
    @Wildcard: I'm not "forgetting" anything; I find XY to be over-invoked, as it results in helpdesk style answers tailored to the OP rather than actually addressing the question as posed to add value to the repo. :) – Lightness Races in Orbit Oct 24 '16 at 9:41
7

To install centos you need

  1. A virtual machine for try Centos,on Mac os you can try virtualbox or parallel.

  2. Try directly on a pc,but will erase your current os or you can partition hard disk and get dual boot,or install on different internal or external hd(linux can run on usb devices,of course usb3,usb2 works but is really slow)

Is impossible to run linux by click on dvd dmg/img! Maybe in the future...

  • 2
    Impossible by clicking on the iso yes, but I'm quite certain I've seen a distro of Ubuntu that had a windows executable of a Ubuntu trial on it before. Pretty sure it was just a prepackaged VM of some kind with Ubuntu installed on it, but it was still pretty neat. – Centimane Oct 23 '16 at 16:28
  • yes i remind,but i forgot the name,many years ago exist a linux distro wich install on fat32...as windows program!But i forgot the name – elbarna Oct 23 '16 at 16:47
  • 3
    @elbarna I think you may be thinking of Wubi. – user530873 Oct 23 '16 at 18:56
  • @smpl That's pretty neat how well it integrates itself with windows. – Centimane Oct 23 '16 at 19:36
14

Linux (and Unix for that matter). Are operating systems.


What is an Operating System?

An Operating system (OS) is the software that runs "directly" (let's ignore firmware for now) on your computer's hardware, and provides a standard environment from which other software can run. Usual programs/apps, such as itunes or microsoft word don't want to deal with your actual hardware, they simply ask the Operating System for something, it deals with the hardware, and gives the result back to the program/app.

Operating systems are thus installed outside of other operating systems (since they're used to access the computer's hardware directly).

Your MAC would already be running macOS as its Operating System, Apple's Operating System for its devices.

Usually as the computer starts up you can change which device it starts, and choosing an operating system installation DVD or USB drive is a common method for installing a new Operating system.

This means that an operating system can't really be "installed" on another operating system, but there are workarounds.


Dual Booting

"Dual Booting" refers to installing multiple Operating Systems on a single computer.

This is easiest if you have multiple hard drives so that you can install Operating Systems on their own hard drive, then simply choose which hard drive to boot.

You can also install multiple Operating Systems on a single hard drive, but that requires a boot manager (software that figures out where on the hard disk each Operating System starts).

I wouldn't recommend this method for a MAC, simply because they aren't really meant to run anything except macOS, and I wouldn't trust other OS's to support them.


Virtual Machines

Virtual Machines are programs that run within an Operating System that pretend to be a full computer. Because they pretend to be a computer you can install an operating system on them!

The most common Virtual Machine program is likely VMware, but you can search around to find one you like.

  • "Because they pretend to be a computer you can install an operating system on them!": not always, I've had an OS that works fine when it runs on actual hardware, but didn't work in a virtual machine (VirtualBox) nor in a bare metal hypervisor (KVM)… – wb9688 Oct 23 '16 at 20:44
  • @wb9688 What OS was this? Speaking as someone who's dealt a lot with hypervisors and bare-metal hypervisors I haven't had issues with an OS yet, though I mostly stick to windows and Linux. I wouldn't expect SOLARIS to work, because it's designed for SPARC processors (which most hypervisors wouldn't emulate), nor macOS (because Apple). I know hypervisors only list so many supported OSs, but I would expect most OSs not meant for specialized hardware to work. – Centimane Oct 23 '16 at 21:00
  • OSX comes comes with Boot Camp (Apple's boot manager), which can be used to install Windows. It allows you to very easily partition your hard drive and install the OS, giving you the option to choose which Os to boot into on restart. However, I don't know of a way to use Boot Camp to install a Linux distro. I do know, however, that the GRUB boot loader plays nicely with Windows if Linux is installed after Windows. I'm unsure if GRUB would take over Boot Camp, or even whether it might wipe out your ability to boot into OSX at all. – Chris Cirefice Oct 23 '16 at 21:28
  • Boot Camp doesn't support Linux, as far as I know, but there is an alternative known as rEFInd which does. – Michael Hampton Oct 24 '16 at 1:53
  • (@Centimane) Solaris-previously-SunOS was originally written for SPARC but it's been ported to x86 for a long time -- wikipedia says 2.1. And I can confirm from experience (due to needing cheap test environment) the port runs fine in Virtualbox-x86, now conveniently(?) also part of the Ellison empire. – dave_thompson_085 Oct 24 '16 at 6:19
0

You could try running the Linux OS from a USB drive?

https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx

  • 4
    Welcome to Unix & Linux first off! Secondly, its generally preferred that users avoid answers that are primarily links in case of link decay (the webpage gets moved/removed). Best practice is to type up the relevant information in your answer. Then you can also provide a link for further reading if it might be useful. – Centimane Oct 23 '16 at 17:14
0

To install Cent-OS or any other distribution of linux or windows, there are 2 ways in general. To install it directly on a hard drive or install it on a hyper-visor. To install it directly on a hard drive. You have a macbook, then you should download and install a hyper-visor first.

A choice for hyper visor on macbook is Parallels Desktop, or VMware Fusion.

Their job is to create a virtual computer for you. You can specify RAM, CPU and other specifications to your virtual computer. Then it ask you: which do you want to install on it. Then you select that .iso file for cent-OS. After installing and turning it on, You have a new virtual computer with you custom OS installed on it and also have you OSx running side by side. It's called virtualization.

0

VirtualBox is certainly the simplest way to start your Linux learning experience. However, if you want to learn the Linux command line, you may not want to go through installing the operating system through a graphical interface on a CD just to get started. (It's good to go through the install process from a CD at least once, but it's not necessary if you just want to play with a Linux command line.) So I recommend you use VirtualBox in combination with Vagrant.


For the fastest route to accessing the command line on an actual CentOS installation on your Mac, I recommend you do the following:

  1. Download and install VirtualBox.
  2. Download and install Vagrant (to allow you to create disposable virtual machines.)
  3. Open your "Terminal" (found in /Applications/Utilities on a Mac).
  4. Create a new directory to hold all your vagrant files by typing the following and pressing enter:

    mkdir vagrant
    
  5. Go into that directory—Change your Directory to that directory—by typing the following (and pressing enter):

    cd vagrant
    
  6. Create a directory to hold files relating to a particular virtual machine that you are about to create. For instance:

    mkdir centos-6
    
  7. Change Directories into that directory:

    cd centos-6
    
  8. Initialize the "Vagrant environment", specifying what virtual machine "image" (saved snapshot state of a computer) you want to start with when you create a virtual machine from this directory:

    vagrant init centos/6
    
  9. Create the virtual machine, based on the CentOS 6 vagrant box "image" which you specified in the last command.

    vagrant up
    

    This will take a little while this first time, as your computer will have to download the virtual machine "image" with CentOS 6 already installed on it. It will help if you have a good internet connection. It won't take this long every time, just the first time.

  10. Log in to the virtual machine you've now created, using the Secure Shell protocol (SSH):

    vagrant ssh
    

That's it. You are now on a fully fledged CentOS 6 installation, running inside a virtual machine on your computer. You can do whatever you want to inside this machine, and it won't negatively affect the files on your "host" computer (your Mac).


When you're done on the machine, you can get back to your own computer very easily:

exit

However, your virtual machine will still be running. To shut it down without removing it, run (from your own computer, not from inside the virtual machine):

vagrant halt

To wipe out that particular virtual machine (so that the next time you vagrant up you will have a brand new virtual machine without any changes you have made inside the last one), you can destroy it by running:

vagrant destroy

If you want a different kind of Linux OS, you can find a wide selection of Vagrant boxes available online. Many of them are user-contributed and may have odd combinations of software installed or not installed on them.

In general (and for learning purposes) I recommend using the official boxes for the OS you are using, until you have a need to use something different:

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.