LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-02-2008, 07:29 PM   #1
anon202
LQ Newbie
 
Registered: May 2008
Posts: 7

Rep: Reputation: 0
Unhappy Yet another Grub 1.5 Error 21 question.


Hi,
I realise this is a very heavily covered topic, but I need to ask anyway. I hope someone out there can help me.
So I downloaded the latest version of Ubuntu (8.04 i think) and burnt a CD. I then made the fatal error of installing it to a 6gb CompactFlash Microdrive which was connected via an inbuilt card reader. Ubuntu gave me this option, and I thought "hey! i'll just stick it on there instead of doing a partition"
So it installed, asked me to reboot, and straight away i get the Error 21 message, and thats it. nothing. My computer at that point just stops and nothing works. No windows, no ubuntu, regardless of whether the MicroDrive is plugged in. I'm currently running ubuntu off the CD.
I'm a COMPLETE newbie here. I've been trying to read up on the problem on various forums but I litterally don't understand a word of whats being said. I dont know what Grub is, or MBR, or any of the things that keep getting mentioned.
I guess what i want to know is, is there some way i can fix this problem and get windows back through this Ubuntu Cd?
Any help VERY MUCH APPRECIATED, but please treat me as a newbie who has zero understanding of the various techie terms! All i know so far is how to open Terminal, but if someone can help me out and explain in lame man terms, i'm not afraid to tinker around.
THANKYOU!
 
Old 05-02-2008, 08:28 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Pretty easy to fix. Did you only have Windoze on the machine prior to your little escapade ???.
From the liveCD, enter this at a terminal, and post the complete output here
Code:
sudo fdisk -l
(that's a lower case ell, and I don't know if sudo will ask for a password - if so, try it without sudo)
 
Old 05-02-2008, 08:35 PM   #3
anon202
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Thankyou for taking on my problem!!

yeaup, only windows.

here's what i get.


ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316

Device Boot Start End Blocks Id System
/dev/sda1 1 9 72261 de Dell Utility
/dev/sda2 * 10 29982 240758122+ 7 HPFS/NTFS
/dev/sda3 29983 30393 3301357+ db CP/M / CTOS / ...

Disk /dev/sdb: 6144 MB, 6144284672 bytes
255 heads, 63 sectors/track, 747 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00043799

Device Boot Start End Blocks Id System
/dev/sdb1 1 708 5686978+ 83 Linux
/dev/sdb2 709 747 313267+ 5 Extended
/dev/sdb5 709 747 313236 82 Linux swap / Solaris
ubuntu@ubuntu:~$
 
Old 05-02-2008, 08:35 PM   #4
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
What guide did you use to install it? i think you are going to have to fix the mbr.
Sounds like you installed ubuntu to the flash drive and mbr was overwriten by grub.
if you want to get windows back;
http://www.windowsinternals.com/fixi...r-with-fixmbr/
Then just install ubuntu on a hard drive.
 
Old 05-02-2008, 08:43 PM   #5
anon202
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by comprookie2000 View Post
What guide did you use to install it? i think you are going to have to fix the mbr.
Sounds like you installed ubuntu to the flash drive and mbr was overwriten by grub.
if you want to get windows back;
http://www.windowsinternals.com/fixi...r-with-fixmbr/
Then just install ubuntu on a hard drive.

I used a guide on the ubuntu site, but basically all i did was burn the CD and then follow the install wizard.
I'm not sure what MBR is but i'll give your suggestion a go, but I don't know if i have a windows XP cd... although i think i miiiiiiiiight possibly have a recovery cd somewhere. Unfortunately if I have either they arent accessible to me at the moment because im not at home where they'd be.
Any way to do a fix using just this Ubuntu CD im running at the moment, or am i screwed until i can get the XP cd's?
 
Old 05-02-2008, 08:47 PM   #6
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
Try this;
http://www.arsgeek.com/?p=3340
 
Old 05-02-2008, 08:52 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Too slow ... (same link as above)

Last edited by syg00; 05-02-2008 at 08:53 PM. Reason: deleted redundant post
 
Old 05-02-2008, 09:04 PM   #8
anon202
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by comprookie2000 View Post
in that link it says

Quote:
The two important bits are the ‘/dev/sda1‘ which is the partition itself and the ‘NTFS‘ which tells us it’s a Windows formatted partition. So your Windows partition exists on your drive sda and it’s partition 1. The MBR for drive sda (assuming you boot into windows using it’s native boot loader) is what you want to repair.

We want to fix the MBR on /dev/sda. To do so, type:

Quote:
sudo ms-sys -m /dev/sda

so judging by what i posted before my widows formatted partition is sda2.... right? but so what?! i dont get what that tells me, cos that page says to look for that, but then the code he types in doesnt make any mention of it.... Is it purely to find out if SDA is the one with my windows, as opposed to SDB which is my 6gb microdrive?
What do I personally need to type in for that step, judging by what i got from doing the fdisk -l ? Sorry for being so dumb, I just dont wanna get this wrong and i dont fully understand.

Last edited by anon202; 05-02-2008 at 09:06 PM.
 
Old 05-02-2008, 09:11 PM   #9
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
sudo ms-sys -m /dev/sda
 
Old 05-02-2008, 09:28 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,499

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Grub is a bootloader, in XP the bootloader is ntldr. When your computer boots, it does a POST, memory check, checks drives, etc then it looks for the MBR (master boot record) which is at a specific physical location on every hardrive. If it doesn't find anything suitable (Grub, Lilo, Ntldr, etc.) it stops. The MBR doesn't actually contain the bootloader but only a tiny part of it which basically point to where the real bootloader is (an over-simplification).

I don't know anything about CompactFlash MicroDrives but it seems they are primarily used for photography but can be used for pretty much anything. Small size and speed seem to be their primary advantages. I did a minimal google on this and found a couple of sites on booting Linux/XP from a flash drive and it didn't look that simple, to me anyway.

Did you format this drive? Were you booting from windows before? Did you have Ubuntu or any other Linux OS on the machine? You installed Grub obviously but it can't find your disk and there could be a number of reasons for this.

Is your intention to try to fix your windows mbr or re-install ubuntu, or both?

Your last post: the sda2 is your windows partition, the website uses sda1 as an example. Using the command posted with just sda should repair your windows mbr which is why it used 'sda' not 'sda2'. I'm not familiar with this command or program so...good luck.

Last edited by yancek; 05-02-2008 at 09:34 PM.
 
Old 05-02-2008, 09:30 PM   #11
anon202
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
this is what i get in Terminal when i follow those steps. Any suggestions? THANKYOU!

Quote:
ubuntu@ubuntu:~$ sudo apt-get install ms-sys
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package ms-sys
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316

Device Boot Start End Blocks Id System
/dev/sda1 1 9 72261 de Dell Utility
/dev/sda2 * 10 29982 240758122+ 7 HPFS/NTFS
/dev/sda3 29983 30393 3301357+ db CP/M / CTOS / ...

Disk /dev/sdb: 6144 MB, 6144284672 bytes
255 heads, 63 sectors/track, 747 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00043799

Device Boot Start End Blocks Id System
/dev/sdb1 1 708 5686978+ 83 Linux
/dev/sdb2 709 747 313267+ 5 Extended
/dev/sdb5 709 747 313236 82 Linux swap / Solaris
ubuntu@ubuntu:~$ sudo ms-sys -m /dev/sda
 
Old 05-02-2008, 09:36 PM   #12
anon202
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
Grub is a bootloader, in XP the bootloader is ntldr. When your computer boots, it does a POST, memory check, checks drives, etc then it looks for the MBR (master boot record) which is at a specific physical location on every hardrive. If it doesn't find anything suitable (Grub, Lilo, Ntldr, etc.) it stops. The MBR doesn't actually contain the bootloader but only a tiny part of it which basically point to where the real bootloader is (an over-simplification).

I don't know anything about CompactFlash MicroDrives but it seems they are primarily used for photography but can be used for pretty much anything. Small size and speed seem to be their primary advantages. I did a minimal google on this and found a couple of sites on booting Linux/XP from a flash drive and it didn't look that simple, to me anyway.

Did you format this drive? Were you booting from windows before? Did you have Ubuntu or any other Linux OS on the machine? You installed Grub obviously but it can't find your disk and there could be a number of reasons for this.

Is your intention to try to fix your windows mbr or re-install ubuntu, or both?
Thank you for describing what the various things mean. The micro drive im using is taken from my old ipod mini, but i've been using it for a very long time to transfer files between PC's and also in my camera. I formatted it before i did anything linux related with it. I think it was something like fat32??? im not sure.

Anyway, at the moment my primary concern is getting windows XP back. Ubuntu/linux really isnt important to me at the moment, i was only trying to install if to see what its like out of curiosity. My PC only had XP and no other operating systems, and always automatically went straight to XP when turned on.
 
Old 05-02-2008, 09:51 PM   #13
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
Try to enable extra repositories;
http://monkeyblog.org/ubuntu/install...a_repositories
http://monkeyblog.org/ubuntu/installing/

Last edited by comprookie2000; 05-02-2008 at 09:52 PM.
 
Old 05-02-2008, 10:00 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,499

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
You can read and write to fat32 partitions with Linux but not install to one. I also believe that in order to boot from a flash drive you need an ide adapter.

I expect you will need to get your windows recovery CD to repair. I'm not familiar with the program you were trying to download to repair so have no suggestions.

It seems as though you chose the default option to install the Grub bootloader to the mbr which wrote over your windows mbr. If you can access another computer, you could download SuperGrubDisk which should be able to repair your windows mbr. You won't be able to do that running just a Live CD which is also why the 'ms -sys' didn't work.

When you get your windows fixed and decide to try Linux, I would suggest trying out a few Live CD's first. That way you won't install to your hardrive and you will be able to familiarize yourself with the system and various programs.

Good Luck.
 
Old 05-02-2008, 10:06 PM   #15
anon202
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
thankyou both for your help. I need to go now, but i will give your suggestions a try and report back tomorrow.

Again, thank you!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
Two things: (Probably Simple) Grub question, and a gDesklets question Wilffo Linux - Software 3 05-20-2006 01:33 PM
GRUB error question PipeDreams Debian 4 03-18-2006 07:19 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:37 AM.

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