Page 1 of 1

booatable USB with simplest OS

Posted: Wed Sep 07, 2011 1:59 pm
by Badhan
hi guys,
i just have read this article:
http://wiki.osdev.org/Real_mode_assembly_bare_bones

and , created an .iso image of this mini kernel, which i can run in Qemu.
Now, i would like to test this OS in real machine. For that , i need some clarification.

do i need to make a bootable usb stick with this .iso image? i think, YES.
can someone give me some hints how?
i am using , Ubuntu. i have tried this with "USB startup Disk creator". But, it did not work.

Please, give me some tipps, how i can run this mini program in a real machine. Not in Qemu.

Thanks in Advance

Re: booatable USB with simplest OS

Posted: Wed Sep 07, 2011 2:48 pm
by Combuster
If you have an .iso file, burn a CD(RW). If you really need to use an USB stick, you'll have to treat it as if it were an ordinary disk and write your bootsector straight to sector 0 of the device which is what the tutorial expected you to do anyway: just replace /dev/fd0 (floppy) with /dev/sd(...) and be careful not to trash your harddisk instead.

Re: booatable USB with simplest OS

Posted: Wed Sep 07, 2011 3:29 pm
by Badhan
If you have an .iso file, burn a CD(RW). If you really need to use an USB stick, you'll have to treat it as if it were an ordinary disk and write your bootsector straight to sector 0 of the device which is what the tutorial expected you to do anyway: just replace /dev/fd0 (floppy) with /dev/sd(...) and be careful not to trash your harddisk instead.
Thank you very much for your reply.

do i have to format USB in any specified filesystem format? i have tried like this:

sudo mkfs.vfat /dev/sdb1

and then:

sudo dd if=file.iso of=/dev/sdb1

which shows me following texts on terminal:
1+0 records in
1+0 records out
512 bytes (512 B) copied, 4.2045e-05 s, 12.2 MB/s
But, still i cant see any sign of bootloader by restarting the computer.

Re: booatable USB with simplest OS

Posted: Wed Sep 07, 2011 3:37 pm
by Owen
Supporting the writing of an ISO to a USB stick requires some ingenious hacks on behalf of ISOHybrid and ISOLinux. The recently added support for doing this with EFI (in addition) is really ingenious, especially when considering what is needed to make old Macs work.

Re: booatable USB with simplest OS

Posted: Wed Sep 07, 2011 4:32 pm
by Badhan
berkus wrote: Just do

Code: Select all

sudo dd if=file.iso of=/dev/sdb
that was aweomse. Finally i could boot my first Os.
Thank you all, guys!!!