patronu

load grub2 from bootmgr

25 posts in this topic

Is it possible to load grub2 from bootmgr?

Maybe I should explain what I want to do. I have a portable usb hdd. I use windows 7 boot loader. It has a menu with 3 options (winpe3 x86,winpe3 x64 and grub4dos).

The only problem is that I want to boot some iso images. THese iso images are hp smartstart cd and firmware maintenance cd. The problem with these two images is that they don't know about ntfs partitios. So I have to make another partition with fat32. This sucks, but I know that grub2 can boot iso images and maybe this can help to boot directly from iso. Also, it is a possible to make hp smartstart and firmware cd to have ntfs support but I'm no expert in linux. Maybe someone can help. Thank you.

Edited by patronu
0

Share this post


Link to post
Share on other sites

Is it possible to load grub2 from bootmgr?

Maybe I should explain what I want to do. I have a portable usb hdd. I use windows 7 boot loader. It has a menu with 3 options (winpe3 x86,winpe3 x64 and grub4dos).

The only problem is that I want to boot some iso images. THese iso images are hp smartstart cd and firmware maintenance cd. The problem with these two images is that they don't know about ntfs partitios. So I have to make another partition with fat32. This sucks, but I know that grub2 can boot iso images and maybe this can help to boot directly from iso. Also, it is a possible to make hp smartstart and firmware cd to have ntfs support but I'm no expert in linux. Maybe someone can help. Thank you.

I don't get it. :unsure:

grub4dos supports booting SOME .iso images (the SAME ones that grub2 can load).

jaclaz

0

Share this post


Link to post
Share on other sites

I believed that grub2 can do a lot more than grub4dos does. So this sucks. I know that grub4dos use iso emulation or something and that the cd image has to support this but those cd's use isolinux. so that means that booting from iso will not work.

Edited by patronu
0

Share this post


Link to post
Share on other sites

I believed that grub2 can do a lot more than grub4dos does. So this sucks. I know that grub4dos use iso emulation or something and that the cd image has to support this but those cd's use isolinux. so that means that booting from iso will not work.

I still don't get it. :(

It seems to me like you don't want to solve a problem, but rather continue hanging on your personal assumptions. :w00t:

There is NOT one reason in the word why the fact that the cd's use isolinux and not another loader should create a problem, the problems are only in the way the actual OS in the .iso is set:

http://www.boot-land.net/forums/index.php?showtopic=8944

Anyway, here is how to load grub2 from grub4dos:

http://www.boot-land.net/forums/index.php?showtopic=11562&st=6

and viceversa:

http://www.boot-land.net/forums/index.php?showtopic=10276

For the record capabilities of grub4dos and grub2 are VERY similar (they are actually coded by mostly the same people).

jaclaz

0

Share this post


Link to post
Share on other sites

hp smartstart uses isolinux for booting from cd. how to use grub4dos (I don't care if I use gru4dos or grub2) to boot from that iso? That's what I want to do. Maybe someone with more experience with linux and especially with hp smartstart can help.

0

Share this post


Link to post
Share on other sites

hp smartstart uses isolinux for booting from cd.

We've got that by now. :)

how to use grub4dos (I don't care if I use gru4dos or grub2) to boot from that iso?

Now, this starts being a better question. :thumbup

I have NO way to know HOW "HP startsmart" works, but if you post the contents of the isolinux .cfg file(s) I may be able to help you in putting together an appropriate grub4dos set of commands, which may or may not work, see below.

That's what I want to do.

Small correction, this is it what you would like to do (if possible :whistle: ), as said it mainly depends on how the actual .iso is built, in the case of Linux based boot CD's typically there are:

  1. .iso images that will work "as is"
  2. .iso images that will work with extracted kernel and initrd (not anymore "pure" .iso image booting)
  3. .iso images that need particular commands/cheatcodes passed to the kernel
  4. .iso images that need more complex changes inside the .iso (including in worst cases a recompile of the kernel :ph34r:)
  5. .iso images that simply cannot be booted through .iso mapping

Maybe someone with more experience with linux and especially with hp smartstart can help.

Surely, if the thingy is case #3 or #4 above.

What you would have found had you googled a bit before:

http://www.911cd.net/forums//index.php?showtopic=23104

http://www.boot-land.net/forums/index.php?showtopic=11527

You can start where Samman or jvenables left.... :angel

Maybe you can use newish Syslinux/memdisk .iso mapping features...

http://www.boot-land.net/forums/index.php?showtopic=8258

jaclaz

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

I found some interesting things in those links. some of them I already knew and on bootland forum's I can't register. to many users.

about those 5 methods you say, I don't have a problem if method 2 works. grub4dos loads the kernel and I get a graphical menu but it never passes this if i use ntfs partition. that's why I'm searching for a way to boot from iso.

Also I attached isolinux.cfg and the init script. From the init script I believe that it's not possible to boot the iso like partedmagic. But maybe I'm wrong. I'm no expert with linux.

init.txt

isolinux.txt

0

Share this post


Link to post
Share on other sites

My guess is that the problem lies here:

kernel hpboot_v.c32

append vmlinuz initrd=initrd.img media=cdrom rw root=/dev/ram0 ramdisk_size=305836 init=/bin/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 splash=silent showopts TYPE=AUTOMATIC

as you can see on the given thread, this on USB becomes media=usb

Now, it is possible that there is another cheat code for .iso images.

You chould try understanding which "base" distro is used for this CD, maybe there is one, some have a "fromiso" kind of parameter....

As well it is possible that changing the init is necessary. :unsure:

There is even a third possibility, which is using something similar to the hmload approach (check the README_GRUB4DOS.txt) i.e. copying the whole image to rd(0) or use the memdisk approach, but really cannot say.

You are most probably in case #3 or #4 :(.

What you report about boot-land is strange, a number of members have joined in the last hour or so.

If you detail what is happening when you trying to register, I may be able to post a "bug thread" there.

jaclaz

0

Share this post


Link to post
Share on other sites
hp smartstart uses isolinux for booting from cd. how to use grub4dos (I don't care if I use gru4dos or grub2) to boot from that iso?

HP SmartStart dosn't support ISO file booting. A work around is required.

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&prodNameId=344318&prodTypeId=18964&prodSeriesId=345557&swEnvOID=1005&taskId=135&swLang=13

Do you have a free partition entry at USB?

You may map a continous ISO file /images/SS850.iso to a partition entry.

This changes MBR permanent, be careful.

As for safety there is a flag file /images/writeMBR.usb001 used. Create the flag file.

Assumption: BIOS may USB boot drive to hd0. As fas as I remember HP does do this.

At grub4dos menu.lst


title HP SmartStart 8.50 x86 - fake isohybrid (hd0,3) \n\nWARNING: changes partition table hd0,3
ls /images/SS850.iso || find --set-root /images/SS850.iso
ls (hd0,0)/images/writeMBR.usb001 && partnew (hd0,3) 0x06 /images/SS850.iso
root (hd0,3)
kernel /system/vmlinuz media=usb rw root=/dev/ram0 ramdisk_size=399480 init=/bin/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 noexec32=off nox2apic splash=silent showopts
initrd /system/initrd.img

0

Share this post


Link to post
Share on other sites

I've done what you said but no luck. this time it freezes when it reads the disk.

Edited by patronu
0

Share this post


Link to post
Share on other sites
this time it freezes when it reads the disk.

Can you clarify: which part does freeze?

Open grub4dos command line and enter commands.

At qemu 64 bit machine at 32 bit CPU:

I get up to a round blue HP logo. Next a long delay or freeze: false hardware.

0

Share this post


Link to post
Share on other sites

At hp logo it freeze. I'm also testing on a virtual machine. Right now I have virtualbox. I didn't specify clearly.

And I have a question about your method. How dangerous it is? Can I delete a partition from server? What MBR does it change? The one from usb? That means that after it creates the third partition I will see a third partition on my usb disk?

0

Share this post


Link to post
Share on other sites
I'm also testing on a virtual machine.

Does HP SmartStart work at a virtual machine? A server maintenance CD may test hardware.

Try a server maintenance CD at real hardware.

Can I delete a partition from server? What MBR does it change?

Remember the flag file: /images/writeMBR.usb001

If you add grub4dos, store /images/SS850.iso and add /images/writeMBR.usb001 to server

And boot from the server, then MBR is changed.

That's unlikely to happen.

So it's pretty unlikely a change at server in real life.

The one from usb?
Yes, MBR at USB.

That's a one time change at USB MBR:

you may remark the partnew line at menu.lst now:

title HP SmartStart 8.50 x86 - fake isohybrid (hd0,3)
ls /images/SS850.iso || find --set-root /images/SS850.iso
#ls (hd0,0)/images/writeMBR.usb001 && partnew (hd0,3) 0x06 /images/SS850.iso
root (hd0,3)
kernel /system/vmlinuz media=usb rw root=/dev/ram0 ramdisk_size=399480 init=/bin/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 noexec32=off nox2apic splash=silent showopts
initrd /system/initrd.img

Or with media=cdrom:

title HP SmartStart 8.50 x86 - fake isohybrid (hd0,3)
ls /images/SS850.iso || find --set-root /images/SS850.iso
#ls (hd0,0)/images/writeMBR.usb001 && partnew (hd0,3) 0x06 /images/SS850.iso
root (hd0,3)
kernel /system/vmlinuz media=cdrom rw root=/dev/ram0 ramdisk_size=399480 init=/bin/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 noexec32=off nox2apic splash=silent showopts
initrd /system/initrd.img

That means that after it creates the third partition I will see a third partition on my usb disk?
This depends on used hardware (removable or fixed) and operating system.

Linux mount the partition usually. HP SmartStart may see another partition or not.

Edited by cdob
0

Share this post


Link to post
Share on other sites

Hello. Is it possible to modify the mbr in memory? I saw something like that in the documentation of grub4dos. It's an example for loading recovery console. link

0

Share this post


Link to post
Share on other sites
Is it possible to modify the mbr in memory? I saw something like that in the documentation of grub4dos.

map --in-situ changes mbr in memory

map --in-situ (hd0,4)+1 (hd0)

Mapping is active at real mode. Mapping is lost at protected mode.

http://grub4dos.sourceforge.net/wiki/index.php/Mr

it's also possible to write the MBR into a file and chainload it

What's your idea?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.