Creating a Linux bootable SD Card in VirtualBox

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Anon_Newbie
Posts: 2
Joined: 22. Jun 2021, 16:40

Creating a Linux bootable SD Card in VirtualBox

Post by Anon_Newbie »

Good morning, this is a general question but first let me lay out what I'm doing. First I'm using Windows 10 with VirtualBox ver 6.1.22. I am running a Ubuntu 64 bit updated to the latest and greatest version. Now, I'm trying to create a SD Card to boot a Variscite SOM module and they provide a step by step detail instruction. I build all my packages and when trying to create the bootable SD Card, I get an error that I can't write the SD Card because it's not a removable disk. So to get the SD Card to work, I created a sdcard.vmdk using rawdisk
. I also found a post about using "--usbcardreader on" instead of rawdisk but my Linux installation would not boot until I turned it back off.

So two part question, is there a better way to access a SD Card then the sdcard.vmdk? Any suggestions or work around to get Linux to flash/program on the SD Card if there isn't a better way to access. I can send screenshots of the error and t.he process if needed but not a lot of information is given.

Thank you in advance for any and all assistance.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Creating a Linux bootable SD Card in VirtualBox

Post by mpack »

I think you can probably make the VMDK appear as a removeable disk in a VirtualBox VM, just add a virtual USB controller (in Storage) and move the drive to that.
Anon_Newbie
Posts: 2
Joined: 22. Jun 2021, 16:40

Re: Creating a Linux bootable SD Card in VirtualBox

Post by Anon_Newbie »

To created the SD, I'm using this command:
$ sudo MACHINE=imx8mn-var-som ./var_make_debian.sh -c sdcard -d /dev/sdX

I believe I need to have the SD card as a /dev/sdX for this to work.
Sorry it took so long but i'm only working on this passively.

EDIT:
When working with the SD Card in a USB to SD Card adapter it shows as /media/"Card Name"
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Creating a Linux bootable SD Card in VirtualBox

Post by scottgus1 »

I don't know if you're still having trouble with this, and I'm no Linux guru, but I think it is up to the OS that receives the drive to decide where to mount it, and the mount point can be edited, maybe. You might web-search your VM OS's help channels to see if /media/"Card Name" can be changed to /dev/sdX.
Post Reply