Editing barebones tutorial page to boot from cdrom instead

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
User avatar
brain
Member
Member
Posts: 234
Joined: Thu Nov 05, 2009 5:04 pm
Location: UK
Contact:

Editing barebones tutorial page to boot from cdrom instead

Post by brain »

Hi all,

Imho the barebones tutorial page is a bit outdated and guides the user through creating a floppy image and booting it by hand-typing a set of raw sector addresses. Creating a small iso and booting from grub with a boot menu and proper filesystem is imho much nicer, easier to follow and immediately yields a much nicer starting-off point.

I am willing to change the tutorial to this however I may need some help on advising how to make iso images from commandline under windows (I have never used windows for osdev).

Can anyone see any problems with this or has any objections?

Thanks all!
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Re: Editing barebones tutorial page to boot from cdrom inste

Post by JackScott »

brain wrote:how to make iso images from commandline under windows
Install the "genisoimage" package for Cygwin. You should be using Cygwin already for a cross-compiler, so it's not too strenuous a requirement.
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re: Editing barebones tutorial page to boot from cdrom inste

Post by bubach »

A floppy image can easily be used in emulators or on USB's, so unless it's way easier to work with CD images I don't see the need to change. Can CD images be used on USB?

For the record, all nerds should have at least 1 floppy drive laying around somewhere. ;)
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
User avatar
brain
Member
Member
Posts: 234
Joined: Thu Nov 05, 2009 5:04 pm
Location: UK
Contact:

Re: Editing barebones tutorial page to boot from cdrom inste

Post by brain »

I haven't seen a floppy disk for years never mind the drive ;-) I guess what I'm getting at is the tutorial should at least use a proper filesystem, not "kernel 18+200" or whatever, imho raw loading of sectors like that is an awful mess, it means for example that if you do use a usb stick, you can store nothing else on it but the kernel and grub, a pain in the arse and waste of tons of space. Admittedly I am outside the norm of os developers by not owning some old 386 with a floppy drive but shouldn't an os be usable by normal users, and normal users no longer own floppy drives. in fact places that sell floppy disks are increasingly rare :-)
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: Editing barebones tutorial page to boot from cdrom inste

Post by Combuster »

The source of the problem is GRUB - it doesn't come installed by default and you need a live version of it to get it onto a device with an existing filesystem. If you want a filesystem-friendly version from a windows machine, you are best off grabbing someone else's image and replacing the kernel binaries with your own.

Besides that, the technical layout would also be the way to boot of harddisks and USB sticks. I'm not sure the default settings of GRUB like it if you try though.

That said, there are two tutorials out on the wiki on booting CDs.
I haven't seen a floppy disk for years never mind the drive
I spotted two of each within an 1m radius.
"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
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: Editing barebones tutorial page to boot from cdrom inste

Post by turdus »

Combuster wrote:I spotted two of each within an 1m radius.
Floppy disks are EOL about a year now. http://www.pcworld.com/businesscenter/a ... ction.html
User avatar
brain
Member
Member
Posts: 234
Joined: Thu Nov 05, 2009 5:04 pm
Location: UK
Contact:

Re: Editing barebones tutorial page to boot from cdrom inste

Post by brain »

Heh, that is rather funny when put in perspective, Sony sold 12 million floppies and in total the whole lot only holds 17gb... Really does make them sound as old and crappy as they are ;-)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Editing barebones tutorial page to boot from cdrom inste

Post by Solar »

brain wrote:Imho the barebones tutorial page is a bit outdated and guides the user through creating a floppy image and booting it by hand-typing a set of raw sector addresses.
I'm absolutely with you on the "hand-typing sector addresses". But since I don't expect anyone to use an actual floppy disk, much less burning actual CDs, which image format one uses is a mere technicality IMHO.

But if you feel like you could integrate the CD image instructions into the tutorial, by all means go ahead. I don't think anyone would shed a tear if the Bare Bones gave CD instructions instead of floppy ones.
Every good solution is obvious once you've found it.
ACcurrent
Member
Member
Posts: 125
Joined: Thu Aug 11, 2011 12:04 am
Location: Watching You

Re: Editing barebones tutorial page to boot from cdrom inste

Post by ACcurrent »

I say no! Both CD drives and USB disks emulate a floppy in the bios. What should be done is better documentation about EFI.
Get back to work!
Github
tharkun
Member
Member
Posts: 51
Joined: Sat Mar 21, 2009 1:29 pm
Location: Ireland

Re: Editing barebones tutorial page to boot from cdrom inste

Post by tharkun »

brain wrote:Heh, that is rather funny when put in perspective, Sony sold 12 million floppies and in total the whole lot only holds 17gb... Really does make them sound as old and crappy as they are ;-)
Actually there's an error in the maths there. 12,000,000 * 1.44 MB is just over 17TB.
User avatar
brain
Member
Member
Posts: 234
Joined: Thu Nov 05, 2009 5:04 pm
Location: UK
Contact:

Re: Editing barebones tutorial page to boot from cdrom inste

Post by brain »

pinged wrote:
brain wrote:Heh, that is rather funny when put in perspective, Sony sold 12 million floppies and in total the whole lot only holds 17gb... Really does make them sound as old and crappy as they are ;-)
Actually there's an error in the maths there. 12,000,000 * 1.44 MB is just over 17TB.
Not exactly - the fat12 filesystem's overhead will take away that little bit extra you refer to. technically you could store over 17gb raw data but in terms of files the fs overhead limits you to just a little less :-) also I think the page giving the example was rounded to be more readable anyway.

Edit: ah wait you said terabytes - yeah they ballsed up their maths then, d'oh!...
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Editing barebones tutorial page to boot from cdrom inste

Post by DavidCooper »

I would never want to switch from floppies to CDs - optical drives are horrible and will probably soon be just as obsolete. A much better route might be Micro-SD cards which are faster, have much higher capacity, and look as if they should give you the ability to switch cards just like floppy disks without having to worry about the drive number changing if you're accessing them through the BIOS [has anyone ever done this?]. I don't want to touch the hard drives in my machines, and I don't want to risk writing to them by mistake, so this looks as if it could be a way to keep things really safe while allowing my OS to modify itself and save itself to a different card without having to hunt via the BIOS for another drive to save to (and that's important if you want to be able to tell other people that if they use your OS it absolutely will not touch the hard drive). It would also be possible to have a fixed size partition for the OS so that the size of the card never matters, while a second partition could be FAT32 for use at a later stage. This would allow people to design their own format for the partition containing their OS and not have anyone else's file format imposed on them. Alternatively they could make the whole card a fat32 partition and work with that from the outset, but the point is that they would have more options. CD's look to me like a straitjacket, and one which will soon become obsolete - most machines won't have an optical drive in the future, and many already don't.
Attachments
The future.JPG
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
User avatar
brain
Member
Member
Posts: 234
Joined: Thu Nov 05, 2009 5:04 pm
Location: UK
Contact:

Re: Editing barebones tutorial page to boot from cdrom inste

Post by brain »

What obscure 'many' consumer machines do you use that have neither a cd drive, dvd drive or blu-ray drive?
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Re: Editing barebones tutorial page to boot from cdrom inste

Post by JackScott »

brain wrote:What obscure 'many' consumer machines do you use that have neither a cd drive, dvd drive or blu-ray drive?
Most notebooks under 13" don't have an optical drive. Apart from installing the operating system, most people just don't use them any more.
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: Editing barebones tutorial page to boot from cdrom inste

Post by qw »

I feel that in general, in the wiki's tutorials GRUB should not replace writing your own boot loader. GRUB is a very useful tool, but IMHO the reward in OS development is doing things yourself, and do them your own way.
Post Reply