Creating a Linux bootable SD Card in VirtualBox

Discussions related to using VirtualBox on Windows hosts.

Creating a Linux bootable SD Card in VirtualBox

Postby Anon_Newbie » 22. Jun 2021, 17:05

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.
Anon_Newbie
 
Posts: 2
Joined: 22. Jun 2021, 16:40

Re: Creating a Linux bootable SD Card in VirtualBox

Postby mpack » 22. Jun 2021, 17:38

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.
mpack
Site Moderator
 
Posts: 34255
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

Postby Anon_Newbie » 22. Jun 2021, 22:05

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"
Anon_Newbie
 
Posts: 2
Joined: 22. Jun 2021, 16:40

Re: Creating a Linux bootable SD Card in VirtualBox

Postby scottgus1 » 23. Jun 2021, 16:50

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.
scottgus1
Site Moderator
 
Posts: 12464
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 42 guests