Jump to content











Photo
- - - - -

Multiple boot partitiions on the same drive


  • Please log in to reply
65 replies to this topic

#51 was_jaclaz

was_jaclaz

    Finder

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

Posted 04 March 2009 - 07:48 PM

GOOD. :cheers:

The Rule of the Thumb is easy:
DONT DO LIKE I'M DOING NOW :cheers:, and use only small letters for anything in grub4dos menu.lst (exception made for the text in the title, which of course is completely "free") including file and directory names.

Same thing cannot be done on CD, where filenames/paths are CaSe SeNsItIvE.

The uuid grub4dos "understands" is the result of issuing the command uuid :cheers: when having root on a given partition.

What do you mean by "legacy machines"? :cheers:

:cheers:

jaclaz

#52 Luca's

Luca's

    Member

  • Members
  • 38 posts
  •  
    Italy

Posted 05 March 2009 - 09:17 AM

Perfect.

What do you mean by "legacy machines"?

I mean old machines where CHS definition is used..

anyway i must say i'm eager: if this solution works, only step left is to populate the multiboot partition (and i imagine it is sufficient to edit the menu.lst created by winsetupfromusb).

#53 was_jaclaz

was_jaclaz

    Finder

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

Posted 05 March 2009 - 10:08 AM

Perfect.


I mean old machines where CHS definition is used..

anyway i must say i'm eager: if this solution works, only step left is to populate the multiboot partition (and i imagine it is sufficient to edit the menu.lst created by winsetupfromusb).

Hmmm, :cheers:, it's not that easy to "draw a line" between "old" machines that use CHS and "new" machines that use LBA, there are also machines that have other limits in BIOS, it's largely a "hit and miss" game.

And yes :cheers:, all you have to do is continue experimenting, adding things to the partitions and to menu.lst.

jaclaz

#54 Luca's

Luca's

    Member

  • Members
  • 38 posts
  •  
    Italy

Posted 05 March 2009 - 10:23 AM

ah, okay.
so, should we consider the problem solved? :cheers:

#55 was_jaclaz

was_jaclaz

    Finder

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

Posted 05 March 2009 - 10:38 AM

ah, okay.
so, should we consider the problem solved? :cheers:


The problem is not "solved", it is just very, very improbable that it may happen.

Once it will be reported to happen tinybit may have a reason to spend lots of time :cheers: to find a solution to it.

If you want to make SURE that you won't suffer from the problem, simply do not use the partnew command.

Start experimenting with grub4dos internal "dd" command.

Basically:
1) you create a given MBR with all addresses correctly set and tested
2) you make a backup of it "somewhere" (file or unused hidden sector
3) loop to 1) untill you have all the MBR's versions you need
4) instead of partnew you use grub4dos dd to copy back and forth the MBR sector you want to boot with

This way "nothing" is left to possible "arbitrary" assumptions of the partnew address LBA to CHS translation, you simply copy over fixed data you are sure of.

Or, alternatively, get back to the Freefdisk or MBRWiz approach after having booted DOS.
http://www.boot-land...?...=7138&st=28

all in all booting DOS on a modern machine will take only a few seconds more than just boting to grub4dos.

:cheers:

jaclaz

#56 Luca's

Luca's

    Member

  • Members
  • 38 posts
  •  
    Italy

Posted 05 March 2009 - 04:45 PM

so, thank you very much for all of your precious help and suggestions. :cheers:

i will adopt this strategy: to use partnew, and then if i have any problem to report it.
anyway i believe i won't need to.
thank you again.

#57 was_jaclaz

was_jaclaz

    Finder

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

Posted 05 March 2009 - 05:06 PM

Only too happy to have been of help. :cheers:

Too bad I couldn't trick you :cheers: into doing some more experiments. :cheers:

We'll have to wait for some other people volunteering.....:cheers:

jaclaz

#58 Luca's

Luca's

    Member

  • Members
  • 38 posts
  •  
    Italy

Posted 05 March 2009 - 07:09 PM

what do you want to test?
i could do with another stick: it's only 1gb but for experiments it could fit....
if we begin to test, well, just one reservation: i will be here once in a while (or anyway less than before). my web connection bill is not so cheap, as things are :cheers:

#59 was_jaclaz

was_jaclaz

    Finder

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

Posted 05 March 2009 - 07:47 PM

No prob. :cheers:

We are here for fun, one of the main Rules of the Board is #12 :cheers: , and there is the unwritten one that "real" life has ALWAYS preedence over "online" one.


what do you want to test?

Check whether the dd command can be used to swap MBR's between real one and copies of them, if it takes noticeably more time, and the like.



i.e. something along the lines of:
title backup current MBR to sector 62

dd if=(hd0) of=(hd0) bs=512 count=1 skip=0 seek=61





title find and load NTLDR of Windows NT/2K/XP

Partnew (hd0,3) 0x17 (hd0,0)+1

Partnew (hd0,0) 0x07 (hd0,1)+1

Partnew (hd0,1) 0x17 (hd0,3)+1

Partnew (hd0,3) 0 0 0

find --set-root uuid () a7e931de-01a7-11de-abf5-005056c00008

chainloader /ntldr



title restore backed up MBR from sector 62

dd if=(hd0) of=(hd0) bs=512 count=1 skip=61 seek=0

jaclaz

#60 Luca's

Luca's

    Member

  • Members
  • 38 posts
  •  
    Italy

Posted 06 March 2009 - 01:26 PM

So.
Situation is the same as before:

First partition: setups
Second: data
Third: truecrypt

Only differences are in the stick's disk-space, and in the fact that this time i didn't hide the truecrypt partition.
Here is a screenshot how the partition table looked like the very first time i created the partitions (with disk management):
beeblebrox.jpg
Setups is 200mb
Data is 700mb
Truecrypt is 60mb.

Run first 'title' entry, then run second 'title' entry: main result is partitions order successfully changed (checked within windows).
Run third 'title' entry: result is MBR restored (checked within windows).
It works 100% and it is at least as fast as the other method. Excellent. :cheers:
Do you mean this method also copies the CHS definition? If so, i think i will shift to it.

I don't understand though: why the 62nd sector and not, for example, the 63rd? And: couldn't it be overwritten by chance by some disk writing operation?

We have not tried cdob's way anyway. I would have liked to experience what differs in the partition table between primary and logical partitions, and what method is used by logical partitions to address the disk sectors (LBA, CHS, and so on)...

#61 was_jaclaz

was_jaclaz

    Finder

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

Posted 06 March 2009 - 02:08 PM

Thanks for testing and reporting. :cheers:

Yes, no problems with CHS, this method copies the WHOLE MBR, as-is. (of course if the CHS in the original MBR is wrong.....:cheers:)

On a normal HD, first Head is 63 sectors.

Normally, 1st sector contains the MBR. (sector 1)

When grub4dos is installed to the MBR (grldr.mbr), it occupies a certain number of the first hidden sectors, in current release, the first 18. (older release are more "compact" if I am not mistaken)

grldr.mbr provides an empty sector (sector 2) to hold a copy of the original MBR.

See grub4dosreadme:

Optionally, if the MBR in the hard disk is a single sector MBR created by
Microsoft FDISK, it may be copied onto the second sector of GRLDR.MBR.

The second sector of GRLDR.MBR is called "previous MBR". When GRLDR not found,
"previous MBR" will be started.


If I am not mistaken, you need a total of 3 "exchangeable" MBR's, thus I thought that it could be suitable to:
- backup "base" MBR to sector 2 (as per default)
- backup "1st changed" MBR to sector 62
- backup "2nd changed" MBR to sector 63

This way if in future grldr.mbr "expands", the settings remain valid until it becomes 30.5 Kbytes (61 sectors).

Writing to the 62nd sector was just to test with one of the "set in my mind" available addresses.

As my personal view on the matter, of the 63 hidden sectors, 1st should be occupied by a "conventional" MBR and the other 62 should be empty. :cheers:

This is being OVERcautious, but there are some programs, mainly partition managers like Partition Magic and Acronis products (did I say how I don't trust them fully? :cheers:) and a number of very old DOS Commercial programs that use the hidden sectors to "authenticate" themselves.

Once you decide to "forfait" the "rigorous", "integralist" if you prefer, usage of the hidden sectors to allow for grub4dos grldr.mbr, I guess you can also use a couple more sectors to store the backups of the MBR. :cheers:

You can also use a "normal" file in a partition (512 bytes in size - that you MUST create BEFORE using the grub4dos dd command) as "storage", but maybe it's even more prone to be overwritten/deleted by mistake. :cheers:


You shouldn't have any problem in testing cdob's way with an XP image.
The image must be NOT containing a MBR.
You can creatre/mount format one with IMDISK:
http://www.boot-land...hp?showforum=59
http://www.ltr-data.se/opencode.html

My idea with extended partition and volumes in it, was simply because since the address in the MBR to the Extended Partition points to the EPBR and not to actual Volumes inside it, maybe when booting XP won't see the (fake-primary) entry 0 created by partnew as a duplicate of the one in the various EPBR's:
http://www.boot-land...?...=7138&st=33

I guess that it can be now considered irrelevant/unuseful in your case, though it may have some merits for some other use. :cheers:

Personally I see the last tested approach (backing up and restoring the whole MBR) as the "safest".

:cheers:

jaclaz

#62 Luca's

Luca's

    Member

  • Members
  • 38 posts
  •  
    Italy

Posted 07 March 2009 - 02:07 PM

it occupies a certain number of the first hidden sectors, in current release, the first 18.

mm, during my experiments i have seen it's actually around 15/16.
anyway, i agree with all that you said. no urgent need to experiment the cdob's way too.

let me say i have now tested the whole thing following the MBR backup way.
i have modified some details: data is the first partition, there is no choice to backup the MBR in menu.lst (only to restore it, since i had already backed it up to sector 62 with hdhacker), and i have added a choice just for the partnew commands to exchange the partition table entries. The core is the same though. And it works.
I am perfectly satisfied now, and i feel i could write a how-to guide.
Even if, to be honest: how can i locate in the first sector of the disk the hex part where the LBA and CHS values are saved?
thanks once again :cheers:

#63 was_jaclaz

was_jaclaz

    Finder

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

Posted 07 March 2009 - 04:39 PM

Even if, to be honest: how can i locate in the first sector of the disk the hex part where the LBA and CHS values are saved?
thanks once again :cheers:


Hmmm :cheers:

Searching/reading? :cheers:
http://thestarman.pc.../mbr/index.html
http://thestarman.pc...br/Win2kmbr.htm
http://thestarman.pc...in2kmbr.htm#CHS

http://www.boot-land...?showtopic=2959
http://www.boot-land...topic=2959&st=2
http://home.att.net/...ot/w98b_mbr.htm
http://home.att.net/....htm#TblEntries

http://en.wikipedia....ter_boot_record


Using a Hex Editor that allows the use of templates? :cheers:
(most Commercial ones will have this feature)

http://en.wikipedia....iki/Disk_editor

Freeware:
http://apps.tempel.org/iBored/


Freeware, but you will need to write a Template or Structure Viewer for MBR:
http://www.hhdsoftwa...ditor-free.html
http://www.kibria.de/frhed.html

Tiny Hexer (recommended :cheers:), here:
http://www.mirkes.de/files/
http://www.mirkes.de/files/mpth_18.exe

(it already has Structure viewer for FAT16,32 and NTFS bootsectors, but not for MBR, it should not be difficult to write a decent template for MBR)

:cheers:

jaclaz

#64 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 06 February 2010 - 02:41 PM

wow! great thread. I need to read it ten more times. reminds me why I had to take a break from Boot-land.

I was loosing lots of sleep from reading all night every night combined with TMIS (Too Much Information Syndrom)

hey Luca's, about that how-to guide..

#65 Luca's

Luca's

    Member

  • Members
  • 38 posts
  •  
    Italy

Posted 06 February 2010 - 05:12 PM

hey Luca's, about that how-to guide..



well...i wrote 'i could' for i knew i would had put no guide down in the near future. i know myself too bad LOL
well, i have an iso image saved. but the language of the OS to be installed is italian, so it would be of no use.

i can't write a guide now.
i have not time.
maybe after my exams. see you!

#66 Motasem

Motasem

    Frequent Member

  • Advanced user
  • 169 posts
  • Interests:War Make's Men And Problems Make's You Expert
    MooT®
  •  
    Jordan

Posted 18 March 2013 - 11:38 PM

great thread :thumbsup:






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users