You are not logged in.

#1 2011-06-06 19:55:17

janlukaz
Member
Registered: 2011-06-06
Posts: 4

Problem Booting From USB

I'm trying to make a multi-bootable USB flash drive using grub2.

I've managed to put a single ISO on my usb stick using ubuntu's universal usb installer, but it extracts the iso on the root of the drive, and I don't want that, mainly because I will put more isos in it, and I use it for other purposes.

I'm following the steps on http://www.pendrivelinux.com/boot-multi … ing-linux/

My first problem is that the grub from the usb stick boots fine on qemu, but when I try to boot it from my computer it says "Operating system not found", which is weird because if it boots from qemu then the MBR must be fine, right?

The second problem, which I couldn't test further because of the first problem, is that I don't know what to put on grub.cfg to boot archlinux 2010.05 netinstall dual, there are two vmlinuz26, one on /boot/i686 and the other on /boot/x86_64 inside the iso and I don't know how to chainload to its isolinux.

A sample entry on grub.cfg is:

menuentry "Ubuntu 10.10 Desktop ISO" {
 loopback loop /ubuntu.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso noeject #noprompt splash --
 initrd (loop)/casper/initrd.lz
}

Thanks in advance.
Jan

Offline

#2 2011-06-07 13:12:54

janlukaz
Member
Registered: 2011-06-06
Posts: 4

Re: Problem Booting From USB

I tried some other stuff and I think grub-install is not writing the right thing or is not writing at all cause I managed to use unetbootin through ubuntu to bootstrap the arch netinstall dual, and right after that I tried installing grub2 with the grub-install command ("grub-install --force --no-floppy --root-directory=/media/MULTIBOOT /dev/sdb") and now it gives me another error, it says syslinux couldn't find any configuration. Does anybody has any idea of how do I fix or setup properly the MBR of my USB stick??

Offline

#3 2011-06-07 13:52:57

janlukaz
Member
Registered: 2011-06-06
Posts: 4

Re: Problem Booting From USB

OK, I restarted the process from scratch, repartitioned my stick with fdisk, formatter with mkfs.vfat, but I tried installing grub with the following command instead:

grub-install --recheck --boot-directory=/media/MULTIBOOT/ /dev/sdb

I put the --recheck, not really sure what it does it just sounded safer, and removed --force and --no-floppy, now I get this error:

/usr/sbin/grub-setup: warn: Your embedding area is unusually small.  core.img won't fit in it..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.

I think I have to remake the partition scheme to start at the 2nd block, not sure though.

EDIT: Stil doesn't work. I left 2MB free before the first partition, made it with gparted. I got rid of the warning above, the same command now runs smooth, it boots grub2 nicely on qemu but my computer stil gives me a "Operating System not found". I don't get it, with unetbootin it works just fine, why doesn't it works when I try to install grub2 on it?
My computer's harddrive uses grub2 on the third primary pratition to boot, so the problem mustn't be it not being able to load grub2, qemu boots it just fine, so it mustn't be the MBR, does anybody has any idea of what I should try?

EDIT2: Ok, I decided trying to chainload grub2 from syslinux, I have no idea how, I used syslinux from unetbootin and I moved all syslinux files to /boot/syslinux, it loads the syslinux menu I tried a few things on syslinux.cfg to chainload to grub2, no success so far, does anybody knows how to do this, cause I'm kinda lost.

EDIT3: OK, I followed some parts of the guide at http://wiki.archlinux.org/index.php/Syslinux and I simply put two files on syslinux folder, chain.c32 and syslinux.cfg, my config is exactly like this:

DEFAULT chain.c32
COM32 chain.c32
APPEND file=/boot/grub/boot.img

It works as expected on qemu, it loads syslinux which quickly chains to grub2.
BUT it doesn't work on my computer!! mad
It seems to load syslinux very quickly, but as soon as it loads it goes black and reboots on my face!!! What the hell is wrong with it, I boot my system with GRUB2 so it must work on my computer, it works just fine on qemu! Is there anything I'm missing?

Last edited by janlukaz (2011-06-07 17:34:35)

Offline

#4 2011-06-07 17:27:33

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Problem Booting From USB

You need to leave 33 KiB gap after MBR for embedding of core.img in the USB drive. Also use

mkdir -p /media/MULTIBOOT/boot
grub_bios-install --no-floppy --recheck --boot-directory=/media/MULTIBOOT/boot /dev/sdb

My new forum user/nick name is "the.ridikulus.rat" .

Offline

Board footer

Powered by FluxBB