LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-28-2006, 01:10 AM   #1
lnelson15
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Rep: Reputation: 0
Cool What is this in the bootsector..?


Hey there,

I took a copy of my bootsector to add it to the Vista Boot Manager instead of using GRUB. I have not had much success at getting either way to work to get the to OS's to be accessable without shifting my BIOS. My hardware vs. what my software thinks it is seems to be an issue but then this is not my question.

This a copy of the boot area from where Grub is installed.
When running hexdump on the bootsector I copied, I see an area with an asterisk like this:
00000000 eb 48 90 00 00 00 00 00 00 00 00 00 00 00 00 00 |.H..............|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 02 |................|
00000040 ff 00 00 20 87 39 40 00 00 02 fa 90 90 f6 c2 80 |... .9@.........|
00000050 75 02 b2 80 ea 59 7c 00 00 31 c0 8e d8 8e d0 bc |u....Y|..1......|
00000060 00 20 fb a0 40 7c 3c ff 74 02 88 c2 52 be 81 7d |. ..@|<.t...R..}|
00000070 e8 36 01 f6 c2 80 74 56 b4 41 bb aa 55 cd 13 5a |.6....tV.A..U..Z|
00000080 52 72 4b 81 fb 55 aa 75 45 a0 41 7c 84 c0 78 3e |RrK..U.uE.A|..x>|
00000090 75 05 83 e1 01 74 37 66 8b 4c 10 be 05 7c c6 44 |u....t7f.L...|.D|
000000a0 ff 01 66 8b 1e 44 7c c7 04 10 00 c7 44 02 01 00 |..f..D|.....D...|
000000b0 66 89 5c 08 c7 44 06 00 70 66 31 c0 89 44 04 66 |f.\..D..pf1..D.f|
000000c0 89 44 0c b4 42 cd 13 72 05 bb 00 70 eb 7d b4 08 |.D..B..r...p.}..|
000000d0 cd 13 73 0a f6 c2 80 0f 84 e8 00 e9 8d 00 be 05 |..s.............|
000000e0 7c c6 44 ff 00 66 31 c0 88 f0 40 66 89 44 04 31 ||.D..f1...@f.D.1|
000000f0 d2 88 ca c1 e2 02 88 e8 88 f4 40 89 44 08 31 c0 |..........@.D.1.|
00000100 88 d0 c0 e8 02 66 89 04 66 a1 44 7c 66 31 d2 66 |.....f..f.D|f1.f|
00000110 f7 34 88 54 0a 66 31 d2 66 f7 74 04 88 54 0b 89 |.4.T.f1.f.t..T..|
00000120 44 0c 3b 44 08 7d 3c 8a 54 0d c0 e2 06 8a 4c 0a |D.;D.}<.T.....L.|
00000130 fe c1 08 d1 8a 6c 0c 5a 8a 74 0b bb 00 70 8e c3 |.....l.Z.t...p..|
00000140 31 db b8 01 02 cd 13 72 2a 8c c3 8e 06 48 7c 60 |1......r*....H|`|
00000150 1e b9 00 01 8e db 31 f6 31 ff fc f3 a5 1f 61 ff |......1.1.....a.|
00000160 26 42 7c be 87 7d e8 40 00 eb 0e be 8c 7d e8 38 |&B|..}.@.....}.8|
00000170 00 eb 06 be 96 7d e8 30 00 be 9b 7d e8 2a 00 eb |.....}.0...}.*..|
00000180 fe 47 52 55 42 20 00 47 65 6f 6d 00 48 61 72 64 |.GRUB .Geom.Hard|
00000190 20 44 69 73 6b 00 52 65 61 64 00 20 45 72 72 6f | Disk.Read. Erro|
000001a0 72 00 bb 01 00 b4 0e cd 10 ac 3c 00 75 f4 c3 00 |r.........<.u...|
000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200

You see those two asterisk...what are those? When I check the boot sectors of the NTFS partitions, those do not seem to be there. I do not believe the drive has any bad spots.
This is SUSE 10.1 Grub. I used dd to grab the information from the bootable partition . The system has four serial drives. Depending on what is looking at them, they appear in different orders (this if FYI). Nothing serious here...just trying to accommodate my needs.

Best regards,

Lee Nelson

Last edited by lnelson15; 12-28-2006 at 01:15 AM.
 
Old 12-28-2006, 01:31 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
This is an the default display mode of hexdump - see the manpage. May be over-ridden with the "-v" option.
 
Old 12-28-2006, 02:02 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Sorry, got sidetracked by your question - which is not relevant to your problem.
You need to install grub to the boot-sector record of the partition (rather than the MBR) before dd'ing it off. The format (functionality) is slightly different.

Works prior to Vista - haven't bothered with Vista yet, so haven't tested this.
 
Old 12-28-2006, 02:24 AM   #4
lnelson15
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Cool

Thanks for the response. Correctamundo!

Now to find a way to get at both OS without shifting the BIOS...I kinda feel dense after reading so many articles where one has done this or that to Grub in Linux or the Boot Manager on the Vista desktop yet the things I try similar are to no avail. How the drives are listed in my BIOS versus how each OS sees them is two different things. I noticed that Linux does list them a variety of ways if one looks i.e. by path or ID is just the opposite of the way the BIOS sees them. Thus if I tell the BIOS to boot drive one, the boot manager that Vista installed on the XP partition is booted. If I changed the BIOS to boot drive three, the Grub menu comes up and I can access the SUSE distro.
Placing the boot sector in the root of the XP partition and placing it in the Boot Manager lineup seems(ed) like a viable alternative. There was an article on line with specific details.
I got the menu entry placed and pointed it at the file I created to hold a copy of the bootsector but the file does not seem to function correctly. The entry in the Boot Manager screen at startup has the "Grub" listing as expected but all it does is got the boot screen with "Grub" at the top. Here is the tutorial:
using bcdedit.
• On Windows Vista, launch a command prompt with administrative privileges (by right clicking on cmd and choosing Run as Administrator)
• Copy Linux boot sector on the root of the Windows boot (active) partition, namely the one containing bootmgr. If you don’t know for sure you can use diskpart or diskmgmt.msc to find out which one it is.
• Create an entry for GRUB :
o bcdedit /create /d “GRUB” /application BOOTSECTOR
o Note: bcdedit will return an ID for this entry that we will call {LinuxID} below. You will need to replace {LinuxID} by the returned identifier in this step. An example of {LinuxID} is {81ed7925-47ee-11db-bd26-cbb4e160eb27}
• Specify which device hosts a copy of the Linux boot sector
o bcdedit /set {LinuxID} device boot
• Specify the path to a copy of the Linux boot sector
o bcdedit /set {LinuxID} PATH \linux.bin
• Add Linux entry to the displayed menu at boot time
o bcdedit /displayorder {LinuxID} /addlast
• Let the menu be displayed 10 seconds to allow for OS selection
o bcdedit /timeout 10

This seems promising but did not work for whatever reason (probably my execution of the tutorial...I am not sure). All efforts that I have made to implement booting with Grub have not been successful even though fdisk -l points me right at the location of the bootsector in relation to Liunx (i.e. sdc1).
Using that entry information with Grub does not boot that drive for reasons unclear to me. I have tried a variety of entries using the boot loader to no avail. Many from tutorials on how to use Grub to dual/triple boot various distros of Linux with XP/Vista et al.

Time for bed.

Best regards,

Lee Nelson
 
Old 12-28-2006, 02:37 AM   #5
lnelson15
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Cool

Quote:
Originally Posted by syg00
Sorry, got sidetracked by your question - which is not relevant to your problem.
You need to install grub to the boot-sector record of the partition (rather than the MBR) before dd'ing it off. The format (functionality) is slightly different.

Works prior to Vista - haven't bothered with Vista yet, so haven't tested this.
Hey there,

I am not clear on what you mean. Grub is installed in the /root partition on the drive where the SUSE distro is installed...in this case it is listed as follows:

linux-desktop1:/home/lee # fdisk -l

Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 2873 20972857+ 83 Linux
/dev/sda3 2874 10011 57335985 83 Linux

Disk /dev/sdb: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Disk /dev/sdc: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 10010 80405293+ 7 HPFS/NTFS

Disk /dev/sdd: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 1 10012 80415744 7 HPFS/NTFS


You can also see that Vista installed the Boot Manager on the XP partition which is /dev/sdc1. It is show as bootable as is /dev/sda2 the root partition of the SUSE 10.1 installation. Vista is actually on the /dev/sdd1. Nothing is on sdb1.

Best regards,

Lee Nelson

Last edited by lnelson15; 12-28-2006 at 02:40 AM.
 
Old 12-28-2006, 04:10 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Quote:
Originally Posted by lnelson15
I am not clear on what you mean. Grub is installed in the /root partition on the drive where the SUSE distro is installed...in this case it is listed as follows:
It gets a little subtle. You have the stage files installed there. Plus a bootsector record - that presumes it was loaded by a multi-boot aware loader (i.e. grub, not some brain-dead M$oft code).
If it needs to be loaded by the afore-mentioned M$oft piece of crap, it needs to be a bit smarter.
So ....
If you can boot the /dev/sda (via the BIOS), the (extra) smarts aren't present in the boot-sector record. You need to (re-)install grub to /dev/sda2 (i.e. a partition) - rather than to /dev/sda (i.e. the MBR of that disk) as was apparently done during the install.
Then dd the boot sector record, and see how you go.
 
Old 12-28-2006, 08:33 PM   #7
lnelson15
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Cool

Quote:
Originally Posted by syg00
It gets a little subtle. You have the stage files installed there. Plus a bootsector record - that presumes it was loaded by a multi-boot aware loader (i.e. grub, not some brain-dead M$oft code).
If it needs to be loaded by the afore-mentioned M$oft piece of crap, it needs to be a bit smarter.
So ....
If you can boot the /dev/sda (via the BIOS), the (extra) smarts aren't present in the boot-sector record. You need to (re-)install grub to /dev/sda2 (i.e. a partition) - rather than to /dev/sda (i.e. the MBR of that disk) as was apparently done during the install.
Then dd the boot sector record, and see how you go.
Hey there,

Sorry if I seem to misunderstand. I reinstalled grub to /dev/sda2 yesterday to be sure I had it where I understood it to be. Possibly my understanding conceptually is faulted. Fdisk indicates that /dev/sda2 is the bootable partition. I took my copy for the Vista incantation from /dev/sda2.

For grins I tried swapping hd0 with hd2 and I got a different message with the Grub boot up saying "Bootmgr not found or not installed" (sorry it was late when I did that and my recall on that specific fact is fuzzy logic). That is the first time I had gotten any response of any kind from a drive involved with the XP/Vista installations.

In Vista the Boot Manager controls the booting and is capable of booting multiple items if they are placed correctly. The vaunted EasyBCD 1.52 that is floating around to assist using a GUI instead of command line for manipulating the BCD store was not able to help either. I did try to reapply the bootsector into the store as per the instructions in the tutorial. I get the word GRUB in the upper left corner of the screen and that is that with that incantation.

I have stepped away to look at it and try to gain a fresh perspective as I was just flailing around yesterday.

Best regards,

Lee Nelson
 
  


Reply

Tags
suse


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bootsector Unwritable hamish Linux - Software 3 04-16-2005 08:03 AM
Bootsector image trbdk3 Linux - Hardware 5 01-17-2005 09:34 PM
Problems with bootsector Fistman *BSD 8 09-17-2004 01:48 PM
bootsector corruption ragchan Linux - Newbie 4 07-29-2004 03:16 PM
how to delete a virus in bootsector? jorgt Linux - Newbie 3 05-15-2004 12:46 PM


All times are GMT -5. The time now is 05:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration