2. Boot a Linux USB installation in VirtualBox

sleepyeyesvince
9 Dec 201910:20

Summary

TLDRIn this tutorial, Vince demonstrates how to boot a Linux installation from a USB drive within VirtualBox. He explains the process of identifying the USB drive in Windows Disk Management and using command prompts to create a symlink for VirtualBox to locate the USB. The video also covers setting up a virtual machine to boot from the USB and adjusting settings for optimal performance. Finally, Vince shows how to achieve the same with a Linux host, guiding viewers through terminal commands and VirtualBox configurations.

Takeaways

  • πŸ˜€ The video is a tutorial on booting a Linux installation from a USB drive using VirtualBox, which is useful for updating or accessing files.
  • πŸ” It addresses a limitation in VirtualBox that does not allow easy booting from a USB drive and provides a workaround.
  • πŸ’Ύ The process involves identifying the USB drive in Windows Disk Management and noting its disk number.
  • πŸ“ Commands are provided to create a symlink in the command prompt to tell VirtualBox where to find the USB drive.
  • πŸ–₯️ Users must run the command prompt and VirtualBox as an administrator for the method to work.
  • πŸ”„ After creating the symlink, the user can set up a new virtual machine in VirtualBox to boot from the USB drive.
  • βš™οΈ The video also covers adjusting settings such as CPU, memory, and display to ensure proper booting.
  • πŸ”‘ A reboot into Linux is mentioned, suggesting the process will be demonstrated for a Linux host as well.
  • πŸ“ In Linux, the tutorial involves identifying the USB drive using terminal commands and creating a file for VirtualBox to recognize.
  • πŸ”„ Similar to Windows, the Linux process includes creating a new virtual machine in VirtualBox and selecting the USB drive file.
  • πŸŽ‰ The video concludes with successfully booting a Linux distribution from a USB drive in VirtualBox, showcasing the final result.

Q & A

  • What is the main topic of the video?

    -The video is about how to boot back into a Linux installation on a USB drive using VirtualBox.

  • Why might someone want to boot from a USB drive in VirtualBox?

    -One might want to boot from a USB drive in VirtualBox to work with the Linux installation without shutting down their machine and rebooting on their hardware, or to update the installation or transfer files between Windows and Linux.

  • What is a limitation of VirtualBox when it comes to booting from a USB drive?

    -VirtualBox does not easily allow booting from a USB drive, requiring the user to enter specific commands into the command prompt to enable this feature.

  • What is the first step to identify the USB drive in Windows before proceeding with the VirtualBox setup?

    -The first step is to open Disk Management in Windows and identify the USB drive, usually by its size, and note down its disk number.

  • How do you open a command prompt with administrative privileges in Windows?

    -You can open a command prompt with administrative privileges by right-clicking on 'CMD' in the Start menu and selecting 'Run as administrator'.

  • What command is used in the command prompt to create a symlink for VirtualBox to find the USB drive?

    -The specific command used is not provided in the transcript, but it involves changing into the VirtualBox installation directory and pasting a command that includes the disk number of the USB drive at the end, replacing a hash symbol with the disk number.

  • What settings should be adjusted in the VirtualBox virtual machine to ensure proper booting from the USB drive?

    -Settings to adjust include removing the floppy, increasing the number of CPUs to 2, setting the video memory to the maximum of 128 MB, changing the display to Vbox VGA, and enabling 3D acceleration. Also, ensure the USB section is set to USB 3.

  • How do you determine the location of the USB drive in a Linux system before setting up VirtualBox?

    -In Linux, you can determine the location of the USB drive by typing 'sudo fdisk -l' or 'lsblk' in the terminal and identifying the drive by its size or other characteristics.

  • What command is used in Linux to create a file that helps VirtualBox boot from the USB drive?

    -The command used in Linux is not explicitly provided in the transcript, but it involves replacing '/dev/sdX' with the correct drive letter and executing the command to create a file, which is then saved in the home directory.

  • What are some of the settings that need to be configured in the VirtualBox virtual machine when using a Linux host?

    -When using a Linux host, settings to configure include setting the number of processes to 2, changing the USB to USB 3, and using an existing hard disk file that points to the USB drive.

  • What is the final step shown in the video after setting up the virtual machine in VirtualBox?

    -The final step is to start the virtual machine, enter the encryption key if prompted, and log in to successfully boot into the USB drive through VirtualBox.

Outlines

00:00

πŸ“€ Booting Linux from USB in VirtualBox

In this segment, the presenter, Vince, explains how to boot a Linux installation from a USB drive within VirtualBox. He addresses the common issue of VirtualBox not supporting easy booting from a USB and provides a workaround. The process involves identifying the USB drive in Windows Disk Management, opening a command prompt as an administrator, and entering specific commands to create a symlink that VirtualBox can recognize. This allows the user to boot into the Linux installation on the USB without needing to shut down their machine and reboot from the hardware. The presenter also mentions that the steps will be demonstrated for both Windows and Linux hosts.

05:01

πŸ”§ Configuring VirtualBox for USB Booting

This paragraph details the steps to configure VirtualBox for booting from a USB drive. The presenter instructs the user to open VirtualBox as an administrator, create a new virtual machine named 'boot USB', and select the appropriate settings for the operating system type and memory allocation. The key part of the process is to use an existing virtual hard disk file, which is the symlink created earlier pointing to the USB drive. The presenter also covers additional settings adjustments such as CPU allocation, video memory, and enabling 3D acceleration. The goal is to ensure that the virtual machine can successfully boot from the USB drive within VirtualBox.

10:02

πŸ”„ Rebooting with Linux as the Host

In the final paragraph, the presenter demonstrates how to achieve the same USB booting process but with a Linux host system. The steps include opening a terminal, identifying the USB drive using commands like 'sudo fdisk -l' and 'lsblk', and creating a file that will inform VirtualBox about the location of the USB drive. The presenter then guides the user through creating a new virtual machine in VirtualBox with similar settings as before, but this time without needing administrator or root privileges. The successful booting of the Linux distribution from the USB drive through VirtualBox concludes the tutorial, and the presenter invites viewers to leave questions, comments, or suggestions.

Mindmap

Keywords

πŸ’‘VirtualBox

VirtualBox is a software virtualization package that allows users to run multiple operating systems on a single physical machine. In the video, the host uses VirtualBox to demonstrate how to install Linux on a USB drive and then boot from that USB drive within the VirtualBox environment. This is a key tool in the process described in the video.

πŸ’‘Linux

Linux is a family of open-source Unix-like operating systems. In the video, the host is focusing on installing and booting a Linux distribution from a USB drive using VirtualBox. Linux is the operating system that the viewer is guided to install and operate within the virtual environment.

πŸ’‘USB Drive

A USB drive is a portable data storage device that connects to a computer via a USB port. In the context of the video, the USB drive is used to store a full installation of Linux, which the host then demonstrates how to boot from within VirtualBox. The USB drive is a crucial component in the process as it serves as the storage medium for the Linux installation.

πŸ’‘Disk Management

Disk Management is a Windows utility that allows users to manage their computer's hard disk drives and volumes. In the video, the host opens Disk Management to identify the USB drive, which is necessary for the next steps in creating a symlink to the USB drive for VirtualBox to recognize.

πŸ’‘Command Prompt

The Command Prompt is a command-line interface in Windows that allows users to interact with the operating system and perform various tasks. In the video, the host uses the Command Prompt to enter commands that create a symlink to the USB drive, which is a crucial step in setting up the boot process in VirtualBox.

πŸ’‘Symlink

A symlink, or symbolic link, is a file that points to another file or directory. In the video, the host creates a symlink to the USB drive to tell VirtualBox where to find the USB drive. This is a necessary step to enable booting from the USB drive within the virtual environment.

πŸ’‘Virtual Machine

A virtual machine (VM) is an emulation of a computer system. In the video, the host creates a new virtual machine in VirtualBox to boot from the USB drive containing the Linux installation. The virtual machine is the simulated environment where the Linux operating system will run.

πŸ’‘Ext4 Filesystem

The ext4 filesystem is a journaling file system commonly used by Linux distributions. In the video, the host mentions that Windows does not recognize the ext4 filesystem on the USB drive, which is why it appears as a healthy but unrecognized partition in Disk Management.

πŸ’‘NTFS

NTFS is a file system that is proprietary to Microsoft and is primarily used for Windows operating systems. In the video, the host contrasts NTFS with the ext4 filesystem, noting that Windows handles NTFS and FAT32 (referred to as 'f80' in the script) file systems natively, but not other file systems like ext4.

πŸ’‘Linux Host

A Linux host refers to a computer running a Linux operating system. In the video, the host also demonstrates how to boot from the USB drive using a Linux host, showing that the process can be done not only on Windows but also on a Linux system.

πŸ’‘Encryption Key

An encryption key is a code used to encrypt and decrypt data. In the video, the host mentions entering an encryption key when booting the virtual machine, which is likely related to the security features of the virtual machine setup in VirtualBox.

Highlights

Vince demonstrates how to boot a Linux installation from a USB drive in VirtualBox.

The tutorial explains the process of working with a Linux installation without needing to shut down the machine.

A limitation in VirtualBox is discussed, where booting from a USB drive isn't straightforward.

Instructions are provided for using command prompts to enable USB booting in VirtualBox.

The importance of identifying the correct USB drive in Disk Management is emphasized.

A detailed guide on how to open a command prompt as an administrator is given.

Commands to create a symlink for VirtualBox to find the USB drive are explained.

The process of setting up a new virtual machine in VirtualBox is outlined.

Configuration settings for the virtual machine are discussed to ensure proper booting.

The tutorial covers how to boot into the USB drive through VirtualBox successfully.

Vince shows how to reboot the system into Linux and perform similar steps on a Linux host.

Terminal commands for identifying the USB drive in a Linux system are provided.

The method for creating a file to enable booting from the USB drive on a Linux host is shown.

Instructions for setting up a new virtual machine in VirtualBox on a Linux host are given.

Final steps to successfully boot a Linux distribution from a USB drive on a Linux host are detailed.

The video concludes with a summary of the process and an invitation for viewer interaction.

Transcripts

play00:01

hi Vince here again in my last video I

play00:06

showed you guys how to do a full install

play00:08

of Linux until USB Drive in VirtualBox

play00:11

this time around I'm going to show you

play00:14

how you can boot back into that USB

play00:16

Drive with Linux using VirtualBox as

play00:19

well now why might you want to do this

play00:22

well it's say for example you want to

play00:25

work with that installation you might

play00:28

want to do some things like update it or

play00:30

you might want to pull down some files

play00:32

back onto windows because especially

play00:35

Windows doesn't really handle any other

play00:38

file systems very well besides NTFS and

play00:40

f80 you might want to boot back into

play00:45

that USB Drive using this VirtualBox if

play00:47

you don't want to shut down your machine

play00:49

and reboot back into the USB on your

play00:53

hardware now there is a limitation in

play00:56

VirtualBox where it doesn't really allow

play00:58

you to easily boot from a USB Drive

play01:02

you'll need to enter some commands into

play01:06

the command prompt to allow this to

play01:08

happen the instructions about how to do

play01:11

this shown in this article here I will

play01:16

show you how to do this first of all in

play01:18

Windows and later in the video I'll show

play01:20

you how to do the same thing in Linux as

play01:22

a host now scrolling through this

play01:24

article the first thing you need to do

play01:26

is open up Disk Management in Windows so

play01:30

the easiest way to do that is to

play01:31

right-click on your Start menu and

play01:33

select Disk Management in here what

play01:37

you'll need to do is try to identify

play01:38

which is the USB Drive and that's

play01:41

usually going to be somewhere down near

play01:44

the bottom the best way to probably

play01:48

identify it would be with how big it is

play01:51

in my case it's 120 gig Drive and you'll

play01:55

see here two partitions which Windows

play01:57

doesn't really recognize as anything

play02:00

except a healthy partition because it

play02:05

can't really read the ext4 filesystem

play02:10

in my case it's disk ten

play02:13

just make note of that in your head

play02:15

maybe write it down somewhere because

play02:17

you'll need that in the following steps

play02:19

returning to the article here the next

play02:22

thing we need to do is open up a command

play02:24

prompt we can do that simply by going to

play02:28

Start menu and typing CMD now it's

play02:31

important here that you don't just click

play02:33

on it to open it to what you'll need to

play02:35

do is right-click it and select run as

play02:38

administrator next what you'll need to

play02:41

do is follow these instructions and put

play02:45

in these commands into your command

play02:47

prompt first you'll need to change into

play02:49

the directory where your VirtualBox is

play02:53

installed

play02:59

next you'll need to paste this command

play03:01

in now what you'll need to do is at the

play03:11

end of this command where there's little

play03:13

hash symbol is you will need to put in

play03:15

the number that you saw in your disk

play03:18

management so in my case it's dis number

play03:21

10 of your USB Drive so you'll need to

play03:28

replace the hash with a 10 and simply

play03:32

hit enter and hopefully you'll get this

play03:36

message that the disk was created

play03:38

successfully what this command has done

play03:42

is created a shortcut file or a symlink

play03:45

to tell VirtualBox where to find a USB

play03:49

Drive and in this situation it saved

play03:51

that file to this C Drive of course you

play03:54

can then go and find this file and move

play03:57

it to where you would like to save all

play03:59

your virtual machines next what we can

play04:03

do is go ahead and open VirtualBox to do

play04:07

so when you find VirtualBox in your

play04:10

Start menu what you'll need to do is to

play04:12

right-click and choose run as

play04:14

administrator just like we did with

play04:17

command prompt earlier otherwise this

play04:19

method doesn't work now I've already got

play04:22

VirtualBox I've been here as

play04:24

administrator we can go ahead and

play04:27

a new virtual machine will call this

play04:29

boot USB choose Linux as your operating

play04:36

system type and in point to 64-bit let's

play04:41

bump up our ramp to four gigs and in

play04:45

this section when we have to choose our

play04:46

hard disk what we already have is a link

play04:49

file that we created earlier to the USB

play04:52

Drive so we can actually go ahead and

play04:54

choose use existing virtual hard disk

play04:57

file and we click this little icon here

play05:01

may need to choose add now that

play05:04

commander around earlier I would have

play05:05

saved the file to the C Drive and here

play05:09

it is here we choose open choose and we

play05:15

can create we need to still adjust a few

play05:19

settings to make sure this works

play05:20

properly in the system we can get rid of

play05:25

the floppy increase to two CPUs display

play05:31

increase the video memory to the maximum

play05:33

128 megabytes change the display to V

play05:38

box VGA and enable 3d acceleration

play05:44

importantly you'll need to go into the

play05:46

USB section and choose USB 3 ok let's

play05:54

start our up

play06:03

enter in the encryption key that we put

play06:07

in earlier we can now log in and there

play06:22

you have it

play06:22

we have successfully booted into our USB

play06:25

Drive through VirtualBox next up I'm

play06:30

going to reboot my system in to Linux

play06:33

and I'll show you how to do the same

play06:35

thing with a Linux host running

play06:38

VirtualBox right so in Linux what you'll

play06:42

first need to do is open up a terminal

play06:45

window and next we need to determine

play06:48

whereabouts in your system the USB Drive

play06:50

that you what a boot from is that and

play06:53

you can do this in a couple of ways by

play06:55

first of all typing sudo if disk - L

play07:02

entering your password and in my case it

play07:07

appears that my USB nvme drive is at SD

play07:13

k another way you can do this is to type

play07:18

LS p okay and you might be able to

play07:23

identify your disk again by the size of

play07:27

your disk it's usually shouldn't be any

play07:30

disk that's already been used here it

play07:32

should be a USB Drive that's not

play07:34

currently being mounted and in this

play07:36

situation again I can confirm it is SDK

play07:40

just remember that because we'll need

play07:42

that in the next step next what we need

play07:44

to do is use this command don't worry if

play07:49

it's very long I will copy and paste it

play07:51

into the description in the video down

play07:54

below what we need to do is replace at

play07:57

the NT s DX with the letter that we need

play08:01

for our drive and then press Enter and

play08:04

with any luck our file was created

play08:08

successfully in this case in my home

play08:13

directory next what we'll do is go ahead

play08:17

open up VirtualBox in a desktop this

play08:24

time around you actually don't need to

play08:25

open as administrator or root you can

play08:30

just reuse it in your normal VirtualBox

play08:32

will create a new machine or called boot

play08:38

USB select Linux as the top of operating

play08:43

system and again in this case it was

play08:45

open to 64 bits well pop it up so again

play08:50

- 4 gigs of RAM and use existing hard

play08:59

disk file now we may need to find the

play09:04

file again

play09:06

there it is in my home directory USB dot

play09:08

VMDK

play09:17

choose create we will just quickly sort

play09:25

out some of these settings pop it up to

play09:32

two processes change a USB to three that

play09:40

should do us and go ahead and try and

play09:44

build it up

play09:50

and it appears that we have it up and

play09:55

going again

play10:00

there you are

play10:01

we have successfully booted a fully

play10:04

installed Linux distribution on a USB

play10:07

Drive through VirtualBox that's all for

play10:10

today thank you very much again for

play10:12

watching if you have any questions

play10:14

comments or suggestions please leave

play10:16

them down below bye for now

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Linux BootVirtualBoxUSB DriveFile TransferSystem UpdateWindows NTFSDisk ManagementCommand PromptLinux HostVirtual MachineTech Tutorial