Bochs Linux image with gcc?
Bochs Linux image with gcc?
I'm toying with the idea of building a "Linux From Scratch" under Bochs. (Don't ask. ) However, as a starting point, I would need an existing Linux image with gcc installed... the images available from the Bochs site don't... (I tested the two debian's because they were the largest.)
Now: Does anyone know of a Bochs image containing a Linux including gcc? Or how to make a Bochs image out of an existing installation?
Now: Does anyone know of a Bochs image containing a Linux including gcc? Or how to make a Bochs image out of an existing installation?
Every good solution is obvious once you've found it.
Re:Bochs Linux image with gcc?
Ok, just to point out that you do know you're insane don't you ;D.
The way I'd approach it would be to create a disk image containing all the sources and use it as hdb, then grab a copy of a bootable LFS system (This might do the trick http://www.jutley.org/bootcd/, unfortunately KNOPPIX craps out at autoconfigure stage) and boot off that CD image, then set up another disk image as hda to be used for the final system.
After that you can pretty much follow the book. Get back to us next year and tell us how it went (Compiling glibc under bochs....eww).
***
A more sensible plan would be to create your disk image first, then use your host system (Linux for preference) to cross-compile for i586 and build LFS on that disk image (Loopback mounted of course). Once built you can just use a GRUB floppy image to load the first time, install GRUB onto the hard drive disk image inside BOCHS and away you go. This would be a MUCH faster way of doing things.
Oh, I did mention you're insane, didn't I? ;D
The way I'd approach it would be to create a disk image containing all the sources and use it as hdb, then grab a copy of a bootable LFS system (This might do the trick http://www.jutley.org/bootcd/, unfortunately KNOPPIX craps out at autoconfigure stage) and boot off that CD image, then set up another disk image as hda to be used for the final system.
After that you can pretty much follow the book. Get back to us next year and tell us how it went (Compiling glibc under bochs....eww).
***
A more sensible plan would be to create your disk image first, then use your host system (Linux for preference) to cross-compile for i586 and build LFS on that disk image (Loopback mounted of course). Once built you can just use a GRUB floppy image to load the first time, install GRUB onto the hard drive disk image inside BOCHS and away you go. This would be a MUCH faster way of doing things.
Oh, I did mention you're insane, didn't I? ;D
Re:Bochs Linux image with gcc?
Hmm... but... how... {scratching head} Now that's a very bad sign, if I can't even get the question right... I think I have to ponder all the alternatives for a while...Curufir wrote: A more sensible plan would be to create your disk image first, then use your host system (Linux for preference) to cross-compile for i586 and build LFS on that disk image (Loopback mounted of course).
If I weren't, I wouldn't be here among people writing their own operating systems, now would I?Oh, I did mention you're insane, didn't I? ;D
Every good solution is obvious once you've found it.
Re:Bochs Linux image with gcc?
Isn't that like plug&play? Make partition of 1GB, install Linux using normal install procedure (no fancy ones, just debian or slackware something), and then point bochs to your own harddisk as secondary harddisk (ps: you might want it as hdb). Then, use some image as hda for LFS.Solar wrote: Or how to make a Bochs image out of an existing installation?
If you like, s/partition/image loopback-mounted/g
Re:Bochs Linux image with gcc?
Erm... last time I looked, Bochs didn't support using *real* hard drives...?!?!
Every good solution is obvious once you've found it.
Re:Bochs Linux image with gcc?
The obvious answer is just as weird: dd if=/dev/hda of=harddisk-imageSolar wrote: Erm... last time I looked, Bochs didn't support using *real* hard drives...?!?!
Still, afaik, it does?
[edit] bochs user docs: In UNIX it is possible to use a raw device as a Bochs hard disk, but WE DON'T RECOMMEND IT for safety reasons.[/edit]
Re:Bochs Linux image with gcc?
Might I recommend the alternative of finding a used PC and using that instead? I don't know the situation in Neu-Anspach, but in Berkeley you can often find one literally for free if you know where to look[sup]1[/sup] and who to ask.
Mind you, I realize it isn't necessarily an option even if you can get the hardware. I have been meaning to do exactly that myself, but I don't have the space (or the wall outlets) to run the spare PC where I am right now, even if I were to get a KVM switch.
1. Especially if you're willing to dumpster dive for it, as some friends of mine are wont to do. Not my cuppa tea, but they do get some real treats - the amount of good hardware and appliances that gets thrown away in a college town like this is astonishing (the semester breaks are called 'Hippie Christmas' around here, because that's when the students are clearing out their junk, often to the benefit of a dilligent diver). Anyone who wants to try it, you'll need some clothes you can get grungy in, a non-corrosive cleanser, a lot of patience, a bit of practice at kit-bashing and maybe a soldering iron. While traditionally done around midnight, I know at least one older diver, an electtronics engineer by trade, who just casually checks the trash bins around the dorms and frat houses as he passes by on the way home from work. He's equipped his entire apartment with salvaged appliances and electronics, and has so much left over that he gives things away to friends in need.
Mind you, I realize it isn't necessarily an option even if you can get the hardware. I have been meaning to do exactly that myself, but I don't have the space (or the wall outlets) to run the spare PC where I am right now, even if I were to get a KVM switch.
1. Especially if you're willing to dumpster dive for it, as some friends of mine are wont to do. Not my cuppa tea, but they do get some real treats - the amount of good hardware and appliances that gets thrown away in a college town like this is astonishing (the semester breaks are called 'Hippie Christmas' around here, because that's when the students are clearing out their junk, often to the benefit of a dilligent diver). Anyone who wants to try it, you'll need some clothes you can get grungy in, a non-corrosive cleanser, a lot of patience, a bit of practice at kit-bashing and maybe a soldering iron. While traditionally done around midnight, I know at least one older diver, an electtronics engineer by trade, who just casually checks the trash bins around the dorms and frat houses as he passes by on the way home from work. He's equipped his entire apartment with salvaged appliances and electronics, and has so much left over that he gives things away to friends in need.
Re:Bochs Linux image with gcc?
Nah, the idea was to have a "system" I can boot without leaving Windows first... as for the second comp, I have two systems here... but I'd prefer to fire up only one to do the thing.
Every good solution is obvious once you've found it.
Re:Bochs Linux image with gcc?
Sure it does, at least on Windows NT/2000/XP. \\.\PHYSICALDRIVEn refers the the n'th hard disk. \\.\C: refers to the partition mounted as drive C, although this is likely to be wrong, as drive C will start with a boot sector and not an MBR/partition table. A: works fine for the floppy drive.Solar wrote: Erm... last time I looked, Bochs didn't support using *real* hard drives...?!?!
Re:Bochs Linux image with gcc?
There's nothing insane in installing a LFS. I'm using an LFS as my main linux system, and it didn't took me more than one night to build it.Curufir wrote: Ok, just to point out that you do know you're insane don't you ;D.
...
After that you can pretty much follow the book. Get back to us next year and tell us how it went (Compiling glibc under bochs....eww).
...
Oh, I did mention you're insane, didn't I? ;D
I must mention that I have never seen any distribution that works so good than my LFS (and I tried a lot !).
But there's a main drawbacks to linux beginners : it important to already know linux and shell (e.g. there are some errors in makefiles of some source packages. Typing a 20 line long gcc command is *very* annoying when no editor is installed !)
Re:Bochs Linux image with gcc?
I didn't mean installing LFS was insane (I built a Linux system based loosely on LFS for my dev system), what I meant was that building an LFS system under BOCHS is mildly insane. GLibc took some 3-4 hours to compile on my little k6-2 333hz box. Consider that even on a fairly quick computer BOCHS is struggling to emulate 50hz and you'll rapidly come to the same conclusion.pini wrote: There's nothing insane in installing a LFS. I'm using an LFS as my main linux system, and it didn't took me more than one night to build it.
I still say cross-compiling onto an image is the way to go. So long as he's not doing anything too stressful then once the LFS system is built he should be able to use console apps without too much slowdown.
Re:Bochs Linux image with gcc?
pini: ever tried gentoo.org ? Almost like LFS imo, but still has some "package management". Maybe I'm just too lazy for LFS