Jump to content











Photo
- - - - -

Dual Booting Properly Using G4D


  • Please log in to reply
17 replies to this topic

#1 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 07 September 2010 - 07:56 PM

Hi Guys

Decided it's time to start using g4d as a my main boot loader so I can have dual boot set up and when in each OS the other ones are "hidden" so it's all clean and no file path problems etc.

Any way I read the manual and have tested the geometry and got this from the grubinst parlist

(hd0,0) win 7 reserved (hd0,1) win 7 C: (hd0,2) XP

So I wrote a test menu.lst and just wanted to run this by you to see if I made any mistakes before ruining my computer LOL - thnaks

edit oh and its raid-0 too anything I should know?


title Windows 7 Home Premium 64 Bit

Hide (hd0,2)

chainloader /BOOTMGR



title Windows XP Pro 64 Bit

Hide (hd0,0)

Hide (hd0,1)

Unhide (hd0,2)

chainloader /NTLDR


#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 September 2010 - 08:52 PM

Try the commands ONE BY ONE on command line BEFORE running a menu.lst, ALWAYS, but expecially when you are experimenting for the first times.

Read the basics:
http://diddy.boot-la...iles/basics.htm
http://diddy.boot-la...s/files/cli.htm

There is NO "Hide" command, NOR "Unhide" command in grub4dos (there are a "hide" and an "unhide" ones :D)

Your menu.lst entries are NOT "symmetrical" (this has nothing to do with grub4dos and it's syntax, it's simply a missing link in a logical chain).

Say you start with "Windows XP Pro 64 Bit":
  • partition (0.0) is made hidden
  • partition (0,1) is made hidden
  • partition (0,2) is made visible

Now you reboot and choose "Windows 7 Home Premium 64 Bit":
  • partition (0.0) is ALREADY hidden
  • partition (0,1) is ALREADY hidden
  • partition (0,2) is made hidden
Question:
How many partitions are visible? :D

I hope you get the point....

ANYWAY, you completely miss either an absolute reference, like:
chainloader (hd0,0)/BOOTMGR
or
chainloader (hd0,2)/NTLDR

or establishing a root, then use a relative reference, like:
root (hd0,0)

chainloader /BOOTMGR
or
root (hd0,2)

chainloader /NTLDR

You should get back to studying a bit more the syntax and the examples and take some more time on the drawing board.... (and then do some more experiments on command line :D)


:)
Wonko

#3 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 07 September 2010 - 09:28 PM

Now you see when you put like that I UNDERSTAND, that's why I'm always asking, I can't do it alone. I wish I could. OF COURSE THE FLIPPING WINDOWS 7 IS GOING SPEW FILE NOT FOUND ALL DAY BECAUSE THE CHAIN IN BROKEN and trying to chainload off a hidden part - derrrr what a cabbage I am.

this is it...

title Windows 7 Home Premium 64 Bit
unhide (hd0,0)
unhide (hd0,1)
hide (hd0,2)
chainloader (hd0,0) /BOOTMGR

title Windows XP
unhide (hd0,2)
hide (hd0,0)
hide (hd0,1)
chainloader (hd0,2) /NTLDR

what threw me was the concept of the hiding, I lost the notion that all was hidden until commanded to. For some reason I was thinking the reboot into the system would clear it LOL.

#4 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 07 September 2010 - 09:33 PM

Oh one more thing where is the best place to stash the menu.lst & grldr file?

in the reserverd 100 mb part of win 7?



edit nooooooooooo

Im confused again...........lets say GRLDR is in (hd0,0)

After launching XP rebooting to Win 7 hd0,0 is still hidden so surely will break G4D as boot lader

#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 September 2010 - 10:04 PM

http://www.imdb.com/...t0104952/quotes

Vinny Gambini: I object to this witness being called at this time. We've been given no prior notice he would testify. No discovery of any tests he's conducted or reports he's prepared. And as the court is aware, the defense is entitled to advance notice of all witness who will testify, particularly those who will give scientific evidence, so that we can properly prepare for cross-examination, as well as give the defense an opportunity to have his reports reviewed by a defense expert, who might then be in a position to contradict the veracity of his conclusions.
Judge Chamberlain Haller: Mr. Gambini?
Vinny Gambini: Yes, sir?
Judge Chamberlain Haller: That is a lucid, intelligent, well thought-out objection.
Vinny Gambini: Thank you, sir.
Judge Chamberlain Haller: Overruled.


After launching XP rebooting to Win 7 hd0,0 is still hidden so surely will break G4D as boot lader



That is a lucid, intelligent, well thought-out objection, BUT it is based on assuming :) (as opposed to searching/reading/learning :D).
Overruled. :D

Not only menu.lst but also grldr (if booted through grldr.mbr or the partition boot-record, NOT if chainloaded from NTLDR/BOOT.INI) can reside on ANY partition, as long as it is formatted in one of the recognized filesystems:
  • FAT12/16/32
  • NTFS
  • EXT2/3 FS
NO MATTER whether hidden or not.

Oh one more thing where is the best place to stash the menu.lst & grldr file?


Drives are scanned following a pre-set order:
(hd0,0)
(hd0,1)
...
(hd0,n)

(hd1,0)
(hd1,1)
....
(hd1,n)
....
(hdm,n)
Obviously, if you have a zillion disks with an umptillion partitions on each, if you put these files on (hdm,n), it will take some time before it starts booting....:)
So, yes, (hd0,0) is the first disk and partition scanned, so it's the most advised/fastest (but if you have one single disk and three partitions it won't make any practical difference).
Putting menu.lst in a hidden partition is on one hand a (very light but effective) form of security, but on the other is a nuisance if you have to edit it....
...decisions, decisions, always decisions....:D


Now that you have grasped the concept of "symmetry" in hiding/unhiding, it's time to introduce the concept of "conditional" hiding/unhiding.
hide and unhide are "traditional" GRUB legacy commands ported into grub4dos, which has however another command, hiddenflag.

READ:
http://www.boot-land...showtopic=11957

:)
Wonko

#6 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 08 September 2010 - 07:20 AM

Not only menu.lst but also grldr (if booted through grldr.mbr or the partition boot-record, NOT if chainloaded from NTLDR/BOOT.INI) can reside on ANY partition, as long as it is formatted in one of the recognized filesystems:

* FAT12/16/32
* NTFS
* EXT2/3 FS


NO MATTER whether hidden or not.


Yup, working great like this, although to get it how I wanted I had some "faffing" about to do.
I noticed installing XP/WIN7 in no matter what order all the boot info for XP IO.SYS/NTLDR and the rest all ended up in the "reserved" hidden partition in windows 7. Now that's not what I wanted.
So to keep it separate I had to install XP, clean, then take an image. Then wipe the HDD by installing Win7 over the top and getting rid of the XP install. Then after 7 installed created a partition for XP (again) and then restored the image back into it's partiton. Now All is hidden from one another and all have C: as route and no files have been pinched by either OS. Sounds like a lot of hassle but when your installing these off USB (powered by g4d) then it takes no time and the imaging parts 2/3 mins tops.

I had done dual boots in the past but hated how on OS the C: ended being E,D or F etc and just a mess. Now after a years of wanting a clean way of doing it, G4D saves the day again.
It must be up for an oscar soon! :D

Thanks for the quick and dirty lessons in hiding! :D

edit oh and I did real the hiddenflag thread and seems quite similar, I guess the differences (most noticeable to me anyway) are the ability to report on the status of a partition and also set a separate configfile for certain flagged drives.
hiddenflag (hd0,0) || configfile /for_UnHidden_drives.lst
As it stands the simple (hide) (unhide) gets me where I want but wonder what you can do with that?

#7 dog

dog

    Frequent Member

  • Expert
  • 236 posts

Posted 08 September 2010 - 11:48 AM

it's time to introduce the concept of "conditional" hiding/unhiding.

it's time to introduce "true" hiding, using partnew
:D :D

#8 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 08 September 2010 - 12:29 PM

lets see? Have you a example? :D

grub> help partnew

partnew: partnew [--active] PART TYPE START [LEN]

   Create a primary partition at the starting address START with the

   length LEN, with the type TYPE. START and LEN are in sector units. If

   --active is used, the new partition will be active. START can be a

   contiguous file that will be used as the content/data of the new

   partition, in which case the LEN parameter is ignored, and TYPE can be

   either 0x00 for auto or 0x10 for hidden-auto.


#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 September 2010 - 02:32 PM

dog must get a honorary degree in "suggesting extremely advanced techniiques more prone to create havoc than anything else by using potentially destructive commands". :D

Jumping from lesson #2 or #3 to lesson #42 represents a bit longish hop :D, but since the topic was introduced :) :
http://www.boot-land...?...ic=7138&hl=

which "connects" partnew to the use of dd (which was the topic of last AFAICR dog's "live dangerously series" episodes :)):
http://www.boot-land...?...c=12094&hl=
http://www.boot-land...?...c=12253&hl=

:D
Wonko

#10 dog

dog

    Frequent Member

  • Expert
  • 236 posts

Posted 08 September 2010 - 06:18 PM

For a bit of extra fun, my current list has potentially overlapping partitions :)
title sig f hd0

cat --hex --skip=440 --length=4 (hd0)+1

write --offset=440 (hd0) \xFF\xFF\xFF\xFF

cat --hex --skip=440 --length=4 (hd0)+1 && pause



title dd xp440 (hd0)

dd if=(cd)/xp440 of=(hd0) bs=440 count=1

write --offset=510 (hd0) \x55\xAA

pause



title partnew --active (hd0,0) 0x07 1184MB 151c

partnew --active (hd0,0) 0x07 63 2425752

pause



title partnew --active (hd0,0) 0x07 0-5GB 653c

partnew --active (hd0,0) 0x07 63 10490382

pause



title partnew --active (hd0,0) 0x07 0-10GB 1306c

partnew --active (hd0,0) 0x07 63 20980827

pause



title partnew --active (hd0,0) 0x07 0-15GB 1959c

partnew --active (hd0,0) 0x07 63 31471272

pause



title partnew --active (hd0,0) 0x07 10-20GB 1306c

partnew --active (hd0,0) 0x07 20980890 20980890

pause



title partnew --active (hd0,0) 0x07 0-20GB 2612c

partnew --active (hd0,0) 0x07 63 41961717

pause



title partnew --active (hd0,0) 0x07 20-40GB 2612c

partnew --active (hd0,0) 0x07 41961780 41961780

pause



title partnew --active (hd0,0) 0x07 40-60GB 2612c

partnew --active (hd0,0) 0x07 83923560 41961780

pause



title partnew --active (hd0,0) 0x07 60-80GB 2612c

partnew --active (hd0,0) 0x07 125885340 41961780

pause



title partnew --active (hd0,0) 0x07 80-100GB 2612c

partnew --active (hd0,0) 0x07 167847120 41961780

pause



title partnew (hd0,3) 0x20 100GB to 465GB 47741c

partnew (hd0,3) 0x20 209808900 766959165

pause

Of course you have to keep a note somewhere of where your hidden partitions are, and be careful not to create or extend partitions over them, because they're properly hidden.
But I reckon if you've got backups of your boot code and partitioning scheme on a bootable cd (and if the partitioning scheme doesn't overlap...) that's actually quite a safe position to be in.

I've not found a use for this one yet, but in the interest of full disclosure... :D
title set ntfs partition serial

cat --hex --skip=72 --length=8 (hd0,0)+1 && pause

write --offset=72 (hd0,0)+1 \x00\x00\x00\x00\x00\x00\x00\x00

cat --hex --skip=72 --length=8 (hd0,0)+1 && pause


#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 September 2010 - 08:57 PM

Of course you have to keep a note somewhere of where your hidden partitions are, and be careful not to create or extend partitions over them, because they're properly hidden.

May I suggest how a suitable place to keep the notes could be one of the unused hidden sectors of the HD.....:D :D

:)

:)
Wonko

#12 dog

dog

    Frequent Member

  • Expert
  • 236 posts

Posted 09 September 2010 - 11:33 AM

Copies of sector 0, in sectors 1-62?
You'll be recommending dd to people next :D

#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 September 2010 - 02:41 PM

Copies of sector 0, in sectors 1-62?
You'll be recommending dd to people next :D

Actually I was thinking of putting a Paradox relational database with the notes in the nearly 8 Mb free at the end of the hard disk.....
It would be fun when someone re-partitions with Vista or 7. :D

:D
Wonko

#14 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 09 September 2010 - 03:11 PM

what the flip?.. :D.....you guys eat too much red meat!

#15 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 September 2010 - 03:20 PM

what the flip?.. :D.....you guys eat too much red meat!

Sure we do. :D

We also hunt, catching little animals with our bare hands and eating 'em raw on the spot, no prisoners taken, now - should you be anything less that 6' 2" and 115 Kg, you know. :D

:D
Wonko

#16 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 09 September 2010 - 03:31 PM

didnt think the paradox databases could be left that long to let you entertain such a past time......Perhaps we are closer to god than we could have ever imagined? :D

#17 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 September 2010 - 06:46 PM

Perhaps we are closer to god than we could have ever imagined? :D

Naaah, for it we need at least to use cat --replace on the paradox database in the hidden sectors to edit it and create reports.....:D

http://www.boot-land...?showtopic=9718

@dog
Potentially even more dangerous that a direct dd :D (or at least more prone to errors Posted Image)

:D
Wonko

#18 dog

dog

    Frequent Member

  • Expert
  • 236 posts

Posted 10 September 2010 - 12:03 PM

I don't think I've had more than 7 partitions on the go, so my notes don't take up much space:
Posted Image
And if I ever come to dinner, just vegetables please :hyper:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users