Creating Bootable USB from ISO
Creating Bootable USB from ISO
Hey everyone. I need a quick tip.
How do I create a bootable USB from my bootable ISO file that contains GRUB.
I tried dd, nothing, tried rufus nothing, tried just iso file nothing. Can't get my bootable ISO file to boot on real hardware.
I just want to insert my USB with iso image of my OS on it and press enter to select my menuenetery and boot my OS.
How do I create a bootable USB from my bootable ISO file that contains GRUB.
I tried dd, nothing, tried rufus nothing, tried just iso file nothing. Can't get my bootable ISO file to boot on real hardware.
I just want to insert my USB with iso image of my OS on it and press enter to select my menuenetery and boot my OS.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: Creating Bootable USB from ISO
Blocks are typically larger on a CD than they are on any other device, so just simply copying bytes from one to another probably won't work. You'll need to adjust your grub configuration and build a new disk image with a different file system to be able to boot from a USB drive.
You may, however, be able to mount both file systems and copy the files from your CD image to your USB drive.
You may, however, be able to mount both file systems and copy the files from your CD image to your USB drive.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Re: Creating Bootable USB from ISO
Right now I don't have any file system implementations. I am using RAW as my format. When I build my OS grub outputs single .iso file that contains my os and grub2 bootloader, I can boot that with qemu and bochs but can't boot it off my USB (aka real hardware).SpyderTL wrote:Blocks are typically larger on a CD than they are on any other device, so just simply copying bytes from one to another probably won't work. You'll need to adjust your grub configuration and build a new disk image with a different file system to be able to boot from a USB drive.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: Creating Bootable USB from ISO
GRUB probably expects a partition table if you are booting from a hard drive, so copying a CD image will probably never work.
You can either configure GRUB to build you a disk image (instead of an ISO file), or you can copy your ISO file to your formatted USB drive, and install GRUB on it, as well, and have GRUB mount your ISO file at boot time, and run the other GRUB boot loader.
I'm not a GRUB expert, though. Maybe someone else can be more helpful.
You can either configure GRUB to build you a disk image (instead of an ISO file), or you can copy your ISO file to your formatted USB drive, and install GRUB on it, as well, and have GRUB mount your ISO file at boot time, and run the other GRUB boot loader.
I'm not a GRUB expert, though. Maybe someone else can be more helpful.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
-
- Member
- Posts: 5587
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Creating Bootable USB from ISO
If you're creating the ISO with grub-mkrescue, it should be a hybrid ISO image and "just work" when you copy it to your flash drive with dd.
Does the ISO contain a MBR? If not, it isn't a hybrid ISO and can't be used on a flash drive. Verify using a hex editor or xxd or something.
Are you copying it to the correct device with dd? If you send it to /dev/sdb1 instead of /dev/sdb, it won't work.
Is your hardware capable of booting from USB? Try booting some other hybrid ISO to see if there might be some compatibility issues. (This is pretty unlikely to be the problem; isohybrid is very good at what it does.)
Does the ISO contain a MBR? If not, it isn't a hybrid ISO and can't be used on a flash drive. Verify using a hex editor or xxd or something.
Are you copying it to the correct device with dd? If you send it to /dev/sdb1 instead of /dev/sdb, it won't work.
Is your hardware capable of booting from USB? Try booting some other hybrid ISO to see if there might be some compatibility issues. (This is pretty unlikely to be the problem; isohybrid is very good at what it does.)
Re: Creating Bootable USB from ISO
Hmm, to create a disk image. I can try that and then just use "dd".SpyderTL wrote:GRUB probably expects a partition table if you are booting from a hard drive, so copying a CD image will probably never work.
You can either configure GRUB to build you a disk image (instead of an ISO file), or you can copy your ISO file to your formatted USB drive, and install GRUB on it, as well, and have GRUB mount your ISO file at boot time, and run the other GRUB boot loader.
I'm not a GRUB expert, though. Maybe someone else can be more helpful.
Great idea.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: Creating Bootable USB from ISO
MBR (Master Boot Record), I don't see MBR anywhere around, I only have: BasicOS.bin, boot and boot.catalog files on my USB.Octocontrabass wrote:If you're creating the ISO with grub-mkrescue, it should be a hybrid ISO image and "just work" when you copy it to your flash drive with dd.
Does the ISO contain a MBR? If not, it isn't a hybrid ISO and can't be used on a flash drive. Verify using a hex editor or xxd or something.
Are you copying it to the correct device with dd? If you send it to /dev/sdb1 instead of /dev/sdb, it won't work.
Is your hardware capable of booting from USB? Try booting some other hybrid ISO to see if there might be some compatibility issues. (This is pretty unlikely to be the problem; isohybrid is very good at what it does.)
Yeah, I am sure about my USB location (verified w/ GParted).
Both my PC and laptop can boot operating systems off an USB drive, not a compatibility issue, USB booting is enabled inside BIOS.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
-
- Member
- Posts: 5587
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Creating Bootable USB from ISO
The MBR is not a file in the ISO, it's the first 512 bytes of the ISO.
Re: Creating Bootable USB from ISO
Octocontrabass wrote:The MBR is not a file in the ISO, it's the first 512 bytes of the ISO.
This makes me feel noobish. I thought you were talking about MBR bootloader that Windows uses. *Insert facepalm here*
I guess I will have to use xxd and see what does my iso look like.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
- max
- Member
- Posts: 616
- Joined: Mon Mar 05, 2012 11:23 am
- Libera.chat IRC: maxdev
- Location: Germany
- Contact:
Re: Creating Bootable USB from ISO
I do it like this, works quite well: https://github.com/maxdev1/ghost/blob/m ... SBSTICK.md
Re: Creating Bootable USB from ISO
Thank you max, definitely going to try that one out.max wrote:I do it like this, works quite well: https://github.com/maxdev1/ghost/blob/m ... SBSTICK.md
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: Creating Bootable USB from ISO
Rufus works perfectly fine for me.
Maybe check your grub version?
Maybe check your grub version?
Re: Creating Bootable USB from ISO
@maxmax wrote:I do it like this, works quite well: https://github.com/maxdev1/ghost/blob/m ... SBSTICK.md
I don't own a Mac. I can not use those commands with Linux.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: Creating Bootable USB from ISO
GRUB2, what settings do you use?Ch4ozz wrote:Rufus works perfectly fine for me.
Maybe check your grub version?
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: Creating Bootable USB from ISO
I used standard settings.octacone wrote:GRUB2, what settings do you use?Ch4ozz wrote:Rufus works perfectly fine for me.
Maybe check your grub version?
Did you change the boot order in bios?
Booting from USB is usually the last option, before it is HDD, DVD/CD