Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

load grub2 from bootmgr


  • Please log in to reply
24 replies to this topic

#1
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
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, 15 August 2010 - 09:23 AM.



How to remove advertisement from MSFN

#2
jaclaz

jaclaz

    The Finder

  • Developer
  • 13,994 posts
  • OS:none specified
  • Country: Country Flag

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
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
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, 15 August 2010 - 02:04 PM.


#4
jaclaz

jaclaz

    The Finder

  • Developer
  • 13,994 posts
  • OS:none specified
  • Country: Country Flag

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
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
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
jaclaz

jaclaz

    The Finder

  • Developer
  • 13,994 posts
  • OS:none specified
  • Country: Country Flag

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:
  • .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


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

Edited by jaclaz, 16 August 2010 - 09:05 AM.


#7
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
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 Files



#8
jaclaz

jaclaz

    The Finder

  • Developer
  • 13,994 posts
  • OS:none specified
  • Country: Country Flag
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

#9
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 962 posts

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
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
I've done what you said but no luck. this time it freezes when it reads the disk.

Edited by patronu, 10 October 2010 - 10:17 AM.


#11
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 962 posts

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
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
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
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 962 posts

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, 12 October 2010 - 12:19 AM.


#14
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
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
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 962 posts

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.sour...ki/index.php/Mr

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


What's your idea?

#16
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
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
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 962 posts

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.

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
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
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
jaclaz

jaclaz

    The Finder

  • Developer
  • 13,994 posts
  • OS:none specified
  • Country: Country Flag

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
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
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.

Edited by patronu, 14 November 2010 - 12:19 PM.


#21
jaclaz

jaclaz

    The Finder

  • Developer
  • 13,994 posts
  • OS:none specified
  • Country: Country Flag
Just for your interest, last time I checked when counting with 0 based, 4th partition was (hd0,3) and NOT (hd0,4). :whistle:

You know, like in:
0
1
2
3

AND NOT like in:
0
1
2
4
as you seem to be used to.

I hope you're happy now.

Sure. :)


I didn't post the entry from menul.lst because I was using the entry that cdob said.


You didn't use what cdob suggested, you tried a variation of it, without understanding that what cdob posted was ALREADY relative to last (4th partition) and that in grub4dos (hd0,4) means "first logical volume inside Extended Partition".

So I think your comment is useless. Thank you.


You are welcome. :)

Go trying helping people....:(

I'll refrain from posting any more useless comments, or comments at all.

Be well. :)

:hello:

jaclaz

Edited by jaclaz, 14 November 2010 - 12:35 PM.


#22
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts
it doesn't matter if it is 3 or 4. it's the same error.

#23
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 962 posts
Try a current grub4dos.

Boot grub4dos, open a command prompt, enter line by line.

#24
patronu

patronu

    Junior

  • Member
  • Pip
  • 86 posts

Try a current grub4dos.

Boot grub4dos, open a command prompt, enter line by line.

I have the latest grub4dos. I tried line by line and it seems that partnew is the problem. if I specify first or second partition I get that it can't use the partion because it's used. I believe that there is a problem with the drive because it has 200gb. the last time that it worked I had an 80gb drive with 3 partitions. I'll try with a smaller drive to see if this is the problem. and where can I get the latest grub4dos. the last official version seems to be from 2009. now I have version 0.4.4.

#25
jaclaz

jaclaz

    The Finder

  • Developer
  • 13,994 posts
  • OS:none specified
  • Country: Country Flag

I have the latest grub4dos
......
now I have version 0.4.4.

Latest is tinybit grub4dos-0.4.5b-2010-11-04.zip or chenall grub4dos-0.4.5b-2010-11-18-fix.zip

Current is grub4dos-0.4.4-2009-10-16.zip

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN