booatable USB with simplest OS

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.
Post Reply
Badhan
Posts: 9
Joined: Mon Sep 05, 2011 9:15 am

booatable USB with simplest OS

Post 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
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: booatable USB with simplest OS

Post 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.
"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 ]
Badhan
Posts: 9
Joined: Mon Sep 05, 2011 9:15 am

Re: booatable USB with simplest OS

Post 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.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: booatable USB with simplest OS

Post 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.
Badhan
Posts: 9
Joined: Mon Sep 05, 2011 9:15 am

Re: booatable USB with simplest OS

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