LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 04-03-2011, 08:23 PM   #1
oblivion2k
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
Thumbs up Tricky issue with Grub - flash drive dual booting


First post, glad to be here.
So, luckily this is not an issue that is keeping me from booting at all, however, I need to have my flash drive plugged in to boot or I get a grub error 21. Here's why:
I started with Windows 7 on my laptop internal drive, and installed Fedora Core 12 in dual boot configuration onto my 16Gb flash drive. Already I'm sure some of you see the problem. Grub installed onto my flash drive, therefore, without my flash drive inserted, my BIOS sees no bootloader and won't boot. Essentially what I'm wanting to do is export my GRUB onto the internal hard drive so I can boot my laptop without having my flash drive plugged in. Initially when I tried this I got a No Hard Disk error, which is understandable. I fixed this by going into grub and using setup (hd0) which I was hoping (but not expecting) would export my existing grub setup onto the internal drive with the MBR (hd0). Not quite, as now the error message I receive without my flash drive plugged in is Error 21, as I mentioned earlier. From what I understand this means that the hard drive with the grub menu was not found (maybe?). That's as far as I got. In summary I need to move my grub from my flash drive to my laptop hard drive so that I can boot to the Windows partition on my laptop hard drive without my flash drive plugged in. Not a huge issue, I'm not in a panic or anything, but help would be appreciated.
 
Old 04-03-2011, 09:04 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,959

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
I don't understand why you got the "No Hard Disk" error - have you been changing the boot order in the BIOS ?.

It is possible to move the /boot onto the internal disk, but you might want to give this some more thought. With external devices I prefer to keep the boot environments separate.
Have Win7 on the internal disk, Linux on the flash. When you want to boot the flash, choose it from the BIOS - most modern machines have a key to pull up a device menu on boot. Presumes the flash is a bootable device as far as the BIOS is concerned.

Tell us which way you want to go, and we can hopefully fix you up.
 
Old 04-04-2011, 04:21 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,101

Rep: Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552
Error 21 is some grub line trying to find something.

I'd look to boot order in bios first. Is it set to the usb first when the usb is installed?
 
Old 04-05-2011, 02:57 PM   #4
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,796

Rep: Reputation: 213Reputation: 213Reputation: 213
Boot flag...

Windows wants a boot flag for the partition that boots, these days, often a special Windows partition just for that purpose. You can use the command "fdisk -l" with "root" privileges in a terminal to check that the boot flag is still there.

Unless you want to install linux beside Win7 on your HDD, the suggestion from syg00 that you keep Win7 and linux separate and use a BIOS function, either changing the boot sequence or using a one-time-boot menu, when booting your linux USB is a good idea.

An easy way to do this is to open your laptop and disconnect the internal HDD, then just install linux on the USB flash drive. As an alternative, you might boot Fedora as a live-cd, then install it on the USB flash as a persistent USB installation. Either way should work.

Then, neither Windows nor linux will know of the others existence. Win7 will boot on its own when the linux USB is not plugged in or is not chosen to be booted. linux will boot if it is plugged in and either the BIOS boot sequence is set to choose the USB before the internal HDD or the BIOS sequence is set to choose the HDD first, and the linux USB is picked in the one-time boot menu at POST.

You may need to do a little repair on Windows to have it boot after you remove the chainloading function that you introduced with Grub. These can be useful.

http://neosmart.net/dl.php?id=1

http://neosmart.net/blog/2009/window...-repair-discs/

Otherwise, google for help in repairing windows after dual-booting linux; you will find many posts.

Note: your posts are easier to read if you separate the text into separate text blocks.

Last edited by thorkelljarl; 04-06-2011 at 07:04 AM.
 
Old 04-07-2011, 01:39 AM   #5
oblivion2k
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Well, now I've gone and done it...
Formatted the flash drive because I needed it for other things, thinking I could just run the windows 7 startup repair disk when I got home to fix it, and I ran startup repair a few times, no luck. I'm still getting grub errors for some crazy reason. With the flash drive plugged in it's error 21, without it plugged in it's error 17 (or maybe the other way around, I can't remember). Now I'm on an ubuntu 10.10 live cd I had laying around until I can get this fixed.
To answer the previous questions, I had it set to boot from removable drive first, followed by the HDD. This might have been the problem if I'm understanding correctly. For right now though, I just need to get my windows 7 partition working. I'll be installing CentOS and Fedora Core onto my flash drive later for my Fedora Core class at college, so I'll probably need help again for that. Any help getting me going for now with some repair commands for the Windows 7 repair disc would be very much appreciated.
 
Old 04-07-2011, 02:08 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,959

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
To run the Win7 repair you'll need the internal disk first in the BIOS list - as in before the flash, but (obviously) after the CD.
What issues are you having with that ?. I've had to use the Neosoft one (second link in post #4 above) - worked fine. You just need to recover the MBR on the internal disk - have a read of this technet article.

Last edited by syg00; 04-07-2011 at 02:24 AM. Reason: disk order explanation
 
  


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 Slackware 13 with FreeBSD, but Issue Dual Booting PC-BSD Photon Blizzard *BSD 2 11-09-2009 12:55 PM
Dual Boot Slackware 13 with FreeBSD, but Issue Dual Booting PC-BSD Photon Blizzard Linux - Newbie 1 10-22-2009 11:07 PM
Booting Windows on secondary hard drive with Grub on primary drive mpmackenna Linux - General 1 11-09-2008 07:16 PM
Dual Booting (2 Linux from Separate Drives) GRUB issue. RensoreK Linux - Desktop 1 08-22-2008 01:01 AM
OT - tricky drive recovery issue babag Mandriva 3 01-12-2008 11:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 11:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration