Jump to content











Photo
- - - - -

Release candidate of plop with USB support


  • Please log in to reply
26 replies to this topic

#1 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 06 October 2007 - 10:24 AM

Finally it has been released :cheers: :
http://www.911cd.net...showtopic=20436

http://www.plop.at/d...mngrusblog.html
http://www.plop.at/bootmanager_en.html

jaclaz

#2 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 06 October 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. :cheers:

#3 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 06 October 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

#4 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 07 October 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).

#5 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

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 Alexei

Alexei

    Silver Member

  • .script developer
  • 664 posts

Posted 07 October 2007 - 03:39 PM

I'm rather :cheers:
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 :cheers:
I'll let you know when it becomes available :cheers:

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.

:cheers:

:cheers:
Alexei

#7 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

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 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 07 October 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 :cheers:) on the USB device.

As ktp suggested, it should do for USB devices what Smart Boot Manager (and BCDL :cheers: )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 Alexei

Alexei

    Silver Member

  • .script developer
  • 664 posts

Posted 07 October 2007 - 11:13 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.

I see now, thanks. BTW, does it have an option to use floppy as "initial boot device".
:cheers:
Alexei

#10 Alexei

Alexei

    Silver Member

  • .script developer
  • 664 posts

Posted 07 October 2007 - 11: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.

I see now, thanks. BTW, does it have an option to use floppy as "initial boot device".
:cheers:
Alexei

#11 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 08 October 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)!. :cheers:

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 :cheers:

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 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 08 October 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.cgsecurit...g/wiki/TestDisk
is capable to re-create/recover Partition Tables. :cheers:

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:

jaclaz

Attached Files



#13 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 08 October 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 ?

#14 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 08 October 2007 - 03:33 PM

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

title boot HDD image

map --mem (hd0,0)/small_hdd.ima (hd0)

map --hook

root (hd0,0)

chainloader +1


#15 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 08 October 2007 - 03:49 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

#16 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 08 October 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 :cheers:, 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:

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

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:

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 phox

phox

    Silver Member

  • .script developer
  • 764 posts

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: Attached File  MBRWiz.zip   66.93KB   676 downloads

#18 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 08 October 2007 - 04:55 PM

@ktp

Try this:
title boot HDD image

map --mem (hd0,0)/small_hdd.ima (hd0)

map --hook

chainloader (hd0)+1

rootnoverify (hd0)

jaclaz

#19 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 08 October 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).

#20 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 09 October 2007 - 09:30 AM

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


Good! :cheers:

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 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 09 October 2007 - 10:11 AM

Good! :cheers:

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 .


Did ALL images boot?

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

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

I did not remember exactly, but probably yes.

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.

#22 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

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? :cheers:

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

jaclaz

#23 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 09 October 2007 - 12:39 PM

@jaclaz
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 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 09 October 2007 - 02:58 PM

Nice! :cheers:

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 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 09 October 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...mp;#entry137275




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users