Page 1 of 2
What boot media to choose?
Posted: Wed Mar 16, 2011 2:18 am
by smwikipedia
Hi, my friends,
Long time no see. Finally, I may have some private time to play with my hobby kernel. Currently, my kernel boots from a floppy disk which is formatted as FAT12. Since floppy driver is obsolete, I want to choose another boot media. Here are some options:
1- CD
2- USB disk
3- Hard disk ( this may not be an option because I think the files needs to copied to hard disk from somewhere else )
So, which one is better? And the reason? Also, it would be best to list the necessary references.
Thanks,
Sam
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 2:45 am
by Chandra
smwikipedia wrote:Hi, my friends,
Long time no see. Finally, I may have some private time to play with my hobby kernel. Currently, my kernel boots from a floppy disk which is formatted as FAT12. Since floppy driver is obsolete, I want to choose another boot media. Here are some options:
1- CD
2- USB disk
3- Hard disk ( this may not be an option because I think the files needs to copied to hard disk from somewhere else )
So, which one is better? And the reason? Also, it would be best to list the necessary references.
Thanks,
Sam
I recommend booting from CD. For the reference, search the Wiki.
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 3:03 am
by smwikipedia
@Chandra,
I just searhed for the USB, it's daunting. I'll take a look at CD.
But since I am using a virtual machine, and it seems the virtual machine doesn't care much about the actual size of the floppy disk image, so maybe I could just make up a file and use it as if it is a floppy disk image. I think i can even write the FAT32 file system onto it because FAT32 support much more space than FAT16.
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 4:06 am
by iocoder
I boot my OS from a CD-ROM, i think this is easier, better, and most supported by BIOS. since i use GRUB, my OS has the ability to boot from Hard disks, USB Mass Storage Media, and CD-ROMs
...
http://wiki.osdev.org/Bootable_CD
http://wiki.osdev.org/El-Torito
http://wiki.osdev.org/Bootable_El-Torit ... RUB_Legacy
Good Luck and Regards,
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 4:09 am
by Solar
smwikipedia wrote:But since I am using a virtual machine...
In that case, why not booting directly from (virtual) HD? That's what the intended endresult should be anyway, isn't it? Booting your OS from HD, I mean. It's relatively trivial to mount the virtual HD image and write a new bootloader or kernel image to it (see
Loopback Device), and you don't have to cope with CD or USB boot which you might not be interested in technologically at this point.
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 4:52 am
by Combuster
Harddisk booting is not a viable option the moment you want to get out of a virtual machine. CD and floppies are the only methods of booting that can be used in emulators and real hardware alike, however burning a CD is a very, very long round trip for testing. Also, not all harddrive image formats like being mounted as loopback which might get you into trouble on VMware/VirtualPC.
In practice, I only have one machine that boots from harddisk, and only because it's my dev machine and I can just pump the binaries into /boot and ask grub for them on the next power cycle.
If you happen to use grub (or can use grub for the occasion), the boot media does not matter - you can use usb for real hardware and CDs for VMs
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 5:55 am
by Solar
Combuster wrote:Harddisk booting is not a viable option the moment you want to get out of a virtual machine.
Why not? Isn't stable HD handling pretty much a precondition for getting out of the VM? Either it's stable, then HD booting
is an option. Or it isn't stable, in which case I don't want to get out of the VM.
Or am I missing something here?
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 6:08 am
by Brendan
Hi,
Combuster wrote:Harddisk booting is not a viable option the moment you want to get out of a virtual machine. CD and floppies are the only methods of booting that can be used in emulators and real hardware alike, however burning a CD is a very, very long round trip for testing. Also, not all harddrive image formats like being mounted as loopback which might get you into trouble on VMware/VirtualPC.
For the purpose of (frequent) testing on real hardware, there's one option that is far better than anything mentioned so far: booting from network.
It's the only "100% hassle-free" way (and once you've got it working it can also be used by most virtual machines too). Eventually (hopefully) it will also become a very useful feature for end users - for example, a large company might setup a "boot server" and use it for quickly installing your OS on a large number of computers.
The only disadvantage is the hardware costs - you need multiple machines on a LAN, plus either a keyboard/monitor for each computer or KVM/s that are large enough for all machines; and one of your computers (the server) won't be able to boot from itself.
Cheers,
Brendan
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 6:18 am
by Brendan
Hi,
Solar wrote:Why not? Isn't stable HD handling pretty much a precondition for getting out of the VM? Either it's stable, then HD booting is an option. Or it isn't stable, in which case I don't want to get out of the VM.
The normal approach (used by just about all OSs) is to boot a temporary version of the OS from CD or something, and use that temporary version of the OS to partition the hard drive, format file system/s, copy files over to the new file system/s, install the boot loader and MBR, etc. It takes a lot of work to get an OS to this stage (and a lot more work before any normal end-user actually wants to install your OS on their hard drive). Because of this it's unlikely that a hobby OS will need to support booting from hard drive in the first few years of development.
Cheers,
Brendan
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 6:35 am
by Chandra
Brendan wrote:Hi,
For the purpose of (frequent) testing on real hardware, there's one option that is far better than anything mentioned so far: booting from network.
It's the only "100% hassle-free" way (and once you've got it working it can also be used by most virtual machines too). Eventually (hopefully) it will also become a very useful feature for end users - for example, a large company might setup a "boot server" and use it for quickly installing your OS on a large number of computers.
Looks like a best option, though I'm frank enough to admit that I actually don't know how to boot my OS from network (actually never tried). Is there any OS over here, that supports booting from Network?
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 7:47 am
by Solar
Brendan wrote:The normal approach (used by just about all OSs) is to boot a temporary version of the OS from CD or something, and use that temporary version of the OS to partition the hard drive, format file system/s, copy files over to the new file system/s, install the boot loader and MBR, etc.
Yes, that is the installation process.
Perhaps it's just me, but I would focus on the
functioning of my OS before I worry about the end-user
installation of it. And the generic way to boot an
installed OS is through the hard drive. When you fire up the emulator to see if your new memory management works, you'd want to start the OS itself, not its installation, wouldn't you?
Ah damn. Again discussing things I have no stakes in, instead of doing useful work.
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 9:11 am
by Brendan
Hi,
Chandra wrote:Brendan wrote:For the purpose of (frequent) testing on real hardware, there's one option that is far better than anything mentioned so far: booting from network.
It's the only "100% hassle-free" way (and once you've got it working it can also be used by most virtual machines too). Eventually (hopefully) it will also become a very useful feature for end users - for example, a large company might setup a "boot server" and use it for quickly installing your OS on a large number of computers.
Looks like a best option, though I'm frank enough to admit that I actually don't know how to boot my OS from network (actually never tried). Is there any OS over here, that supports booting from Network?
I've used network boot for a while now. There's
an article about it in the wiki if you're interested...
Cheers,
Brendan
Re: What boot media to choose?
Posted: Wed Mar 16, 2011 10:11 am
by Chandra
Yeah, I knew that link existed but I was too lazy to go through it. Thanks anyway.
By the way, don't you have a discussion page on your
website or at least a contact email?
(I'm starting to get out of topic and will shutup now)
Re: What boot media to choose?
Posted: Thu Mar 17, 2011 7:53 pm
by Casm
smwikipedia wrote:Hi, my friends,
Long time no see. Finally, I may have some private time to play with my hobby kernel. Currently, my kernel boots from a floppy disk which is formatted as FAT12. Since floppy driver is obsolete, I want to choose another boot media. Here are some options:
1- CD
2- USB disk
3- Hard disk ( this may not be an option because I think the files needs to copied to hard disk from somewhere else )
So, which one is better? And the reason? Also, it would be best to list the necessary references.
Thanks,
Sam
Personally I would go for either the CD or USB disk. If you go for the hard disk, you will be writing to absolute sector numbers, and then having to retrofit a file system to it - unless your hard disk file system is going to be something like FAT32.
Personally, I wouldn't want to worry about the file system until I was well into the project.
Re: What boot media to choose?
Posted: Thu Mar 17, 2011 8:50 pm
by Tosi
It depends on what you are doing with your OS at the moment:
For emulator testing: Floppy, CD, USB or hard disk, doesn't matter as long as it fits and can be booted from.
For testing on real hardware: CD or USB (preferable) or Floppy (a lot easier if your machine has a drive)
For showing off features: bootable CD with some basic programs pre-installed.
For a release: a bootable CD that can install to a hard disk.