Printable Version of Topic

Click here to view this topic in its original format

Boot Land _ Boot Methods and various OS support _ Release candidate of plop with USB support

Posted by: jaclaz Oct 6 2007, 10:24 AM

Finally it has been released thumbsup.gif :
http://www.911cd.net/forums//index.php?showtopic=20436&hl=

http://www.plop.at/de/bootmngrusblog.html
http://www.plop.at/bootmanager_en.html

jaclaz

Posted by: Nuno Brito Oct 6 2007, 12:12 PM

What are the advantages of support to USB mass storage devices?

Does this mean it can replace GRUB on a computer to recognize USB disks?

Or can it be installed on the USB disk itself?


-------------

It also seems to come included with an internal hex editor to modify MBR - nice for quick experiments. smile.gif

Posted by: jaclaz Oct 6 2007, 01:23 PM

Theoretically it should provide from booting from USB devices even on machines which BIOS does not allow it.

i.e. it provides internally a USB stack/drivers, so that you do not need (like grub4dos or AFAIK any other bootloader) to rely on BIOS services.

jaclaz

Posted by: ktp Oct 7 2007, 10:01 AM

OK I play with it few minutes using QEMU/VMware.

It is a boot manager, requiring to write to MBR of your hard disk.
Of course it is not useful to install it to USB key (I believe it refuses to by conception).
Once installed (I guess, no real try) it can boot USB devices using built-in OHCI/UHCI (USB drivers), so effectively
it is useful for old BIOS that cannot directly boot from USB.

Unfortunately it requires an installation (write to MBR). I would prefer a solution like Smart Boot Manager
that can be used "on the fly" (either from floppy, from diskette image, from ISO image or CD) without
requiring installation. Smart Boot manager is useful previously to allow booting from CD (for old BIOSes not supporting this)
by booting first from diskette (or from diskette image, or of course from hard disk).

Posted by: jaclaz Oct 7 2007, 10:42 AM

QUOTE (ktp @ Oct 7 2007, 12:01 PM) *
It is a boot manager, requiring to write to MBR of your hard disk.


For the record, it also writes to a number of hidden sectors, (i.e. code is not contained in 512 bytes).

But the GOOD thing is that it provides a "low-level" USB stack, AFAIK it is the first of such code being around, the only meaningful test would be on real hardware without BIOS support for USB booting.

Another interesting test could be to install it to a (very small) HD image, saved on main hard disk and chainloaded by grub4dos.

If it works this way, you have a way to boot from USB on elder hardware without modifying the MBR of your "normal" hard disk.

jaclaz

Posted by: Alexei Oct 7 2007, 03:39 PM

I'm rather confused1.gif
If BIOS can read MBR it can read USB.
If BIOS can read USB, why use "low-level" USB stack?
In fact I solved USB Booting problem a while ago, but documentation, diagnostic utility, and installer took some time.
The last (rather serious things) are to make proper license agreement and find right e-business provider smile.gif
I'll let you know when it becomes available smile.gif

BTW (from http://www.plop.at/de/bootmngrusblog.html ):

QUOTE
Bad news: Something stange happens while testing the USB device booting function. On desktop pc's it works but on laptops it doesn't work. I don't know whats wrong.
roll1.gif

cheers.gif
Alexei

Posted by: ktp Oct 7 2007, 05:46 PM

QUOTE
jaclaz
Another interesting test could be to install it to a (very small) HD image, saved on main hard disk and chainloaded by grub4dos.


I am willing to try this. Could you post some details? fsz command, .pln content, ptedit32 HDD characteristics and the entry in menu.lst
to chainload the image from grub4dos.

I tried with a small HDD but I cannot make vdk mount it with partition, even after ptedit32/mbrfix. It still sees it as FLAT.

I already has an HDD image with plop installed, but it is big (2 GB). But what I miss is the menu.lst entry.

Posted by: jaclaz Oct 7 2007, 06:17 PM

@Alexei

The idea should be to install plop on the MBR and hidden sectors of the internal hard disk of a PC that has NO provisions in BIOS to boot from USB devices.

The PC thus boots "normally", then through the use of plop internal "stack" or whatever, you should be able to chainload the MBR (or bootsector unsure.gif) on the USB device.

As ktp suggested, it should do for USB devices what Smart Boot Manager (and BCDL smile.gif )did for PC which BIOS did not support CD-ROMs.

@ktp
As soon as I have some time I will post the minimum sizes for HD images to be mounted by VDK (I'm working on this right now for my MKIMG feature of MBRbatch.cmd).

jaclaz

Posted by: Alexei Oct 7 2007, 11:13 PM

QUOTE (jaclaz @ Oct 7 2007, 11:17 AM) *
@Alexei
The idea should be to install plop on the MBR and hidden sectors of the internal hard disk of a PC that has NO provisions in BIOS to boot from USB devices.
I see now, thanks. BTW, does it have an option to use floppy as "initial boot device".
cheers.gif
Alexei

Posted by: Alexei Oct 7 2007, 11:17 PM

QUOTE (jaclaz @ Oct 7 2007, 11:17 AM) *
@Alexei
The idea should be to install plop on the MBR and hidden sectors of the internal hard disk of a PC that has NO provisions in BIOS to boot from USB devices.
I see now, thanks. BTW, does it have an option to use floppy as "initial boot device".
cheers.gif
Alexei

Posted by: ktp Oct 8 2007, 08:03 AM

Inacceptable! Grrr...

As I said in previous post, I played around for few minutes with PLoP under QEMU.
It does not offer on the fly function to boot from USB/CD/floppy (as Smart bootmanager allows for CD/floppy).
It requires installation (on hard disk). So being a little impatient and having no news from jaclaz since yesterday for a small HDD image
to play with grub4dos, I decided to install on my real HDD. Then...

The installation goes ok. After reboot it takes control and presents a menu. You press 'u' to boot from USB, 'f' to boot from floppy etc...
I pressed 'u', it presents a new screen but no USB drives seen (I did plug my USB key), and a error message error loading driver somhow.
OK, refer to Alexei's post earlier where USB on laptop could have problems.

Now it has an uninstall function, OK I executed it. It uninstall OK (it says so, successful).
I reboot and... direct boot to PXE !
By experience I know this mean HDD boot failure so next boot on my BIOS is boot from network (PXE).
Hmm... I plug my precious rescue/tools multi-boot USB key and run Partition Magic 8.05. As expected, my hard disk is unallocated
(MBR destroyed somehow). OK, I reboot with option UBCD4Win and get to the desktop where I run Total Commander then HDHacker.
I can see that the HDD MBR is all reset to 0, with only AA55 signature. This is not what I called a successful uninstall by PLoP
(it should restore the MBR exactly in the state before the install, with at least additional checkings like HDD geometry/model to be sure
to restore the MBR to the right HDD where it was backuped)!. thumbdown.gif

OK as I have a backup MBR of my HDD, I put it back with HDHacker and reboot (without my USB key plugged). And of course
I got my usual XP desktop and all the data! A real relief thumbsup.gif

For me it is unacceptable to call it PLop Bootmanager v5.0rc1.
It must be labeled something as v0.01alpha1 !
Of course in the initial screen it said:
"Use this bootmanager at your own risk. Its (sic) possible to loose your data!"
OK, but this was not an user error, it is the uninstall function that really did not work!


Morale: you play with fire, you know what to be careful about.

Posted by: jaclaz Oct 8 2007, 11:08 AM

That's mainly why it is very convenient to have backups of at least MBR and Partition Tables and of each partition bootsector.

Should anyone have not used this precaution, and should disaster had happened, Testdisk:
http://www.cgsecurity.org/wiki/TestDisk
is capable to re-create/recover Partition Tables. thumbup.gif

Please find attached a .xls file with the settings you required.

You'll have to experiment with the different geometries untl you find one that Qemu will boot.

cheers.gif

jaclaz

 smallimgs.zip ( 3.97K ) : 7
 

Posted by: ktp Oct 8 2007, 12:07 PM

@jaclaz
The 2M and 16MB HDD do not boot under QEMU.
I will try other sizes. But the most important is how can I boot it under grub4dos?
Do you have a sample menu.lst please ?

Posted by: ktp Oct 8 2007, 03:33 PM

After browsing another topic in grub4dos, I guess the menu.lst entry would looks like this:

CODE
title boot HDD image
map --mem (hd0,0)/small_hdd.ima (hd0)
map --hook
root (hd0,0)
chainloader +1

Posted by: psc Oct 8 2007, 03:49 PM

QUOTE (jaclaz @ Oct 8 2007, 01:08 PM) *
That's mainly why it is very convenient to have backups of at least MBR and Partition Tables and of each partition bootsector.

@Jaclaz
I'm a developer, able to step through x86 Intel's and BG's machine code, but unfortunatelly I never did something with saving my MBR or partition tables (my degree of knowledge: I heard about them and have an idea what they are!)
If I did (fortunatelly rather seldom) something wrong, I recovered from a 'complete' backup.

Can you give a tutorial with some links of suggested programs to save (and restore!) such voodoo similar elements?

Peter

Posted by: jaclaz Oct 8 2007, 04:34 PM

@ktp
I have not a definite answer, a good entry is something like the one you posted, but not exactly that one (that one roots to hd0,0 and then chainloads first sector of it, i.e. the bootsector, by-passing the MBR)
I'll see if I can find one and post it.


@psc
Partition tables are a part of the MBR, more exactly 4 entries, each 16 bytes, at offset 446 of first sector of each Hard Disk.
The MBR is the entire first sector of each Hard Disk, so if you backup it you include the Partition Tables.

Since you definitely know your way with .cmd files smile.gif, if you check these two:
http://www.boot-land.net/forums/MakeBScmd-ALPHA-RELEASE-t2362.html
http://www.boot-land.net/forums/MBRBatch-001-ALPHA-t3191.html
both have, as "side effect" or feature, the ability to make a backup of HD sectors, respectively for bootsectors and MBR.

To "extract" and adapt the code to your needs should be trivial.

Both make use of dsfo/dsfi, part of the DSFOK toolkit.

Reduced to the minimum terms:

QUOTE
dsfo \\.\PHYSICALDRIVEn 0 512 Diskn.MBR

will produce a backup file of the MBR of Hard Disk n (first disk is 0, second is 1, etc.)
and
QUOTE
dsfo \\.\x: 0 512 Drivex.bs

will produce a backup file of the bootsector of Drive (partition) x (drive/partition letters as you see them under 2K/XP)
for FAT16 and FAT32 formatted drives/partitions.
For NTFS partitions you need to do:
QUOTE
dsfo \\.\x: 0 8192 Drivex.bs


To make a "real" backup of the MBR, however, I suggest to change the length for MBR to include all first 63 hidden sectors (MBR+62):
QUOTE
dsfo \\.\PHYSICALDRIVEn 0 32256 Diskn.MBR


If you have volumes (partitions) without a letter assigned, you can use the vlm utility, also part of the pakage, to find their ID.

There are of course a number of other utilities, some of them with GUI to do the same.

jaclaz

Posted by: phox Oct 8 2007, 04:42 PM

QUOTE (psc @ Oct 8 2007, 02:49 PM) *
@Jaclaz
I'm a developer, able to step through x86 Intel's and BG's machine code, but unfortunatelly I never did something with saving my MBR or partition tables (my degree of knowledge: I heard about them and have an idea what they are!)
If I did (fortunatelly rather seldom) something wrong, I recovered from a 'complete' backup.

Can you give a tutorial with some links of suggested programs to save (and restore!) such voodoo similar elements?

Peter


This is simplest way to manipulate MBR:  MBRWiz.zip ( 66.93K ) : 9

Posted by: jaclaz Oct 8 2007, 04:55 PM

@ktp

Try this:

CODE
title boot HDD image
map --mem (hd0,0)/small_hdd.ima (hd0)
map --hook
chainloader (hd0)+1
rootnoverify (hd0)


jaclaz

Posted by: ktp Oct 8 2007, 08:01 PM

@jaclaz

In fact the four HDD models in the speadsheet work with QEMU. I first tested them with QEMU manager (GUI)
but failed (no message, no VM started). But when I try with QEMU command line, it works. So the disk image is then used
using the menu.lst given above and it works too, on both QEMU and on real machine.

The test on real machine (laptop): USB key boots with grub4dos, invoking the small HDD image, PLoP is invoked,
I press 'u' to boot USB but then PLoP failed loading OHCD drivers, no devices found. It then tried to load UHCI drivers
but then hang.

Anyhow for me it is interesting to know that I can boot HDD image with grub4dos. This would be useful in several circumstances
(no real situation found yet).

Posted by: jaclaz Oct 9 2007, 09:30 AM

QUOTE
But when I try with QEMU command line, it works.


Good! smile.gif

Can you post the command line you used to start them in Qemu?

Did ALL images boot?

Using grub4dos installed in the MBR of "main" virtual disk, right?

Also, and for the record, a HD image mapped to memory won't actually boot a NT based system, only DOS/W9x/Me/Linux ones.

jaclaz

Posted by: ktp Oct 9 2007, 10:11 AM

QUOTE (jaclaz @ Oct 9 2007, 11:30 AM) *
Good! smile.gif

Can you post the command line you used to start them in Qemu?

CODE
qemu -M pc -fda plpbt50rc1.ima  -boot a -hda i:\outputiso\small_hdd.ima -m 256 -localtime -net nic -L .

The above command allows booting from the plop diskette then install it on the hard disk small_hdd.ima
Then the following command (-fda removed) allows booting from the small_hdd and experiment with plop (MBR written):
CODE
qemu -M pc -hda i:\outputiso\small_hdd.ima -m 256 -localtime -net nic -L .



QUOTE (jaclaz @ Oct 9 2007, 11:30 AM) *
Did ALL images boot?

I did not experiment all of them, but I "feel" that they should all work. :-)

QUOTE (jaclaz @ Oct 9 2007, 11:30 AM) *
Using grub4dos installed in the MBR of "main" virtual disk, right?

I did not remember exactly, but probably yes.

QUOTE (jaclaz @ Oct 9 2007, 11:30 AM) *
Also, and for the record, a HD image mapped to memory won't actually boot a NT based system, only DOS/W9x/Me/Linux ones.

OK, but a HDD image "normal" map (no --mem option) works. The image need to be contiguous though.

Posted by: jaclaz Oct 9 2007, 11:36 AM

QUOTE (ktp)
OK, but a HDD image "normal" map (no --mem option) works. The image need to be contiguous though.


Are you sure? hyper.gif

Can you post the entry you used and some more details?

jaclaz

Posted by: ktp Oct 9 2007, 12:39 PM

@jaclaz
Here it is:

CODE
fsz i:\outputiso\hdd_img.img 740275200

hdd_img.pln:
DRIVETYPE     ide
CYLINDERS     90
HEADS         255
SECTORS       63
ACCESS        "i:\outputiso\hdd_img.img" 0 1445850

ptedit32
0b-80-0-1-1-89-254-63-63-1445787

menu.lst (booting the HDD image inside another hard disk):
title boot HDD image
find --set-root /grldr
map (hd0,0)/hdd_img.img (hd0)
map --hook
chainloader (hd0)+1
rootnoverify (hd0)


Note: I used your spreadsheet smallimgs.xls to compute this HDD size around 705 MB.
I just retested once again under QEMU and all works perfectly.

Posted by: jaclaz Oct 9 2007, 02:58 PM

Nice! smile.gif

But what I meant was did you managed to install and boot a 2K or XP system on that image?

(I would have sworn that one would get a BSOD when the NT based system starts booting)

jaclaz

Posted by: ktp Oct 9 2007, 03:12 PM

During my experimentation I put VistaPE on it and boots OK Vista OK until QEMU
causes problem with ql40xx.sys (QLogic SCSI miniport). I know this is only a problem with Vista
because I cannot boot VistaPE under QEMU (but VistaPE under VirtualPC 2007 is OK, or under vmware).

Note: all that are done under simulation, I did try on real laptop but then get grub4dos Error 30 read error
at the line:
chainloader (hd0)+1

No clue?

I then change to big floppy image format, and now it works. Refer to this topic:
http://www.911cd.net/forums//index.php?showtopic=19439&st=0&#entry137275

Posted by: jaclaz Oct 9 2007, 05:07 PM

Yep, I saw it, but that is VISTA, that appears to have a rather different way of booting.

I was talking about 2K/XP/2003. rolleyes.gif

jaclaz

Posted by: ktp Oct 9 2007, 06:09 PM

@jaclaz

You are right. I retried with BartPE and got BSOD 0x6b process1_initialization_failed.
But could it be due to QEMU too, but I don't know how to test under VirtualPC2007 or VMware with diskimage.
I think I'd rather stop experimenting for the moment on the subject booting hard disk image :-).

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)