Discussion:
Changing Hard Drive Size to 32MB
(too old to reply)
Huyen Tue Dao
2005-04-29 06:16:50 UTC
Permalink
I changed the diskd.img target so that the value following zero file was
65536 blocks, 32MB. But now whenever I try to run anything I get the
following bochs error:

[HD ] concat_image_t.lseek to byte 0 failed

I haven't changed anything in the bochsrc.

Anyone have any ideas?
Joe Barrett
2005-04-29 07:26:20 UTC
Permalink
Have you also changed the disk geometry settings in .bochsrc? I don't
know exactly what you need to set it to, but I remember it being said in
discussion that you needed to make that change.

Joe
Tim Finley
2005-04-29 09:19:55 UTC
Permalink
Post by Joe Barrett
Have you also changed the disk geometry settings in .bochsrc? I don't
know exactly what you need to set it to, but I remember it being said in
discussion that you needed to make that change.
Joe
Ok, I've made the change to create a 32MB disk now (I'm sure since the
block device has 8192 blocks which equals 32MB). I would just post the
geometry that I've used but I'm not sure if we are supposed to figure this
out individually. If thats not that case, then I'm confused why we were
not told how to do it in the first place (maybe he just didn't tell the
11am class)?

Tim
Joe Barrett
2005-04-29 09:32:07 UTC
Permalink
I don't see why it would be "individual knowledge" - I don't think we
have any grading tests based on the ability to handle 32MB files - do we?

Joe
William Francis Cladek
2005-04-29 12:04:41 UTC
Permalink
I don't see why we need to change the disk geometry. Shouldn't changing
the number of blocks in the $(ZEROFILE) variable be enough? The second
line in "How to create an arbitrarily big diskd.img" seems to imply that
changing the variable to 65536 is sufficient to make it 32MB. I never
heard anything about the matter in the discussions I attended, though.
Any confirmation on this, Iulian?

Will
Post by Joe Barrett
I don't see why it would be "individual knowledge" - I don't think we
have any grading tests based on the ability to handle 32MB files - do we?
Joe
Iulian Neamtiu
2005-04-29 13:47:08 UTC
Permalink
Well, that has its own section in the description, and you need to do
those two things; diskd.img and the geometry in .bochsrc have to go hand
in hand.


The default geometry we have in there right now is:
diskc: file=diskc.img, cyl=40, heads=8, spt=64
meaning 40*8*64 sectors, each sector is 512 big, so => 10MB

So when Bochs boots, it virtually sees an IDE drive with that geometry.
ZEROFILE is used to create/wipe out the image of this IDE drive that
Bochs sees.

If you change it to say
diskd: file=diskd.img, cyl=128, heads=8, spt=64
that means 128*8*64 sectors, each sector is 512 big, so => 32MB

Iulian
Post by William Francis Cladek
I don't see why we need to change the disk geometry. Shouldn't changing
the number of blocks in the $(ZEROFILE) variable be enough? The second
line in "How to create an arbitrarily big diskd.img" seems to imply that
changing the variable to 65536 is sufficient to make it 32MB. I never
heard anything about the matter in the discussions I attended, though.
Any confirmation on this, Iulian?
Will
Post by Joe Barrett
I don't see why it would be "individual knowledge" - I don't think we
have any grading tests based on the ability to handle 32MB files - do we?
Joe
Huyen Tue Dao
2005-04-29 19:03:51 UTC
Permalink
I actually tried a different version of my project, simply changed the
value at ZEROFILE and it worked just fine.

It was strange because I had tried to re-copy the /src/user/ files from
the project source to my working version's directory, just so that any
changes I made to /src/user wouldn't affect my testing, and it was after
that bochs would give me that HD error. And when I tried doing the same
thing to different copies of that version, it would do the same thing
exactly after I copied over the entire /src/user folder from one the
project5 base to my own copy.

I'm just curious as to why it sometimes it works with the incorrect
geometry.
Post by Iulian Neamtiu
So when Bochs boots, it virtually sees an IDE drive with that geometry.
ZEROFILE is used to create/wipe out the image of this IDE drive that
Bochs sees.
If you change it to say
diskd: file=diskd.img, cyl=128, heads=8, spt=64
that means 128*8*64 sectors, each sector is 512 big, so => 32MB
Iulian
Loading...