Release candidate of plop with USB support
#1
Posted 06 October 2007 - 10:24 AM
http://www.911cd.net...showtopic=20436
http://www.plop.at/d...mngrusblog.html
http://www.plop.at/bootmanager_en.html
jaclaz
#2
Posted 06 October 2007 - 12:12 PM
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.
#3
Posted 06 October 2007 - 01:23 PM
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
#4
Posted 07 October 2007 - 10:01 AM
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).
#5
Posted 07 October 2007 - 10:42 AM
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
#6
Posted 07 October 2007 - 03:39 PM
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
I'll let you know when it becomes available
BTW (from http://www.plop.at/d...mngrusblog.html ):
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.
Alexei
#7
Posted 07 October 2007 - 05:46 PM
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.
#8
Posted 07 October 2007 - 06:17 PM
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 ) on the USB device.
As ktp suggested, it should do for USB devices what Smart Boot Manager (and BCDL )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
#9
Posted 07 October 2007 - 11:13 PM
I see now, thanks. BTW, does it have an option to use floppy as "initial boot device".@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.
Alexei
#10
Posted 07 October 2007 - 11:17 PM
I see now, thanks. BTW, does it have an option to use floppy as "initial boot device".@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.
Alexei
#11
Posted 08 October 2007 - 08:03 AM
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)!.
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
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.
#12
Posted 08 October 2007 - 11:08 AM
Should anyone have not used this precaution, and should disaster had happened, Testdisk:
http://www.cgsecurit...g/wiki/TestDisk
is capable to re-create/recover Partition Tables.
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.
jaclaz
Attached Files
#13
Posted 08 October 2007 - 12:07 PM
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 ?
#14
Posted 08 October 2007 - 03:33 PM
title boot HDD image map --mem (hd0,0)/small_hdd.ima (hd0) map --hook root (hd0,0) chainloader +1
#15
Posted 08 October 2007 - 03:49 PM
@JaclazThat's mainly why it is very convenient to have backups of at least MBR and Partition Tables and of each partition bootsector.
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
#16
Posted 08 October 2007 - 04:34 PM
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 , if you check these two:
http://www.boot-land...EASE-t2362.html
http://www.boot-land...LPHA-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:
will produce a backup file of the MBR of Hard Disk n (first disk is 0, second is 1, etc.)dsfo \\.\PHYSICALDRIVEn 0 512 Diskn.MBR
and
will produce a backup file of the bootsector of Drive (partition) x (drive/partition letters as you see them under 2K/XP)dsfo \\.\x: 0 512 Drivex.bs
for FAT16 and FAT32 formatted drives/partitions.
For NTFS partitions you need to do:
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):
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
#17
Posted 08 October 2007 - 04:42 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.93KB 676 downloads
#18
Posted 08 October 2007 - 04:55 PM
Try this:
title boot HDD image map --mem (hd0,0)/small_hdd.ima (hd0) map --hook chainloader (hd0)+1 rootnoverify (hd0)
jaclaz
#19
Posted 08 October 2007 - 08:01 PM
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).
#20
Posted 09 October 2007 - 09:30 AM
But when I try with QEMU command line, it works.
Good!
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
#21
Posted 09 October 2007 - 10:11 AM
Good!
Can you post the command line you used to start them in Qemu?
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):
qemu -M pc -hda i:\outputiso\small_hdd.ima -m 256 -localtime -net nic -L .
I did not experiment all of them, but I "feel" that they should all work. :-)Did ALL images boot?
I did not remember exactly, but probably yes.Using grub4dos installed in the MBR of "main" virtual disk, right?
OK, but a HDD image "normal" map (no --mem option) works. The image need to be contiguous though.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.
#22
Posted 09 October 2007 - 11:36 AM
OK, but a HDD image "normal" map (no --mem option) works. The image need to be contiguous though.
Are you sure?
Can you post the entry you used and some more details?
jaclaz
#23
Posted 09 October 2007 - 12:39 PM
Here it is:
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.
#24
Posted 09 October 2007 - 02:58 PM
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
#25
Posted 09 October 2007 - 03:12 PM
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...mp;#entry137275
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users