flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Bochs question (yes I've first checked docs)

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
Little question on Bochs (I hope it's a little question for you guys)

I want to make say a disk image of ~200MB and put some files on it.
Then I want to make a boot floppy image with say DOS on it. Now when it's booted up, I get a command prompt with "A:\"

When I tick in "C:" it doesn't change to "C:\" because it says "C:" doesn't exist, while I have this line in my "bochsrc.txt":

ata0-master: type=disk, path="test.img", mode=flat, cylinders=406, heads=16, spt=63

So, any suggestions? Wink

_________________
:: The Dutch Cracker ::
Post 22 Apr 2006, 12:09
View user's profile Send private message Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
If you just created a blank image, then you should fdisk and format it before use. fdisk and format should be on any DOS or windows rescue floppy.

That's a plug-out-of-the-socket level answer. if the problem is not about that, please be more specific.
Post 22 Apr 2006, 16:17
View user's profile Send private message Visit poster's website Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
Artlav wrote:
If you just created a blank image, then you should fdisk and format it before use. fdisk and format should be on any DOS or windows rescue floppy.

That's a plug-out-of-the-socket level answer. if the problem is not about that, please be more specific.


I've formatted it with Windows (first mounted it with WinImage), should be enough, no?

Basicly my question is: How can I startup Bochs with DOS and have a virtual harddrive with an image to use that disk with Bochs in DOS as C: or such.

_________________
:: The Dutch Cracker ::
Post 22 Apr 2006, 16:41
View user's profile Send private message Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
Probably not. Winimage may not create a partition table, it just formats the image.

Basically: use bximage to create the image, put the windows 9x or similar boot floppy in place of a.img, use fdisk, use format C:
Post 22 Apr 2006, 17:06
View user's profile Send private message Visit poster's website Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
Artlav wrote:
Probably not. Winimage may not create a partition table, it just formats the image.

Basically: use bximage to create the image, put the windows 9x or similar boot floppy in place of a.img, use fdisk, use format C:


I've created the image with 'bximage' tool from Bochs.

But what do you exactly mean by put the boot floppy in place of the .img? I can't boot with Bochs from the image or could I? Cuz I've tried putting in a bootsector from Win98 CD onto it and tried booting up, but it failed.

_________________
:: The Dutch Cracker ::
Post 22 Apr 2006, 17:54
View user's profile Send private message Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
Ok. Let's go heavy-time.
Can you post your whole .bochsrc (bxrc) from the first-post test?
Which version of Bochs do you use?
What sort of expirience you had with DOS before?

a.img is the boot floppy. As i understood, you loaded from the floppy (since there was A:\)?

The boot device is defined by the "boot: disk" line in the bxrc. It's "disk", "floppy" or "cdrom" for newer versions and "a","c" or "d" for older versions.

"tried putting in a bootsector from Win98 CD onto it" means first sectors of CDROM image or boot sector loaded for floppy emulation?
Because boot sectors are significantly diffirent between floppys, hard drives and cdroms. Putting floppy boot sector on hard drive can work only by a miracle.

"But what do you exactly mean by put the boot floppy in place of the .img" Make an image of the boot floppy with winimage, save it as a.ima, put the line "floppya: 1_44="a.ima", status=inserted
" in the bxrc, select boot from floppy.
Post 22 Apr 2006, 18:56
View user's profile Send private message Visit poster's website Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
I'm an advanced PC user mate Wink Worked with DOS alot, but just not with Bochs you know Smile

I'm using Bochs-2.2.6 and I used DOSBox before.

Heres my 'bochsrc.txt'
Code:
romimage: file=BIOS-bochs-latest, address=0xf0000
megs: 32
vgaromimage: file=VGABIOS-lgpl-latest
floppya: 1_44="msdos.img", status=inserted
boot: floppy
floppy_bootsig_check: disabled=0
log: bochsout.txt
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
debugger_log: debugger.out
vga_update_interval: 60000
keyboard_serial_delay: 250
keyboard_paste_delay: 100000
mouse: enabled=1
keyboard_mapping: enabled=0, map=
user_shortcut: keys=ctrl-alt-del
ata0-master: type=disk, path="test.img", mode=flat, cylinders=406, heads=16, spt=63
    


My test.img is a created image with 'bximage.exe' and I've mounted it as T: in WINDOWS (not Bochs) then I formatted it using Windows, and I was able to put files on it with Windows and then unmounted the drive, WinImage saw the files on the image so I assume that part went okay.

My boot sector as one of my own country language, it's one from Windows 98 SE CD in NL language, I've called it 'msdos.img'.

Well that's about it, I hope you can help me out mate, would be great, anyways I appreciate all the help till now too of course Very Happy

_________________
:: The Dutch Cracker ::
Post 22 Apr 2006, 19:25
View user's profile Send private message Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
bxrc is correct. Ive tested it with the working HD image, and C: is readable.
That means that the problem is in the disk image.
And i suspect it's in the absence of MBR&partition table.
So, best solution is to repartition the image from bochs using disk tools, that should be on the msdos.img.

"My boot sector as one of my own country language, it's one from Windows 98 SE CD in NL language, I've called it 'msdos.img'" sounds like terminology incompatibility from my side. Got it now.

"I've mounted it as T: in WINDOWS (not Bochs)" That's a bit confusing. Youve used some DAEMON Tools-like program? It's likely, that the program creates virtual partition, not disk, and windows format wasn't able to make the MBR record.

When you loaded the image with winimage, was there a "Select the partition to connect to" dialog?

Check the contents of the HD image. In the beginning there should be some code followed by "Invalid partition table Error loading operating system Missing operating system"-like strings, then some empty space, followed by the similar structure, but with diffirent strings. (MBR then first partition boot sector).

btw, check if the image is not in NTFS.
Post 22 Apr 2006, 20:05
View user's profile Send private message Visit poster's website Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
"sounds like terminology incompatibility from my side. Got it now."
Works perfectly here (in non-virtual PC) Smile

"That's a bit confusing. Youve used some DAEMON Tools-like program? It's likely, that the program creates virtual partition, not disk, and windows format wasn't able to make the MBR record."
I've used WinImage to mount it.

"When you loaded the image with winimage, was there a "Select the partition to connect to" dialog?"
Nope didn't see any of that dialog.

"btw, check if the image is not in NTFS."
Windows formatted it as FAT32, so it's not NTFS hehe.

Now I think you're right on the MBR stuff, I need to partition the image, but can you recommend me any tools? WinImage won't see the drive which I mounted, and my XP install doesn't have 'fdisk' but Win98 should right? (Edit: checked the Win98 image and extracted 'fdisk' tool Smile)

_________________
:: The Dutch Cracker ::
Post 22 Apr 2006, 21:20
View user's profile Send private message Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
Oh wait now I get it, the harddrive image was loaded anyway in Bochs, even if it didn't contain any information yet!

So what I did is, boot up from floppy, and partitioned the image, just like in a real PC, thanks mate ! Very Happy Very Happy Very Happy

One last question: how can I make Bochs run in fullscreen? I've checked the sample bochsrc.txt but these solutions didn't work for me.

_________________
:: The Dutch Cracker ::
Post 22 Apr 2006, 21:25
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
hi TDCNL,
i used boch before, but now using vmware, would suggest you to take a look on vmware player (it is free) and is able to run in fullscreen.

http://www.vmware.com
some of its features:
- network (NAT, bridge), cdrom, floppy (floppy drive/image), usb, audio, scsi/ide disk are supported.
- run fullscreen, create multiple snapshots
- and more.
Post 24 Apr 2006, 22:22
View user's profile Send private message Visit poster's website Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
sounds good, going to try VMware Player, but can't Bochs run in fullscreen? Smile

_________________
:: The Dutch Cracker ::
Post 24 Apr 2006, 23:20
View user's profile Send private message Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
VMWare Player can't create virtual machines -- you're pretty much stuck to use what others have done. You need VMWare Workstation or others for that, and they have some $$$ cost Sad

I suggest you try out Qemu (i'm not sure where you can find it, do a search, sorry). It's faster than Bochs and works ok for me.
Post 25 Apr 2006, 13:56
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
check this site:
http://petruska.stardock.net/software/VMware/

it got utilities that would makes the vmware player functions like vmware workstation and of course, without a penny.

fyi, vmware offers vmware workstation for trial 30 days, you could try it too if you don't like the trouble vmware player gives.
Post 25 Apr 2006, 15:00
View user's profile Send private message Visit poster's website Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
TDCNL: No problems.

Bochs cannot run in fullscreen with win32 gui, and afaik, any other win32-compatible gui.

Qemu can. And qemu is a bit faster than bochs.

Vmware is both, but with strange speed-variations.

What do you expect from virtual machines?

OS debugging is best done in bochs.
DOS programs and games is best in dosbox.
General OS what-it-looks-like is better done in vmware.
Virus tests is better be done in any.
Qemu is good when you are not on ia-32.

Vmware player is free. But there is a big loophole in the licensing - noone prohibits you from editing the VM config files manually, and it's a simple text file. Just download the trial, make a bunch of virtual machines, and run them in the player when trial is over.
Post 25 Apr 2006, 19:46
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
Post 25 Apr 2006, 21:33
View user's profile Send private message Visit poster's website Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
Thx for help Artlav, but "Qemu is good when you are not on ia-32." why is that? Doesn't it work on good performance otherwise?

_________________
:: The Dutch Cracker ::
Post 26 Apr 2006, 15:44
View user's profile Send private message Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
"Qemu is good when you are not on ia-32." means if you want to run x86 linux applications on your pda, or trying to run windows on mac, or dos games on sparc server qemu is one of the best solutions.
Ofcourse, it works fast on x86 too.
Post 26 Apr 2006, 19:51
View user's profile Send private message Visit poster's website Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
Oh of course, lol hey now I think this turns a little bit to a Qemu question not Bochs but.... when I start Qemu it doesn't display anything, and a simple command line with a disk image file doesn't run anything either, I've checked docs but can't really figure out how to run Qemu.

_________________
:: The Dutch Cracker ::
Post 27 Apr 2006, 06:56
View user's profile Send private message Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
Qemu is configured from command line.
For your above example qemu equivalent will be:

qemu -fda msdos.img -hda test.img -boot a -m 32

Full list of commands can be found at http://fabrice.bellard.free.fr/qemu
Post 27 Apr 2006, 13:48
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.