LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 08-08-2018, 05:15 AM   #1
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Rep: Reputation: Disabled
Installing osx on virtualbox from bootable USB


Hi,

I have a bootable usb of osx Mavericks that I made years ago to keep my mac alive with the version of osx that I liked. Mackbook is since dead. However, I would like to install it on virtualbox as there are a couple of little apps that I like that I can't find on Linux, and also there is some data on the harddrive I would like to get off before I wipe it and integrate it into my Linux box.

However, virtualbox does not support installing from usb, I get that, but I can't find a way to get my bootable usb back into a .dmg file or an .iso file.

I have tried using dmg2img to convert the "InstallESD.dmg" file within the usb, but I never really thought it would work, but worth a try.

Does anyone know how I can revert the USB back to something I can use to install it on Virtualbox.

Thanks
 
Old 08-08-2018, 08:14 AM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
You should be able to use the USB stick as a boot+install drive in VirtualBox, but it's just a bit tricky. I have managed it but, sadly, don't recall exactly what I did and have since lost that OS install. I can't find the guide I followed either but these links should give you some hints:
https://www.howtogeek.com/187721/how...in-virtualbox/
https://www.virtualbox.org/manual/ch09.html#rawdisk
Otherwise, not sure whether it would work, but you could try mkisofs or similar:
https://wiki.debian.org/genisoimage
 
Old 08-08-2018, 01:03 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
I have no idea if this is legal or not to begin with.

Yes, it is not supported but you can boot a physical disk in virtualbox, plenty of web references to how to define this in the config file.

You may find it easier to use dd from that drive to a file and then import it as a raw drive or convert it using qemu-img.

I assume you have this as a physical disk and not a virtual hard drive on usb.
 
Old 08-10-2018, 04:28 AM   #4
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
I don't see why it wouldn't be legal, I bought and paid for the mac that no longer works because of the early 2011 macbook pro issues. If the logic board had not failed a second time one month outside the UK electronics 6 year legal warranty time, I would still have my mac. I kept Mavericks on a live usb as it was the best operating system for that model by a very long way and enabled me to refresh my mac once a year or whenever it started to get cluttered.

This particular bootable usb, now I think about it, I'm fairly sure I made it using unebootin, which is probably why I can't do anything with it now. Unebootin has issues I have found out, and although makes a usb bootable, it messes with the files, I had terrible trouble trying to get Linux distro's working with my graphics card on my computer when I first built it because of this issue, and it took me a good week to discover this being the problem and finally used dd on my mac to make the live Linux usb (note to self, go make a new linux live usb as back up). I have tried dd and dmg2img to change convert this to an ISO and each time the result is a non bootable iso image.

I fear this is not going to be possible now as I am suspecting that my live usb of Mavericks is actually corrupt even though it will reinstall on a mac so long as the date in the bios is changed to 2012 as the certificate is long past it's date.

Well thanks for your input, if anyone knows a way round this by tweaking something it is still a relatively interesting challenge to conquer. I just can't quite afford another Mac just yet, but it's on the christmas list.
 
Old 08-10-2018, 10:03 AM   #5
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Quote:
Originally Posted by iFunction View Post
I don't see why it wouldn't be legal...
It is a violation of Apple's EULA agreement to install Mac OS on non-Apple hardware. EULA's are kind of a legal gray area in my completely non-expert opinion. There is a popular online "hackintosh" community where you may be able to find some good advice.

In any case, Mavericks is "end of life" and unsupported since 2016.

If I were in your shoes, my first priority would be to recover my data from the drive. If you can clarify whether the data is stored on the USB drive vs. on the hard drive of the broken MacBook, and also whether or not it is encrypted with Filevault, we might be able to help with the recovery.
 
1 members found this post helpful.
Old 08-10-2018, 10:10 AM   #6
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
I've been trying to do that but it's a permissions issue, I can view images and even play mp3's from it, but can't move them anywhere even as root. I've tried hfstools, I've tried samba, but no joy, I just don't know anyone with a mac currently, it's very frustrating.
 
Old 08-10-2018, 10:13 AM   #7
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
Also, it's interesting that Virtualbox gives the option for OS X if it is not legal, I'm surprised Apple hasn't jumped on that one to extract money from Oracle for that.
 
Old 08-10-2018, 02:03 PM   #8
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Quote:
Originally Posted by iFunction View Post
I've been trying to do that but it's a permissions issue, I can view images and even play mp3's from it, but can't move them anywhere even as root. I've tried hfstools, I've tried samba, but no joy, I just don't know anyone with a mac currently, it's very frustrating.
Possibly you have read-only permissions. Try copying the files, instead of moving them.
 
1 members found this post helpful.
Old 08-10-2018, 02:24 PM   #9
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
That's correct, it is read only and as a result, copying is not allowed either. Doing
Code:
ls -l
gives the following:
Code:
drwx------ 1 501 dialout   7 Jul 26  2017 Documents
drwx------ 1 501 dialout   5 Aug  8  2017 Music
It's these folders in particular that I want, but they are both built in folders and as it is an hfs file system, I can't just chown the files to me or root, the only way currently is to change me to 501 and I'm not confident enough to do that currently

All I want to do is just copy those folders to a usb stick so I have them.

If anyone knows a kinda fool proof way to do this I would be interested
 
Old 08-10-2018, 03:09 PM   #10
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
No need to chown the original files. Copy them to your home folder first, and then chown the copy.

These commands should copy the folders Documents and Music to your home folder ~/ (edit the commands accordingly if you want to copy to a different destination). I am assuming you have already cd'd to the correct folder, as shown by the output of your 'ls -l' command above.

Code:
sudo cp -R Documents ~/
sudo cp -R Music ~/
Then chown the copied folders to your user (who I will assume is named ifunction for our example):

Code:
sudo chown -R ifunction ~/Documents ~/Music

Last edited by snowday; 08-10-2018 at 03:12 PM.
 
1 members found this post helpful.
Old 08-10-2018, 03:19 PM   #11
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
snowpine you absolute genius, thank you so much, that totally sorted it out!
 
1 members found this post helpful.
Old 08-10-2018, 06:21 PM   #12
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Great, glad you were able to recover the data!

I can tell you from direct personal experience that running MacOS inside of VirtualBox is possible, at least in some circumstances. I use an iMac at work, and occasionally I run MacOS "guests" inside my MacOS "host." For example, let's say I have 10.13 High Sierra on my iMac, but need to test whether a package will be compatible with a coworker's 10.12 Sierra iMac. I believe this does not violate Apple's EULA (since I am running on Apple hardware) and perhaps this use-case explains why VirtualBox developers at Oracle can openly support this functionality. If you are curious to learn more about Mac-on-Mac virtualization, I can look up my notes on Monday when I'm back in the office.

I haven't personally tried to install MacOS guest on a Linux host, but I have a hunch it is technologically possible. What I would do in your shoes is: look for a reliable how-to guide that walks you through a clean/vanilla install of MacOS inside a VirtualBox/Linux host. If you manage to get a factory-clean MacOS guest spun up in VirtualBox, this will give you a feeling of success, and then you can proceed with confidence if you want to tackle the more advanced project of cloning your legacy Mavericks OS from the USB.
 
Old 08-10-2018, 06:58 PM   #13
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
It is indeed possible, but the hard part is getting a version of OSX without a mac. My version on a usb stick was made with Unebutin which corrupts the files a little bit, I have had that issue before. If I can get to a mac at some point, I can log into the app store with my apple ID and download Mavericks again and I might just give it a go, but you have solved my main issue now, so it is no longer so important.
 
Old 08-12-2018, 07:14 AM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,541

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
It is indeed possible, but the hard part is getting a version of OSX without a mac. My version on a usb stick was made with Unebutin which corrupts the files a little bit
Not really sure why you would expect unetbootin to create a bootable Mac usb as it states specifically at the top of their home page:

Quote:
UNetbootin allows you to create bootable Live USB drives for Ubuntu and other Linux distributions
Note the part "other Linux distributions". Further down on that same page you will see:

Quote:
Also, ISO files for non-Linux operating systems have a different boot mechanism, so don't expect them to work either.
There are versions of unetbootin to download to use on a windows system, a Mac or Linux systems but the sole purpose is to create a bootable "Linux" usb. You're trying to use the software for something it was not designed to do.
 
1 members found this post helpful.
Old 08-12-2018, 07:44 AM   #15
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
Thanks, that explains an awful lot. As it happens I made the live usb stick of Mavericks quite a while ago, and to correct the info on this thread should anyone find it, I used this link and did it this way: https://www.techrepublic.com/blog/ap...s-x-mavericks/

So I still don't understand why I can't make a bootable ISO from this, but maybe someone with more technical knowledge than me can explain what I am missing, thanks.

Also, I still maintain that Unebootin is not a good way to make a live usb and that dd is a better way to go if you use Nvidia graphics drivers, that I know is a problem, I'm not sure how Unebootin messes with the file system but it doesn't seem to give as clean a version as dd does. I spent 2 weeks trying to get my GTX970 working in a brand new build with Linux Ubuntu and Linux Mint. Finally when I re did the live usb with dd, the Nvidia drivers straight from the package manager just worked straight away with no messing around.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Installing Kali - Can't Make a Bootable USB killingthemonkey Linux - Newbie 7 10-09-2016 05:16 PM
Can't delete partition after using the USB as a bootable USB for installing Debian Urtus Linux - Desktop 3 07-14-2015 03:06 PM
what will happen to the changes after installing from Persistent Bootable USB? blizz1987 Linux - General 1 04-09-2015 07:58 PM
How to get OSX working in Virtualbox? juanbobo Linux - Software 2 12-27-2009 03:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration