Create bootable CD, USB disk etc.
Create bootable CD, USB disk etc.
I have a working bootable floppy image that runs on Bochs. I want to start testing on real hardware, but I can't get a bootable anything working. I tried making a bootable CD image, but I couldn't get Bochs to boot from it, so I didn't waste a CD. I tried making a bootable USB stick, but it froze our old computer before I could open setup, and my newer PC said 'Operating system not found' when I booted from the USB stick. Can someone explain how to make something bootable that I can boot from? (I don't have any floppy disks)
-
- Posts: 20
- Joined: Sat Oct 22, 2011 4:17 pm
Re: Create bootable CD, USB disk etc.
Some issues I've run into that may or may not be helpful
1) Bochs will only boot from CD if its the only device listed as a boot device, it seems. So, if you have something like first device: floppy, second device: cd, don't expect it to default to CD when no floppy image is mounted. I have no idea why. Maybe that'll be your problem.
If not, check out this post for taking your bootable floppy and putting it onto a CD
http://wiki.osdev.org/Genisoimage
2) USB Stick should be pretty easy -- just need to make sure your first sector is the standard 512 bytes with the bootloader signature at the end just like floppy. Use dd to copy it over. If that doesn't work, maybe your BIOS isn't configured to boot from USB.
1) Bochs will only boot from CD if its the only device listed as a boot device, it seems. So, if you have something like first device: floppy, second device: cd, don't expect it to default to CD when no floppy image is mounted. I have no idea why. Maybe that'll be your problem.
If not, check out this post for taking your bootable floppy and putting it onto a CD
http://wiki.osdev.org/Genisoimage
2) USB Stick should be pretty easy -- just need to make sure your first sector is the standard 512 bytes with the bootloader signature at the end just like floppy. Use dd to copy it over. If that doesn't work, maybe your BIOS isn't configured to boot from USB.
Re: Create bootable CD, USB disk etc.
A CD doesn't have a boot sector in the normal sense. The operating system loader is loaded directly by the BIOS without an intervening boot sector. On hard disks the first sector of the disk has a master boot record, which contains a partition table and some code to load a boot sector from whichever partition is marked as having an operating system on it.kendfrey wrote:I have a working bootable floppy image that runs on Bochs. I want to start testing on real hardware, but I can't get a bootable anything working. I tried making a bootable CD image, but I couldn't get Bochs to boot from it, so I didn't waste a CD. I tried making a bootable USB stick, but it froze our old computer before I could open setup, and my newer PC said 'Operating system not found' when I booted from the USB stick. Can someone explain how to make something bootable that I can boot from? (I don't have any floppy disks)
So I would read up on the El Torito specification for CDs, and the master boot record for hard disks. However, the master boot record might become antique in the next few years as EFI systems start to become the norm.
Re: Create bootable CD, USB disk etc.
My BIOS has an option to boot from USB storage, so I assume it is supported. I used PowerISO to create a bootable USB drive from a floppy image. It did something, since my USB drive went from 8GB to 1.44MB. Could PowerISO be the problem?theseankelly wrote:USB Stick should be pretty easy -- just need to make sure your first sector is the standard 512 bytes with the bootloader signature at the end just like floppy. Use dd to copy it over. If that doesn't work, maybe your BIOS isn't configured to boot from USB.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Create bootable CD, USB disk etc.
Why would you write an ISO image to a USB thumb drive?
- Combuster
- 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: Create bootable CD, USB disk etc.
Unlikely that software ships with showstopper bugs.It did something, since my USB drive went from 8GB to 1.44MB. Could PowerISO be the problem?
What you see is that your stick contains a single FAT12 partition of 1.4M in size, something that would probably have been there on a real floppy too. The question is if the bios thinks your USB stick is a floppy, or rather treat it as a harddrive.
Re: Create bootable CD, USB disk etc.
I can make bootable .iso files by opening bootloader.bin (or whatever) in MagicISO and exporting it as "bootable image file". Makes (for me) .iso files that boot on VirtualBox, Bochs and real hardware.
Re: Create bootable CD, USB disk etc.
CD/DVD
Run e.g. Nero Burning ROM and choose New Compilation -> CD-ROM (Boot). Then set following settings:
Or:
USB-HDD
Run e.g. HxD and choose Extras -> Open disk -> Physical disks ->Removable Disk1. Then write (check it is present) your MBR boot loader and mark boot partiton as active in partition table. Then find (or open it as logical disk) the partition and write your stage 1 boot loader.
USB-FDD
Run e.g. HxD and choose Extras -> Open disk -> Physical disks ->Removable Disk1. Then write your floppy disk image.
Run e.g. Nero Burning ROM and choose New Compilation -> CD-ROM (Boot). Then set following settings:
Code: Select all
Boot:
Source of boot image data
Image file: your_iso_bootloader.bin
Enable expert settings (for advanced users only!)
Kind of emulation: No Emulation
Boot message:
Load segment of sectors (hex): 7C0
Number of loaded sectors: 4
Code: Select all
Boot:
Source of boot image data
Image file: your_floppy_image.bin
Enable expert settings (for advanced users only!)
Kind of emulation: Floppy Emulation 1,44 MB
Boot message:
Load segment of sectors (hex): 7C0
Number of loaded sectors: 1
Run e.g. HxD and choose Extras -> Open disk -> Physical disks ->Removable Disk1. Then write (check it is present) your MBR boot loader and mark boot partiton as active in partition table. Then find (or open it as logical disk) the partition and write your stage 1 boot loader.
USB-FDD
Run e.g. HxD and choose Extras -> Open disk -> Physical disks ->Removable Disk1. Then write your floppy disk image.
If you have seen bad English in my words, tell me what's wrong, please.
Re: Create bootable CD, USB disk etc.
I did get a bootable CD working on Bochs, but I had to EXPLICITLY choose to boot from CD. Still not sure how to boot from USB.