Jump to content











Photo
- - - - -

GRUB4DOS - Reboot on local disk


  • Please log in to reply
12 replies to this topic

#1 kciope

kciope
  • Members
  • 8 posts
  •  
    France

Posted 16 November 2009 - 01:08 PM

Hello,

I have a usb key wich boot an personnal PE, it's work. But i would like to add an option to boot on the local hard disk, and i didn't find the solution. I've tested lot of things :

map (hd1) (hd0)

chainloader (hd1,0)/ntldr

rootnoverify (hd1)

and also

map (hd1) (hd0)

chainloader (hd0,0)/ntldr

rootnoverify (hd0)

and many things else but it's still doesn't work
Help me please. ;)


Ps: Excuse me if i make mistake in my poor english. :(

#2 was_jaclaz

was_jaclaz

    Finder

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

Posted 16 November 2009 - 01:18 PM

I have a usb key wich boot an personnal PE, it's work. But i would like to add an option to boot on the local hard disk, and i didn't find the solution. I've tested lot of things :
....


Mapping is quite pointless, if you don't --hook it, but you are also making a conceptual error, you don't rootnoverify unless there is a valid reason why root doesn't work, and you do not root or rootnoverify to the whole hard disk!

If you boot from the USB stick, it will bacome (hd0), effectively "shifting" your internal hard disk to (hd1).
Thus you need to exchange drive.

Learn to use Command Line when experimenting, inclding [TAB] autocompletion.
http://diddy.boot-la...iles/basics.htm
http://diddy.boot-la...s/files/cli.htm


Try this:
map (hd0) (hd1)

map (hd1) (hd0)

map --hook
the above exchanges drives.

root (hd0,0)
this sets root to first hard disk partition
chainloader +1

boot
will boot the partition bootrecord or PBR

OR
chainloader /ntldr

boot
will boot a ntldr on first hard disk partition

Read the guide about mapping:
http://diddy.boot-la...s/files/map.htm
(Disk Swapping)

jaclaz

#3 kciope

kciope
  • Members
  • 8 posts
  •  
    France

Posted 16 November 2009 - 03:14 PM

Now i try :

title 01. Booter sur le disque dur

map (hd0) (hd1)

map (hd1) (hd0)

map --hook

root (hd0,0)

chainloader /ntldr

boot

but it still booting on my usb key. I don't understand.
I'll try to read and understand your links, but if you have any idea, it would be great.
thank's

#4 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 16 November 2009 - 03:38 PM

check if you have " boot.ini " on your flash drive root .

try the following ,

checkrange 0x80 read 0x8280 && map (hd1) (hd0)
checkrange 0x80 read 0x8280 && map --hook
chainloader (hd0)+1
boot

give commands one by one.

#5 Arvy

Arvy

    Frequent Member

  • Developer
  • 430 posts
  • Location:Canada, Parry Sound
  • Interests:IT, Outdoors, Horses
  •  
    Canada

Posted 16 November 2009 - 03:45 PM

Try
chainloader (hd0,0)/ntldr

Also, remember that grub4dos is case sensitive. NTLDR or ntldr?

#6 kciope

kciope
  • Members
  • 8 posts
  •  
    France

Posted 17 November 2009 - 06:42 AM

check if you have " boot.ini " on your flash drive root .

try the following ,

checkrange 0x80 read 0x8280 && map (hd1) (hd0)
checkrange 0x80 read 0x8280 && map --hook
chainloader (hd0)+1
boot

give commands one by one.

Yesss! it's work thank you. But, for the moment i don't understand everything...

#7 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 17 November 2009 - 10:27 AM

Yesss! it's work thank you. But, for the moment i don't understand everything...


you are welcome . you ll need some time to understand everything . in fact i dont know everything . but still i seek for it . and you should do the same . just stick around . search ,observe ,test and report back . thats it.

Good Luck .

#8 was_jaclaz

was_jaclaz

    Finder

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

Posted 17 November 2009 - 04:45 PM

Try
chainloader (hd0,0)/ntldr

Also, remember that grub4dos is case sensitive. NTLDR or ntldr?


Just for the record, NO, grub4dos is NOT case sensitive on:
  • FAT12
  • FAT16
  • FAT32
  • NTFS

It IS CaSe SeNsItIvE on CDFS and Ext2/Ext3FS:
http://www.boot-land...?...=7173&st=17


jaclaz

#9 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 22 November 2009 - 10:39 PM

Some explanation about the following code:
checkrange 0x80 read 0x8280 && map (hd1) (hd0)

checkrange 0x80 read 0x8280 && map --hook

chainloader (hd0)+1

boot
checkrange 0x80 read 0x8280
This will compare the BIOS drive number of the boot device, which can be found at memory address 0x8280 with 0x80 (is the same drive as hd0).

&&
Only execute the command after "&&" if the command before "&&" succeeded.

checkrange 0x80 read 0x8280 && map (hd1) (hd0)

checkrange 0x80 read 0x8280 && map --hook
When the boot device is 0x80 (=hd0), map drive (hd1) to (hd0), so the disk that contains Windows, is now available as (hd0).

When you boot from floppy or your USB stick is recognized as a (super)floppy, this mapping is not applied (BIOS drive number for floppy is: 0x00 or 0x01 if you have more floppy drives). The drive that contains Windows is already available as (hd0) in that case.

#10 Jack57

Jack57

    Newbie

  • Members
  • 10 posts
  •  
    France

Posted 24 November 2009 - 10:56 PM

Hello all

i've got the same probléme but a little bit différent as above: i don't want to boot any partition on the 1st hard disk, i want to boot on the Master Boot Record of the 1st hard disk like a normal boot computeur
i tried the différents command but still don't work for me

do you have an idea

thanks for help me

@++

J@ck57

#11 Jack57

Jack57

    Newbie

  • Members
  • 10 posts
  •  
    France

Posted 24 November 2009 - 11:04 PM

This command

[codebox]title - Boot Sur Le 1er Disque Dur - map --hook[/codebox] give me Error 61: Refuse to hook int13 because of empty drive map table

i tried it in a vmware

#12 Jack57

Jack57

    Newbie

  • Members
  • 10 posts
  •  
    France

Posted 24 November 2009 - 11:08 PM

Sorry i found my way alone in this

Master Boot Record (MBR)

The Master Boot Record (or MBR) is always the first sector of a hard disk (sector 1). It contains the disks primary partition table, identifying which partition is marked as active (the active partition is the device boot partition). It is possible to boot a hard disk MBR by using the chainloader command. To boot the MBR of the first hard disk we would use the following command -

[codebox]title Boot MBR of First Hard Disk
chainloader (hd0)+1
rootnoverify (hd0)[/codebox]

Where (hd0) is the whole of the first disk, (hd1) would be used to boot the MBR of the second hard disk, etc. The "+" symbol is used to specify a blocklist - in this case +1 is the first sector of the device (hd0). A block list is used for specifying a file that doesn't appear in the filesystem, like a chainloader.

@++

J@ck

#13 soy

soy
  • Members
  • 6 posts
  •  
    Canada

Posted 29 April 2010 - 02:47 PM

Some explanation about the following code:

checkrange 0x80 read 0x8280 && map (hd1) (hd0)

checkrange 0x80 read 0x8280 && map --hook

chainloader (hd0)+1

boot
checkrange 0x80 read 0x8280
This will compare the BIOS drive number of the boot device, which can be found at memory address 0x8280 with 0x80 (is the same drive as hd0).

&&
Only execute the command after "&&" if the command before "&&" succeeded.

checkrange 0x80 read 0x8280 && map (hd1) (hd0)

checkrange 0x80 read 0x8280 && map --hook
When the boot device is 0x80 (=hd0), map drive (hd1) to (hd0), so the disk that contains Windows, is now available as (hd0).

When you boot from floppy or your USB stick is recognized as a (super)floppy, this mapping is not applied (BIOS drive number for floppy is: 0x00 or 0x01 if you have more floppy drives). The drive that contains Windows is already available as (hd0) in that case.

Hot to use the code please? :mellow:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users