.vdi file modification takes no effect?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
SpaceJehovah
Posts: 6
Joined: 23. Jul 2009, 07:16
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: MyOS

.vdi file modification takes no effect?

Post by SpaceJehovah »

Hi all,

I set the fixed size virtural HDD to 64MB and still couldn't find first sector start address. I've tried several plan included 512B, 4k, 1MB alignment address, also according to the tutorial, but all failed. I only want to insert my own 512B bootsector into the .vdi file to generate a bootable HDD virtual image...but couldn't find the accurate address to insert...

Thanks
SpaceJehovah
Posts: 6
Joined: 23. Jul 2009, 07:16
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: MyOS

Re: .vdi file modification takes no effect?

Post by SpaceJehovah »

Thanks, my friend.But...

Gosh, i find something crazy in bootsector! I wrote a simple bootsector and made mistake in the END:0x55aa not 0xaa55, but this all works very well as a floppy image in VirtualBox and VirtualPC!! So when i copy these codes into .vdi, booting failed... Why floppy image could work?

Thanks
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: .vdi file modification takes no effect?

Post by mpack »

SpaceJehovah wrote:Why floppy image could work?
Work as what? A floppy image does not require a boot sector in order to "work" - and it needs a lot more than a boot sector in order to boot.

Really, as I hinted in your other thread on the same subject, this is way beyond the scope of VBox support. It seems to me you are messing with stuff you have little or no knowledge of, and you will not gain that knowledge by asking piecemeal questions in a VM forum! About the only way I can think of that you could gain this knowledge by yourself is to download source code for some simple Intel based OS and study it. A VM might well be a useful tool in that study.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: .vdi file modification takes no effect?

Post by mpack »

mpack wrote:A floppy image does not require a boot sector in order to "work"
Actually, I'll amend that. It probably does require a boot sector with volume info, it just doesn't require any boot code.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: .vdi file modification takes no effect?

Post by vbox4me2 »

Booting of any media envolves a bootstrap loader, so yes there is executable code in the boot sector.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: .vdi file modification takes no effect?

Post by mpack »

vbox4me2 wrote:Booting of any media envolves a bootstrap loader, so yes there is executable code in the boot sector.
Who is your comment addressed to, me? If so then your comment is misplaced - I'm well aware of what is required from bootable media.

The OP talked about the floppy image "working" - without making it clear what he meant by "working". If the floppy only had a valid boot sector and nothing else then he certainly could not mean that he successfully booted a VM off it (not in any useful sense).

Most likely he meant that his VM booted successfully (off a hard disk image) and the floppy image was afterwards accessable. However if he tried booting a VM with a hard disk consisting of nothing but a boot sector (and that copied off a floppy image!) then it won't boot - to which the natural response is "of course not".
SpaceJehovah
Posts: 6
Joined: 23. Jul 2009, 07:16
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: MyOS

Re: .vdi file modification takes no effect?

Post by SpaceJehovah »

Hi guy,

Everyone in the world knows that you are an expert, extreme expert! Can you be a little more humble! Such guy should be eliminated!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: .vdi file modification takes no effect?

Post by mpack »

What? You ask for information, then if you get a competent answer you accuse the contributer of arrogance? There's gratitude for you. [edit: Looking back over this thread I see nothing from me that could be called rudeness towards you, I merely stated what I believed was a plain and simple fact: you appear not to have the knowledge to do what you are discussing. There was no call for rudeness from you in return. ]

And by the way: I'm a software engineer by profession, and have been for more than thirty years. I've been using PCs since they were invented, and was already using computers of various designs for several years before that; so yes, I do feel that I've learned a thing or two in that time: including what a PC boot sector contains, what it does, and how any of several operating systems have used it.
SpaceJehovah
Posts: 6
Joined: 23. Jul 2009, 07:16
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: MyOS

Re: .vdi file modification takes no effect?

Post by SpaceJehovah »

Hi god,

Everybody knows that you are A computer science god or father?! By the way, i believe you are as old as the computer history.
U should say that u are as old as the history of earth, haha. Maybe, u r alien?

Thanks
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: .vdi file modification takes no effect?

Post by Sasquatch »

Can we drop the names and all and get back on topic here? SpaceJehovah, if you are religious as I think you are, please drop it here. You don't have to pursue everyone with your way of thinking. Please treat this place as a neutral zone, so keep it to yourself on what and where you believe in. If you continue to take things here as insults, which are merely meant as helpful to solve your problem, I'll be forced to lock this topic.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: .vdi file modification takes no effect?

Post by Perryg »

@SpaceJehovah

Usually we do not try to suppress discussions for being heated, but I believe you have crossed the line here in your comments to mpack.
My suggestion is to stay civil. Abuse is not, nor will it be acceptable on the forum.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Re: .vdi file modification takes no effect?

Post by TerryE »

SpaceJehovah wrote:I set the fixed size virtural HDD to 64MB and still couldn't find first sector start address. I've tried several plan included 512B, 4k, 1MB alignment address, also according to the tutorial, but all failed. I only want to insert my own 512B bootsector into the .vdi file to generate a bootable HDD virtual image...but couldn't find the accurate address to insert...
Also to this point, you should do some basic research and this will give you the answers that you seek. The VDI is addressed internally to the VM just as a standard hard disk and the MBR is at sector 0. The mapping of virtual HD sectors to VDI file offsets is given in my tutorial All about VDIs, However I would just look at the Wikipedia MBR article which tells you how this works. Perhaps the easiest way to set up a virtual HD is to attach it as a second disk in your preferred VM (LiveCD Linux, Linux or Windows) and manipulate it as a normal disk within the VM.

However, +1 on the comments about abuse. Please read the Forum Posting Guide as you were asked to before posting. If you repeat this then you will be banned and receive no help.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Post Reply