grub to boot windows


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users grub to boot windows
# 1  
Old 03-04-2010
grub to boot windows

Hello,

I am using debian-5.0.0(lenny) . I installed windows xp(a hacked version) on a usb stick. this stick works perfectly well and boots off a windows system successfully.
but on linux it is finding problems to do so.

So I finally decided to put a grub entry to boot off the usb HDD.

So here are the short details . Please have a look.

My menu.lst
Code:
title           Debian GNU/Linux, kernel 2.6.26-2-686
root            (hd0,0)
kernel          /vmlinuz-2.6.26-2-686 root=/dev/sda3 ro
initrd          /initrd.img-2.6.26-2-686

title           Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
root            (hd0,0)
kernel          /vmlinuz-2.6.26-2-686 root=/dev/sda3 ro single
initrd          /initrd.img-2.6.26-2-686

title           Xen 3.2-1-i386 /Debian GNU/Linux, kernel 2.6.26-2-xen-i386
root            (hd0,0)
kernel          /xen-3.2-1-i386.gz
module          /vmlinuz-2.6.26-2-xen-686 root=/dev/sda3
module          /initrd.img-2.6.26-2-xen-686

title           WINDOWS XP
rootnoverify    (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader     +1

My device.map file is this

Code:
cat /boot/grub/device.map 
(hd0)    /dev/sda
(hd1)    /dev/sdb

and finally the output of fdisk -l is as follows

Code:
localhost:/home/gaurav# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf8000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          16      128488+  83  Linux
/dev/sda2   *          17         502     3903795   82  Linux swap / Solaris
/dev/sda3             503       19457   152256037+  83  Linux

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
64 heads, 32 sectors/track, 305245 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x000c6cde

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       52000    53247984    7  HPFS/NTFS
/dev/sdb2           52001      305244   259321856    f  W95 Ext'd (LBA)
/dev/sdb5           52001      305244   259321840    7  HPFS/NTFS
localhost:/home/gaurav#

well so after choosing Windows XP at the grub menu, it prints this to the console

Code:
Booting           WINDOWS XP
rootnoverify    (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader     +1

and then halts . apparently not responding at all.

the same usb hdd boots successfully off a windows system but its facing some problem off this.
My bios perfectly supports usb boot as I have installed debian over the usb through netinstall-iso image and unetbootin.

I am using dell-1520 notebook.

If anyone faced a similar situation, Please let me know.

Thanks,
Regards,

Gaurav.
# 2  
Old 03-05-2010
Quote:
Originally Posted by gaurav1086
Code:
title           WINDOWS XP
rootnoverify    (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader     +1

I'd do the (re-)mapping first:

Code:
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1
boot

# 3  
Old 03-05-2010
Hello ,

Thnx . Let me try that.

Regards,
Gaurav.

---------- Post updated at 03:52 PM ---------- Previous update was at 03:30 PM ----------

Hello,

I tried that, but I am at the same position.

but I feel too that it wont cause any difference because if you enter the grub shell ( by typing grub ) and you enter the directives one my one like root (hdx,y) , map (hda,b) (hdc,d), chainloader +1 etc etc and then boot. So it takes in all the commands at once and resolves them before booting them. Kind of Two-Pass Assembler.

Thanks again.
I will keep on trying.

Regards,
gaurav.
# 4  
Old 03-05-2010
One further thing to check: when booting, enter the GRUB shell from the menu (by pressing 'e'), and try to verify that the system can see the USB disk. Because a BIOS being able to boot off an USB drive doesn't mean that the bootloader can see it too, or even at the same location as the booted system.
# 5  
Old 03-05-2010
Quote:
Originally Posted by pludi
One further thing to check: when booting, enter the GRUB shell from the menu (by pressing 'e'), and try to verify that the system can see the USB disk. Because a BIOS being able to boot off an USB drive doesn't mean that the bootloader can see it too, or even at the same location as the booted system.
Hi Pludi,

the
Code:
cat /boot/grub/device.map 
(hd0)    /dev/sda
(hd1)    /dev/sdb

shows that grub idenfies sdb as hd1 by its own notation.

Regards,
Gaurav.
# 6  
Old 03-05-2010
I don't mean the device map, as that is generated with a running system, mapping the devices by whatever way Linux maps them. If you generate it another time, with another external disc connected, it might well be that your Windows disc is suddenly /dev/sdc or hd2. So the interesting part would be what GRUB itself sees it as.

Background: I've had a SATA disc identified as /dev/sda or hd0 with Linux running, but couldn't boot from it as GRUB saw it after an IDE disk at hd1. So none of the entries matched anymore.
# 7  
Old 03-05-2010
Hi pludi,

This sounds complicated. If thts true, then its probably impossible to figure out what grub sees sdb as. But I feel the most obvious is that the first external disk is detected as sdb and grub sees it most likely as (hd1) afaik. The rest follows as sdc sdd.and so on.

"Background: I've had a SATA disc identified as /dev/sda or hd0 with Linux running, but couldn't boot from it as GRUB saw it after an IDE disk at hd1. So none of the entries matched anymore.
Reply With Quote"

what was /dev/sda mapped to in device.map ? was it hd0 and still grub saw it as hd1?

Kind Regards,
Gaurav.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to boot partition from Grub Minimal_BASH?

Hi, someone knows how can I boot my OS or cdrom from a Grub Minimal_Bash? :confused: sorry, I´m a dummy I explain, when I start loading the OS, I get errors, and ends up in the grub bash. This is the minimal_bash and I have no idea of ​​any command. It tells me "unknow partition". The problem is... (0 Replies)
Discussion started by: veravera
0 Replies

2. Solaris

How to specify local boot up disk in CD boot Grub?

Hi Solaris 10 Experts, I am wondering what is the correct syntax to edit in Grub when trying to specify the local ZFS boot disk while booting up from a Solaris 10 x86 64bits DVD installation disk. In other word, I try to boot up from local disk without removing the Solaris installation disk... (0 Replies)
Discussion started by: gjackson123
0 Replies

3. Solaris

OpenSolaris GRUB> boot failure HELP

Hi, i am running an old Opensolaris 5.11 snv_111b on an x86 server. After almost 4 years of successful service, last night out of the blue started to refuse all connections to it's services, ssh, http,etc. The only visible solution at that time was a restart. But now instead of booting the... (2 Replies)
Discussion started by: d_oilen
2 Replies

4. Ubuntu

grub problem - unable to boot

I am not able to boot into my ubuntu. Grub gives me this message How do I boot linux? (6 Replies)
Discussion started by: locoroco
6 Replies

5. Red Hat

Server won't boot up ... no GRUB menu

I dont know what the heck happen but one of our DBAs was working on a cluster for oracle. Rebooted the box and viola, the OS won't load. After the POST message, I get a blinking cursor on the upper left hand corner. Doesn't even say "GRUB" or anything, it just blinks. I tried going into rescue... (1 Reply)
Discussion started by: sdotsen
1 Replies

6. UNIX for Dummies Questions & Answers

using grub to boot from different disks

Hello, I'm working on a x86 machine with 3 disks installed. I need to boot from disk to disk, but I cannot figure out how to do this using Grub. The O/S is Solaris 10 and grub version is 0.95 Can anyone give me any help with this? Thanks, James. (0 Replies)
Discussion started by: eeijmae
0 Replies

7. Red Hat

linux will not boot, boot to grub prompt

my redhat 9 will not boot. We had a power failure and when the power came back, my redhat linux will not boot. The machine come up to grub prompt. I tried the following from grub prompt root (hd0, then press tab key partition num:0 filesystem type unknown, partition type 0x83... (7 Replies)
Discussion started by: hassan2
7 Replies

8. UNIX for Dummies Questions & Answers

Serious GRUB/boot problems

Hi! I got some serious problems with booting the computer. When started it prints GRUB GRUB GRUB all over the screen. tchan on #grub tried to help me but with no result. Here is the log. Mabey there is something that we have missed?:confused: (3 Replies)
Discussion started by: Barfly.se
3 Replies

9. Linux

GRUB cannot boot NTFS partitions?

I have an issue with booting NTFS partitions with Grub. I have two HHD 1st HDD with Red Hat 9.0 and Grub as bootloader 2nd HDD with 8 Win partitions all ntfs. I have added the following line in my grub.conf: title Windows2000/Domino 6 root (hd1,0) makeactive chainloader +1 When I... (4 Replies)
Discussion started by: KDE Man
4 Replies

10. UNIX for Dummies Questions & Answers

Can't get GRUB to boot Linux!!!

I have installed Linux 7.2 on a IBM xseries 235 server with 5 scsi hard drives and ServerRaid-5i Ultra320 scsi controller. I started my installation by configuring the raid controller. I created 2 arrays, raid 1 and raid5. I then proceeded to install Linux and load the drivers. After the... (2 Replies)
Discussion started by: cstovall
2 Replies
Login or Register to Ask a Question