views:

208

answers:

7

Hi everybody, I was thinking about starting to write my own OS, but it seems that most of the time you start by putting the bootloader & OS on a floppy disk. Problem : my laptop has no floppy disk reader. I'm pretty afraid of putting the OS on the hard drive, and I guess I won't be able to load it through an USB key, as there is no OS running :D

Have you got an idea on how could I run my OS ? I'd really like to start it but if I cannot run it then I'll quickly lose my motivation.

A: 

If your laptop supports USB booting feature that wont be any problem. You can check that ether in your documentation or by checking BIOS.

I approve your caution of putting an OS on the same hard drive as the running operating system. We had the some problems with booting original OS and another OS from the same hard drive.

George
+12  A: 

I would imagine running your OS in a virtual machine would work - and it would sure be convenient!

Virtualbox is free and quite good.

Blorgbeard
+1 for VirtualBox.
Steven Sudit
+1, too. There'll be an awful lot of rebooting during the development of an OS so the OP is far better off doing that in a VM.
Timo Geusch
+2  A: 

You could:

  • Boot from a USB key, if your laptop supports it, or:
  • Use VMWare to run it from a partition on your hard drive (which would save you the bother of building a virtual machine image - VMWare these days supports running from hard disks as well as virtual machine images).
RichieHindle
A: 

If your laptop is not totally out of date, it should be able to boot from an USB memory stick. In the BIOS settings you should be able that it should attempt to boot from an external device connected via USB.

You might want to look into UNetbootin, which is a program that can write CD ISO images of different operating systems on an USB stick and make them bootable.

Ofcourse you could also write your own bootloading code on a CD; use a rewritable CD if you don't want to spend a whole disc each time you change your code.

Jesper
A: 

A hardware solution would be to buy a USB connected floppy drive, assuming your laptop supports booting from such a device - my ancient Sony certainly does.

anon
+2  A: 

Further to Blorgbeard's answer, I would suggest Bochs for the early stages of development, since it can give you more detailed information about the state of the (emulated) processor. You can even enable a mode where a magic instruction (the "XCHG BX, BX" instruction, which does nothing anyway) will cause the emulator to pause and let you interactively examine the contents of registers and what have you -- very useful when you're doing very low level stuff (as you will be when writing your kernel).

John Bartholomew
A: 

Being fair to all, IMO Linux is the most popular open Source OS... I would recommend Linux from Scratch, if you need to study OS structure. However writing a new OS is like reinventing the wheel. You can join existing projects like Slakware/Debian after you've gained the insight of the OS.

Sam