MSFN Forum: load grub2 from bootmgr - MSFN Forum

Jump to content


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

load grub2 from bootmgr

#1 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 15 August 2010 - 08:54 AM

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.

This post has been edited by patronu: 15 August 2010 - 09:23 AM



#2 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,578
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 15 August 2010 - 01:01 PM

View Postpatronu, on 15 August 2010 - 08:54 AM, said:

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

#3 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 15 August 2010 - 02:01 PM

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.

This post has been edited by patronu: 15 August 2010 - 02:04 PM


#4 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,578
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 16 August 2010 - 04:25 AM

View Postpatronu, on 15 August 2010 - 02:01 PM, said:

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...?showtopic=8944

Anyway, here is how to load grub2 from grub4dos:
http://www.boot-land...opic=11562&st=6

and viceversa:
http://www.boot-land...showtopic=10276

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

jaclaz

#5 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 16 August 2010 - 08:11 AM

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.

#6 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,578
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 16 August 2010 - 09:02 AM

View Postpatronu, on 16 August 2010 - 08:11 AM, said:

hp smartstart uses isolinux for booting from cd.

We've got that by now. :)

View Postpatronu, on 16 August 2010 - 08:11 AM, said:

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.

View Postpatronu, on 16 August 2010 - 08:11 AM, said:

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:
  • .iso images that will work "as is"
  • .iso images that will work with extracted kernel and initrd (not anymore "pure" .iso image booting)
  • .iso images that need particular commands/cheatcodes passed to the kernel
  • .iso images that need more complex changes inside the .iso (including in worst cases a recompile of the kernel :ph34r:)
  • .iso images that simply cannot be booted through .iso mapping



View Postpatronu, on 16 August 2010 - 08:11 AM, said:

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...showtopic=23104
http://www.boot-land...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...?showtopic=8258

jaclaz

This post has been edited by jaclaz: 16 August 2010 - 09:05 AM


#7 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 16 August 2010 - 10:54 AM

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.

Attached File(s)



#8 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,578
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 16 August 2010 - 11:26 AM

My guess is that the problem lies here:

Quote

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

#9 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 29-September 05

Posted 17 August 2010 - 07:16 AM

View Postpatronu, on 16 August 2010 - 08:11 AM, said:

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.h...d=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


#10 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 10 October 2010 - 10:12 AM

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

This post has been edited by patronu: 10 October 2010 - 10:17 AM


#11 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 29-September 05

Posted 11 October 2010 - 12:55 PM

View Postpatronu, on 10 October 2010 - 10:12 AM, said:

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.

#12 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 11 October 2010 - 01:06 PM

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?

#13 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 29-September 05

Posted 11 October 2010 - 10:52 PM

View Postpatronu, on 11 October 2010 - 01:06 PM, said:

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.

Quote

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.

Quote

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


Quote

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.

This post has been edited by cdob: 12 October 2010 - 12:19 AM


#14 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 01 November 2010 - 06:39 AM

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

#15 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 29-September 05

Posted 01 November 2010 - 10:55 AM

View Postpatronu, on 01 November 2010 - 06:39 AM, said:

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

Quote

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

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

http://grub4dos.sour...ki/index.php/Mr

Quote

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


What's your idea?

#16 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 01 November 2010 - 12:17 PM

I don't want to see the third partition :)
Also I found something with hide and unhide but right now I'm on windows xp and diskpart doesn't know to hide partition so I can't test.

#17 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 29-September 05

Posted 01 November 2010 - 05:36 PM

View Postpatronu, on 01 November 2010 - 12:17 PM, said:

I don't want to see the third partition :)

Why? Which part list a third partition?
Does HP SmartStart 8.50 fake isohybrid approach work at real hardware?
Most likely HP SmartStart 8.50 won't find MBR in memory. MBR at disk is used to mount partition.

Quote

Also I found something with hide
This use a partiton type, not used by current OS.
You may change the 0x06, try 0x82 or another one.

#18 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 14 November 2010 - 11:58 AM

I'm trying to test in a real environment but I get error 30: invalid argunment
I have 4 primary partition on the portable harddrive. I choose the fourth partition for this. I double checked the syntax but I don't see anything wrong.

#19 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,578
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 14 November 2010 - 12:09 PM

View Postpatronu, on 14 November 2010 - 11:58 AM, said:

I'm trying to test in a real environment but I get error 30: invalid argunment
I have 4 primary partition on the portable harddrive. I choose the fourth partition for this. I double checked the syntax but I don't see anything wrong.


Me too CANNOT see anything wrong, probably because I CANNOT see your syntax AT ALL! :whistle:

The general idea is:
  • you have a problem
  • you post what you did
  • someone tells you to try something else
  • you try it and report


Right now all you have done is posting bits and pieces with NO background, nor relation between them.

If you have problems with grub4dos syntax/commands DO USE command line (and NOT pre-made menu.lst entries):
http://diddy.boot-la...iles/basics.htm
http://diddy.boot-la...s/files/cli.htm

Post WHAT you are attempting to do, HOW you attempted doing it and the EXACT feedback grub4dos gave you, or get a standard reply #32:
http://www.boot-land...?showtopic=2587
:ph34r:

Compare with:
http://homepages.tes...ard-litany.html
:yes:

jaclaz

#20 User is offline   patronu 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 19-June 05

Posted 14 November 2010 - 12:14 PM

title HP SmartStart 8.60 x86 - fake isohybrid (hd0,4)
ls /tools/boot/hp/SS86.iso || find --set-root /tools/boot/hp/SS86.iso
ls (hd0,0)/tools/boot/hp/writeMBR.usb001 && partnew (hd0,4) 0x82 /tools/boot/hp/ss86.iso
root (hd0,4)
kernel /system/vmlinuz root=/dev/ram0 ramdisk_size=396332 initrd=system/initrd.img init=/bin/init media=usb rw loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 noexec32=off nox2apic splash=silent showopts
initrd /system/initrd.img

I hope you're happy now. I didn't post the entry from menul.lst because I was using the entry that cdob said. The only difference is that now I have tree partitions instead of two partions like it was the case in that example. So I think your comment is useless. Thank you.

This post has been edited by patronu: 14 November 2010 - 12:19 PM


Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy