LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 10-04-2012, 02:10 PM   #1
TheBlunderbuss
LQ Newbie
 
Registered: Apr 2006
Distribution: Debian stable (Squeeze)
Posts: 5

Rep: Reputation: 0
USB key boot to windows


Howdy

I have a system with Linux and WinXP installed. Grub is set up with Linux as the default. Sometimes, I would like to plug in a USB drive, telling the computer to boot to Windows, without having to provide user input at the GRUB menu.

What I'm currently trying is installing GRUB to the USB thumbdrive. After copying my system's grub.conf to it and removing all but the Windows XP entry, I get marginal success. The first boot-up, GRUB tells me "unknown filesystem" and enters rescue mode. If I reboot from there, it works - Windows gets booted.

I'm wondering why that it doesn't just boot straight away. Either something is wrong with the USB's grub.conf, or the USB key wasn't set up correctly.

Any ideas?
 
Old 10-04-2012, 02:51 PM   #2
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,396

Rep: Reputation: 187Reputation: 187
How did you install grub to the usb key? Which version of grub are you using?
 
Old 10-04-2012, 04:36 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 12,093

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
I get the feeling you have an odd issue where you set the boot device as the flash drive and now all the xp info thinks it is D drive instead of C drive.
 
Old 10-04-2012, 05:32 PM   #4
TheBlunderbuss
LQ Newbie
 
Registered: Apr 2006
Distribution: Debian stable (Squeeze)
Posts: 5

Original Poster
Rep: Reputation: 0
It is GRUB 1.98, from Debian stable.
I made a new partition table on the flash drive, there are 2 partitions. sdd1 is ~3MB ext2 with the boot flag, sdd2 is FAT32 for other storage.
I believe both were rounded to nearest MiB, not cylinder. I didn't use any syslinux tools on it (mkdiskimage), because I want more than one partition.

Installed with grub-install --no-floppy --root-directory=/mnt/sdd1 /dev/sdd
 
Old 10-04-2012, 09:24 PM   #5
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,396

Rep: Reputation: 187Reputation: 187
My guess from playing around with grub2 on a usb key, is that when you first boot grub thinks that the flash drive is the first hard drive and on reboot gets it right and thinks your internal drive is the first hard drive. If you edit the grub.conf to work on a first boot it may very well fail on reboots. I think you can use uuids or labels to get it right, but I haven't done anything like that, so I can't tell you how to go about setting up the grub.conf

Last edited by colorpurple21859; 10-06-2012 at 10:25 AM.
 
Old 10-06-2012, 09:38 AM   #6
TheBlunderbuss
LQ Newbie
 
Registered: Apr 2006
Distribution: Debian stable (Squeeze)
Posts: 5

Original Poster
Rep: Reputation: 0
Yeah perhaps the BIOS is assigning the USB key as the first drive and GRUB is confused. I will check that out, as well as (ahem)re-read the grub manual.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount dd image of usb key in Windows XP pljvaldez General 2 05-27-2011 07:52 PM
Getting output from GRUB during boot from USB key Hok Linux - General 4 10-07-2010 12:48 AM
Windows and Ubuntu on a USB key caa1980 Ubuntu 4 05-17-2010 01:29 PM
USB Key Stops System Boot Up. swamprat Linux - Newbie 1 04-13-2008 09:15 PM
usb key boot on laptop guldo Linux - General 4 08-22-2005 10:07 PM


All times are GMT -5. The time now is 07:44 PM.

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