LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 01: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, 01:51 PM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
How did you install grub to the usb key? Which version of grub are you using?
 
Old 10-04-2012, 03:36 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
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, 04: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, 08:24 PM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
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 09:25 AM.
 
Old 10-06-2012, 08: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



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 06:52 PM
Getting output from GRUB during boot from USB key Hok Linux - General 4 10-06-2010 11:48 PM
Windows and Ubuntu on a USB key caa1980 Ubuntu 4 05-17-2010 12:29 PM
USB Key Stops System Boot Up. swamprat Linux - Newbie 1 04-13-2008 08:15 PM
usb key boot on laptop guldo Linux - General 4 08-22-2005 09:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:17 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
Open Source Consulting | Domain Registration