LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-03-2004, 11:42 PM   #1
Darrell22
Member
 
Registered: Nov 2003
Posts: 62

Rep: Reputation: 15
Using dual boot with boot.ini and grub?


Dear Experts,

If you are successfully running dual boot, grub,
Linux/Windows, I hope you will help me out. Please run
some commands on your system, and post the results here.


Boot to linux:

df -k

- find the boot partition.
/dev/hdb5 101089 9321 86549 10% /boot


- make the binary file again, if you don't have it.

dd if=/dev/hdb5 of=linux.bin bs=512 count=1


Then run the commands:

ls -l linux.bin


file linux.bin


strings linux.bin


strings linux.bin | wc


od -c linux.bin


fdisk -l


dmesg | grep -i hd


Is grub your boot loader? If not, what?
Did you use LBA32?


If you can help me out, I will really appreciate it.

BTW, all these commands give information output only, and will not
do anything to your system. The exception being the dd command.


Please, no questions. Just output from the commands.


Thanks a lot!
 
Old 12-07-2004, 05:26 PM   #2
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Ok... but I would like to know what you're doing. The MS boot loader is in the partition boot sector. All the MS mbr does is pass control to the active boot sector. If you overwrite the MS mbr with GRUB, then all you should need to do is add a "root (hd0,0)" and a "chainloader +1" command to your /boot/grub/menu.lst file (sometimes called grub.conf). (Assuming the first partition holds windows. Adjust the command to your needs)

You probably didn't intend it as such, but your post sounds rather rude. I personally feel that a poster should either post what he's trying to accomplish, or he should expect to be questioned.

#df -k
Filesystem 1K-blocks Used Available Use% Mounted on
...
/dev/hda1 62193 7591 51391 13% /boot
...

This machine was my first attempt at installing linux. I know the partition is too large. Don't hassle me about it. Some of the output here will be much larger than it needs to be.

# ls -l test.bin
-rw-r--r-- 1 root root 65769984 2004-12-07 14:51 test.bin
# ls -lh test.bin
-rw-r--r-- 1 root root 63M 2004-12-07 14:51 test.bin

What would you be trying to do with a .bin file anyway? Are you trying to make a boot CD (wild guess)? If so, you will probably want to install the boot loader to the root of that partition (I don't know what else might be entailed).

# file test.bin
test.bin: Linux rev 1.0 ext2 filesystem data

# strings test.bin | head
nAr-
nAt-
vmlinuz-2.6.5-7.111-default
^:A,W:A
message
A(noA
F -A
AF -A
s -A
As -A

# strings test.bin | tail
@0Vj
SUVW
|$ 3
@0Qj
_^][
WVS3
PShhL
;H<r
9X t
tV9^

The output of the full command is way too long to list in a post here. If you need more, ask.

# strings test.bin | wc
649081 1023784 9972270

# od -c test.bin | head
0000000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
0002000 300 > \0 \0 344 372 \0 \0 213 \f \0 \0 J 325 \0 \0
0002020 230 > \0 \0 001 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0002040 \0 \0 \0 \0 \0 \0 330 \a \0 \0 353 254 265 A
0002060 356 3 266 A 006 \0 ! \0 S 357 001 \0 001 \0 \0 \0
0002100 $ 001 257 A \0 N 355 \0 \0 \0 \0 \0 001 \0 \0 \0
0002120 \0 \0 \0 \0 \v \0 \0 \0 200 \0 \0 \0 \0 \0 \0 \0
0002140 002 \0 \0 \0 001 \0 \0 \0 \t 033 X $ 232 } E 032
0002160 215 T 352 m 032 : 223 x \0 \0 \0 \0 \0 \0 \0 \0

# od -c test.bin | tail
372710560 026 335 w P 350 323 332 374 377 213 330 203 M 374 377 203
372710600 } 344 \0 t \b 377 u 344 350 355 I 374 377 205 333 |
372710620 \b 213 E 340 213 M 024 211 001 213 303 350 \r 031 374 377
372710640 302 020 \0 j 020 h 320 352 342 w 350 305 030 374 377 203
372710660 } \f \r u \a 270 \r \0 \0 300 353 | 203 e 374 \0
372710700 203 } \f \f | 026 203 } \f \r 177 020 377 u 020 377
372710720 u \f 377 u \b 350 246 024 \0 \0 353 3 377 u 020 377
372710740 u \f 377 u \b 350 < 021 \0 \0 353 # 213 E 354 213
372710760 \0 213 \0 211 E 340 P 350 1 332 374 377 303 213 e 350
372711000

# fdisk -l

Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 8 64228+ 83 Linux
...

# dmesg | grep -i hda
Kernel command line: root=/dev/hda2 vga=0x317 desktop resume=/dev/hda7 splash=silent
ide0: BM-DMA at 0x1000-0x1007, BIOS settings: hdaMA, hdbMA
hda: WDC WD1000BB-00CAA0, ATA DISK drive
hda: max request size: 128KiB
hda: 195371568 sectors (100030 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(33)
hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 >
....



Yes, I use GRUB. I don't think you need to put lba32 anywhere. Modern systems pick up the geometry automatically.
 
  


Reply


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
Dual Boot - XP & Suse 9.1 - Need help with boot.ini johnnytriumph Linux - Newbie 1 04-05-2005 06:18 AM
Configuring XP boot.ini for Dual Boot jarnix Linux - Software 5 02-02-2005 02:37 AM
grub.conf and boot.ini billygotee Linux - Newbie 2 11-26-2003 10:53 AM
Dual Boot Win2000Pro & RH 8 w/Boot.ini JinxU1 Linux - Newbie 9 01-31-2003 09:49 PM
Editing boot.ini for dual boot nixdisciple Linux - General 1 06-02-2002 11:40 AM


All times are GMT -5. The time now is 01:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration