What boot media to choose?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
smwikipedia
Member
Member
Posts: 49
Joined: Tue Apr 20, 2010 1:11 am

What boot media to choose?

Post 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
User avatar
Chandra
Member
Member
Posts: 487
Joined: Sat Jul 17, 2010 12:45 am

Re: What boot media to choose?

Post 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.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
User avatar
smwikipedia
Member
Member
Posts: 49
Joined: Tue Apr 20, 2010 1:11 am

Re: What boot media to choose?

Post 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.
User avatar
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

Re: What boot media to choose?

Post 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 :D ...

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,
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: What boot media to choose?

Post 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.
Every good solution is obvious once you've found it.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: What boot media to choose?

Post 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
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: What boot media to choose?

Post 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?
Every good solution is obvious once you've found it.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: What boot media to choose?

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: What boot media to choose?

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Chandra
Member
Member
Posts: 487
Joined: Sat Jul 17, 2010 12:45 am

Re: What boot media to choose?

Post 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?
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: What boot media to choose?

Post 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. :P
Every good solution is obvious once you've found it.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: What boot media to choose?

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Chandra
Member
Member
Posts: 487
Joined: Sat Jul 17, 2010 12:45 am

Re: What boot media to choose?

Post 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)
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Casm
Member
Member
Posts: 221
Joined: Sun Oct 17, 2010 2:21 pm
Location: United Kingdom

Re: What boot media to choose?

Post 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.
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: What boot media to choose?

Post 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.
Post Reply